Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: 7c85ab5c9947e71b5b26c273b662e83394157e43 https://github.com/Perl/perl5/commit/7c85ab5c9947e71b5b26c273b662e83394157e43 Author: TAKAI Kousuke <62541129+t-...@users.noreply.github.com> Date: 2024-06-12 (Wed, 12 Jun 2024)
Changed paths: M sv.c M t/op/numconvert.t Log Message: ----------- sv.c: Make sv_2nv_flags() not to convert stringified IV_MIN to NV For !NV_PRESERVES_UV case (e.g. IV and NV are both 64-bit, as in typical x86_64 build), sv_2nv_flags() used to cache only NV for stringified IV_MIN ("-9223372036854775808" in such case). This leads such string to be treated as (possibly unintentionally rounded) NV in subsequent references: $ perl -wle 'my $x = my $y = "-9223372036854775808"; my $z = $x + 1.23; print $x + 0; print $y + 0' -9.22337203685478e+18 -9223372036854775808 $ This change avoid this by not treating IV_MIN specially, with new macros added in b9b8c7d2e8567b5c6652a643b4a44af22e06f2bc. 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