In the French manual (https://www-fourier.ujf-grenoble.fr/~pa ... tml#sec161) it discusses the connection between the number of displayed digits, the number of stored digits, the value of Digits and the second argument of evalf.
One example says that with Digits equal to 7,
In: evalf(sqrt(2),3)
will display
Out: 1.41
but be stored as 1.414, as shown by
In: evalf(sqrt(2),3) - 1.414214
resulting in
Manual out: -0.000214
However, with Digits equal to 7, although
In: evalf(sqrt(2),3)
does display
Out: 1.41,
evaluating (with the latest version)
In: evalf(sqrt(2),3) - 1.414214
results in
Actual out: -0.004214
so evalf(sqrt(2),3) is really 1.41
Also, with Digits still equal to 7, it shows that
In: evalf(sqrt(2),10) will display as
Out: 1.414214
since the display depends on Digits, not 10. And evalf(sqrt(2),10) does just show the 7 digits
1.414214, but
In: evalf(sqrt(2),20)
will display 20 digits
Out: 1.4142135623730950488.
I'm thinking that maybe the handling of evalf has changed since the manual was written, but what are the new rules?
Jay
evalf with two arguments
Modérateur : xcasadmin
Re: evalf with two arguments
Probably yes, we need to fix the manual. I think that's beacuse evalf was using n digits after the decimal point (like round) and is now using a total number of digits, which is more consistent.
Longfloats display does not depend on Digits.
Longfloats display does not depend on Digits.