I am learning precision and accuracy in Mathematica numerics. I need little help to try to understand why I am not getting the same result I expect in the following. I have 2 numbers, each is 50 decimal point and differ by the 50'th decimal point.
So when I take the difference, I expected to get
1/10000....0000 with 50 zeros there. I did make sure the numbers are entered using
So I must be doing something wrong. Or not doing something in addition to this. There are so many options related to accuracy and precision in Mathematica, and it can get confusing for me what to set and to what value. Here is the code
r0=SetPrecision[0.12345678901234567890123456789012345678901234567890,Infinity]; r1=SetPrecision[0.12345678901234567890123456789012345678901234567891,Infinity]; r1-r0
(I also tried
SetPrecision[r1-r0,Infinity], no difference)
The equivalant Maple code is
Digits:=100: #for display r0:=0.12345678901234567890123456789012345678901234567890: r1:=0.12345678901234567890123456789012345678901234567891: r1-r0;
Question is: How can one obtain the same result as shown in Maple output?
I am using 11.1 on windows 7.