-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZArith's built-in test suite reports errors on 64bit Windows (both native and on Cygwin) #25
Comments
Thank you for reporting this issue. I think the computed results are correct, it's just the test itself that is poorly designed. Namely, it prints large FP numbers with
The two printed values look different, but are actually equal when converted back to a double-precision FP number. OCaml delegates the printing of FP numbers to the C standard library, so different C libraries (e.g. Linux vs Cygwin vs Microsoft) can print the same FP number differently. I'll look into making the test more robust. |
Commit 37aeb86 should fix this issue. |
While working on #23, it occurred to me that ZArith's own test suite consistently reports errors on Windows 64 bit builds. I attached the outputs of the zq. exe test binary here:
zarith_test_failures.tar.gz
All tests have been conducted with OCaml 4.06.0 and the latest ZArith on github.
It seems that some floating-point precision is lost on both Windows ports.
Even more disturbing, the results also differ between the Cygwin and the native built.
Platform-specific assembly code does not seem to influence the outcomes.
The text was updated successfully, but these errors were encountered: