While looking at implementing floating point modulus in double-precision on an x86 CPU, I found the FPREM instruction and proceeded to test the practical precision in some cases, one being
1e48 mod 1.5
The FPREM implementation returns 1 as result, which looked "right" to me (as 1e48 is not a multiple of 3).
Then I checked against Wolfram Alpha but it returned 0 (http://www.wolframalpha.com/input/?i=1e48+mod+1.5%29)... now I am having doubts, is Wolfram failing or are FPREM and my expectation wrong?
Also in case Wolfram is failing, is there an online high-precision resource I could use to compare floating point modulus precision?
10^48-floor(10^48/1.5)*1.5
$\endgroup$