Why does
N[Log[10, 6613], 20]
give the requested 20 digits of precision
(* $3.8203985227039816648$ *)
but
N[Log[10, 6613.3], 20]
does not?
(* $3.82042$ *)
The documentation for Log
states:
"The precision of the output tracks the precision of the input" so one might expect more digits in the output for the latter case.
Log[10, 6613.3]
immediately evaluates to3.82042
, thenN[..., 20]
is applied only afterwards.N
won't influence the calculation of the logarithm. TryLog[10, 6613.3`20]
. This also evaluates immediately, but since it starts with an arbitrary precision (not machine precision) number, precision tracking kicks in. Thus the result will not have a precision of exactly 20, but it will be close. $\endgroup$