You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indeed, this reveals comparisons of float results using =.
I've also been able to reproduce locally (may require bumping count as nan is produced relatively rarely with Gen.float).
The most interesting part is that the result is sometimes printed as -nan:
### OCaml runtime: debug mode ###
### set OCAMLRUNPARAM=v=0 to silence this message
random seed: 534962093
generated error fail pass / total time test name
[✗] 982 0 1 981 / 10000 0.0s STM Float Array test sequential
[✓] 1 0 1 0 / 10000 11.0s STM Float Array test parallel
--- Failure --------------------------------------------------------------------
Test STM Float Array test sequential failed (7 shrink steps):
Set (6, nan)
To_seq
+++ Messages ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Messages for test STM Float Array test sequential:
Results incompatible with model
Set (6, nan) : Ok (())
To_seq : [1.; 1.; 1.; 1.; 1.; 1.; -nan; 1.; 1.; 1.; 1.; 1.; 1.; 1.; 1.; 1.]
Looking more into this, it seems the cmd printer is using Util.Pp.float which uses fprintf fmt "%F"
whereas the result printer is using the Float combinator printer relying on QCheck.Print.float which uses string_of_float. We should probably use the same printer in both arguments and results to avoid false alarms.
CI summary: 16 workflows failed all due to nanfloat comparisons using =:
32bit 5.3
32bit 5.4
Bytecode 5.4
FP 5.4
Linux 5.3
Linux 5.3 debug
Linux trunk debug <--- CI log contains 223k lines of updating memprof. and is then cut off since ocaml/ocaml#14057
Linux-ARM64 5.3
Linux-ARM64 5.4
macOS-ARM64 trunk
MinGW bytecode 5.3
MinGW bytecode trunk
MSVC 5.4
MSVC bytecode 5.4 (still going)
musl 5.3
musl 5.4
Out of 50 workflows 16 failed all with a genuine error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The QCheck 0.26 release https://github.com/c-cube/qcheck/releases/tag/v0.26 changes the distribution of the
floatgenerator to avoid blind spots: c-cube/qcheck#350.As we have a couple of tests with
floats this PR bumps the QCheck version to see if we've missed anythingfloat-related.