Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect Num sequence test / Unfudge JVM
The way JVM stringifies is accurate and the reason more stringifies the way the author of the test tested it is due to loss of precision bug. While MoarVM's current stringification is used by `python2` and `perl`, I don't believe it's correct for our purposes: 1) RT#127184 [^1] shows problem with current stringification not roundtripping .EVAL.perl 2) RT#132330 [^2] shows bugs with equalities and Set/Bag/Mix types due to stringification used in Num.WHICH 3) RT#127182 [^3] is a Perl 5 ticket enumerating a couple of issue due to their way of stringification (almost same as ours) 4) `python3` actually switched to stringifying the Nums the JVM's way. 5) The same stringification format is performed by ruby as well. 6) Not losing precision in stringification of Num will let us more easily show the `.1 + .2 == .3` trick and explain what problem the Rats solve. Currently, `say .1e0 + .2e0` prints `0.3`, which makes the equation look confusingly wrong. When MoarVM is fixed to correctly stringfy Nums, the output will show where the "problem"'s coming from. [1] https://rt.perl.org/Ticket/Display.html?id=127184 [2] https://rt.perl.org/Ticket/Display.html?id=132330 [3] https://rt.perl.org/Ticket/Display.html?id=127182
- Loading branch information