# Precision digits in Log[] [duplicate]

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.

• In addition to what sacratus said: Log[10, 6613.3] immediately evaluates to 3.82042, then N[..., 20] is applied only afterwards. N won't influence the calculation of the logarithm. Try Log[10, 6613.320]. 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. Apr 8, 2015 at 0:14

Observe

In:

Precision[6613]


Out:

Infinity


In:

Precision[6613.3]


Out:

MachinePrecision
`

The first number is an integer and has infinite precision the second number is a numerical value that is represented with a finite precision.