|Do you know where your variables are?|
Re^11: subtraction issueby syphilis (Chancellor)
|on Jan 29, 2017 at 08:47 UTC||Need Help??|
In your example above 1 / 526, you posted a result of: 1.9011406844106463 7711435114653113487293012440204620361328125e-3
Yes, in this instance (as also in earlier posts) I'm using mpfr to express the exact base 10 equivalent of the value held by the double.
(And that value held by the double is 1/526, calculated to 53 bits of precision.)
But the actual result (to 100 digits of precision is : 1.9011406844106463 87832699619771863117870722433460076045627376425855513307984790874524714828897338403e-3
Yes, this is a much better approximation of 1/526 than that provided by the double, and a different figure is therefore expected.
We can, of course, use mpfr to give us an approximation of 1/526 to whatever precision we want (so long as the precision does not exceed MAX_PREC):