Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stringif. of Complex failing on negative zero in img. part
A negative zero goes through <0e0 conditional, at which point it ends up as -0 via p6box_s, concatenated with a '+'. 1/-0e0 == -Inf, so use that knowledge to figure out the sign of the zero. The nqp::abs_n() op seemed to have no point in there to me (and is slower), so I removed it. Fixes RT#130329: https://rt.perl.org/Ticket/Display.html?id=130329
- Loading branch information
a3735af
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, this was my solution:
but that fails test #10 in t/spec/S32-num/negative-zero.t, but I think the test is wonky? Why not use "ok foo" instead of "is-deeply foo, True" ?