Question: "evalf" output depends upon style of input?

In preparing to sample problems, I came across this difference in an output depending upon the input type: 2d Input vs. Maple Input. Is there a typo on my part?


 

restart; kernelopts(version); Digits

`Maple 2020.1, X86 64 WINDOWS, Jun 10 2020, Build ID 1474787`

 

10

(1)

Very happy with the output of the following line:

x := evalf[30](3.0^1.2)

3.73719281884655197790004100992

(2)

 

But I'm confused about the output of the next line. Is it a limit to the calculation or a display problem?

a := evalf[30](3.0^(1.2))

3.737192819

(3)

 

and yet this next output looks fine:

b := evalf[30]( exp( 1.2 * ln(3)))

3.73719281884655197790004100989

(4)

 

Fortunately, there appears to be no difference between x and b:

evalf[30](x-b)

0.3e-28

(5)

 

But these next  lines suggest there is an actual limit in the calculation of a.

evalf[30](a-b)

0.15344802209995899011e-9

(6)

evalf[30](a - b);

0.15344802209995899011e-9

(7)

Note - when Digits is set to 30, the calculation difference between x and a disappears.

``


 

Download 2020_evalf_digits.mw

Please Wait...