The binary (& decimal ) approximation to 0.3126 is
1407825243516017 / 4503599627370496
0.3125999999999999889865875957184471189975738525390625
Myrna...If you are interested in the "other" program, there are a few ways
to do it. Here are just two quick examples:
n = 0.3126;
One way to increase the precision of a Machine-Precision number (to an
arbitrary-precision number) is to pad it with zeros in base two. Adding
zeros in base two are almost never zeros in base 10. Here, we get the same
answer.
v = SetPrecision[n, 54]
0.3125999999999999889865875957184471189975738525390625
And if we fully rationalize this number, we get the same rational number.
Rationalize[v, 0]
1407825243516017 / 4503599627370496
However, we are cautioned that we could get different results on different
computer systems.
Just another way would be to convert the machine-precision number to base 2
as best we can knowing there are rounding issues. Then reconstruct the
number in base 2 back to base 10. We get the same number.
v = FromDigits[RealDigits[n, 2], 2]
1407825243516017 / 4503599627370496
And if we divide it out, we get the same number.
N[v, 54]
0.3125999999999999889865875957184471189975738525390625
For the Op, you may be glad to know that even these programs return the same
number, only they return all 17 digits, while Excel only returns 15 digits.
Here we see all 17 digits. Excel rounds this to 15 digits as you've seen.
v = 0.3126 - 0.3124
0.00019999999999997797
What's interesting is if we ask for the Precision of our value 'n'. We get
a strange number.
N[Precision[v]]
15.954589770191003
We can use Excel to see how this number is generated. We use the 53 digits
as Jerry has mentioned.
=LOG(2,10)*53
Returns:
15.954589770191
I am not familiar with Maple.