Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: ba0d3138eab422f41d682bceda32d9a5da1e0794 https://github.com/Perl/perl5/commit/ba0d3138eab422f41d682bceda32d9a5da1e0794 Author: TAKAI Kousuke <62541129+t-...@users.noreply.github.com> Date: 2024-04-14 (Sun, 14 Apr 2024)
Changed paths: M inline.h M t/op/numconvert.t Log Message: ----------- inline.h (S_lossless_NV_to_IV): don't convert inaccurate integral value to IV S_lossless_NV_to_IV() should be consistent with SvIV_please_nomg() which will not implicitly convert the NV that is not accurate up to the decimal point, i.e., >= (1 << NV_PRESERVES_UV_BITS) in magnitude, to the IV even if it has no fractional part (looks like integer). Mismatch of these conversions used to cause inconsistency like this: % perl -le 'print 0x1p60 + 0' 1.15292150460685e+18 % perl -le 'print 0x1p60 + 0.0' 1152921504606846976 t/op/numconvert.t: Added tests for this. To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications