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
OpenIndiana: failing test float #7685
Comments
Comment author: @xavierleroy I'm not sure who is wrong: the %f format of OCaml that relies on the C library sprintf() function to print infinities and other special FP values (unless HAS_BROKEN_PRINTF is defined), or the test because it assumes a specific printout for those values. At any rate the problem is not specific to OpenIndiana, it's just triggered by OpenIndiana. |
Comment author: @xavierleroy It gets worse. According to C99: A double argument representing an infinity is converted in one of the styles So, OpenIndiana's "Inf" is not C99-compliant. But assuming "inf" to be the result of the test is wrong as well... |
Comment author: grueni Maybe a solution is to use a function to test for infinity. This should solve the differences in the implementations. I have no idea how to do it in ocaml. int main() And the reference would be: |
Comment author: @rixed Many people, including myself, expect %F to print in a format not only compatible with float_of_string, but also with the OCaml parser. Meaning infinity should be printed as "infinity" and "neg_infinity". This seems to be a problem that keeps reappearing: Would that change be accepted? |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
Original bug ID: 7685
Reporter: grueni
Status: confirmed (set by @xavierleroy on 2017-12-20T16:20:17Z)
Resolution: open
Priority: normal
Severity: minor
Platform: OpenIndiana
OS: OpenIndiana
OS Version: Hipster
Version: 4.06.0
Category: configure and build/install
Bug description
The test fails because the first letter of the result is capitalized.
Additional information
--- ocaml-4.06.0/testsuite/tests/basic/float.reference.orig 2017-12-04 18:33:56.140895262 +0000
+++ ocaml-4.06.0/testsuite/tests/basic/float.reference 2017-12-04 18:34:06.093706170 +0000
@@ -1 +1 @@
-1./.0. = inf
+1./.0. = Inf
The text was updated successfully, but these errors were encountered: