What is this?
XKCD continues to post some great comics, often relating to math. Check this one out:
And yes, Maple does get it right
This post was generated using the MaplePrimes File ManagerView 1_epipi.mw on MapleNet or Download 1_epipi.mwView file details
You showed a result from Maple of 19.99909999 .
Presumably that was done at the default value of Digits=10.
But, evalf[11](exp(Pi)-Pi) returns as 19.999099979 .
So why isn't the the first result, at the default value of Digits=10, instead 19.99909998 ?
acer
Another interesting comparison is:
(Digits is set to default value of 10.)
evalf(exp(Pi)-Pi); 19.99909999
evalf[9](exp(Pi)-Pi); 19.9991000
evalf[10](exp(Pi)-Pi); 19.99909998
evalf[11](exp(Pi)-Pi); 19.999099979
evalf[12](exp(Pi)-Pi); 19.9990999792
evalf[13](exp(Pi)-Pi); 19.99909997919
>> format long >> exp(pi)-pi ans = 19.999099979189474 >> maple('evalf(exp(Pi)-Pi)') ans = 19.999099979189475767266442984668
who's right?
XKCD, he is always putting up great comics.
Comments
off by how many ulps?
You showed a result from Maple of 19.99909999 .
Presumably that was done at the default value of Digits=10.
But, evalf[11](exp(Pi)-Pi) returns as 19.999099979 .
So why isn't the the first result, at the default value of Digits=10, instead 19.99909998 ?
acer
Another interesting comparison
Another interesting comparison is:
(Digits is set to default value of 10.)
evalf(exp(Pi)-Pi);
19.99909999
evalf[9](exp(Pi)-Pi);
19.9991000
evalf[10](exp(Pi)-Pi);
19.99909998
evalf[11](exp(Pi)-Pi);
19.999099979
evalf[12](exp(Pi)-Pi);
19.9990999792
evalf[13](exp(Pi)-Pi);
19.99909997919
matlab point of view
>> format long >> exp(pi)-pi ans = 19.999099979189474 >> maple('evalf(exp(Pi)-Pi)') ans = 19.999099979189475767266442984668who's right?
thats great
XKCD, he is always putting up great comics.