Timeline for N not behaving in the way I expected it would
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 4, 2017 at 20:20 | comment | added | m_goldberg | @rogerl. I really don't know. Machine precision reals could be printed with by a different algorithm than one used for arbitrary precision reals, but this is just speculation on my part. | |
Mar 4, 2017 at 17:20 | comment | added | rogerl |
@m_goldberg Thanks for a great explanation of something I've never understood. One question: Why is the final digit of N[a] different from the rounded value of (say) b20 ?
|
|
Nov 13, 2015 at 2:18 | comment | added | m_goldberg |
@LLlAMnYP. When given a 2nd argument, N tries to return a result of the specified arbitrary precision, rather than one of machine precision. This means it switches computation engines. I presume after doing so, N checks the values of $MinPrecision and $MaxPrecision , which could have values that force it act like SetPrecision , but that is not the default situation.
|
|
Nov 12, 2015 at 22:43 | comment | added | LLlAMnYP |
In all honesty, I'm not getting this, even after your addendum. What does N do when given a second argument? Is it something akin to SetPrecision ?
|
|
Nov 12, 2015 at 20:32 | history | edited | m_goldberg | CC BY-SA 3.0 |
Added mini-treatise on basic numerics
|
Nov 12, 2015 at 18:53 | comment | added | m_goldberg |
@mjkaufer. No, No, NO. N[a] , b16 , and b4 are entirely different numbers. The point I wanted (and obviously failed) to make is that N is a more complex numerical evaluator than it appears on the surface, and it is definitely not just an number display formatter. N is worth considerable study because to that.
|
|
Nov 12, 2015 at 18:16 | vote | accept | mjkaufer | ||
Nov 12, 2015 at 18:16 | comment | added | mjkaufer |
Got it - so basically, the second parameter on the N function just changes how the number is displayed, rather than the actual value of the number.
|
|
Nov 12, 2015 at 8:02 | history | edited | m_goldberg | CC BY-SA 3.0 |
deleted 4 characters in body
|
Nov 12, 2015 at 7:56 | history | answered | m_goldberg | CC BY-SA 3.0 |