On Mon May 18 16:57:25 2020, CHOROBA wrote:
Show quoted text> perl -wE 'use List::Util qw{ product }; say product -1, 1'
> 1483 Floating point exception(core dumped) "${perl[0]}" "$@"
>
> Tested on various 64 bit linux machines (blead, 5.26.1). Works in
> termux (5.30.1 arm-android) (outputs -1).
product 1, -1 works correctly.
From #perl@freenode:
<choroba> eval: use List::Util qw{ product }; product -1, 3
<perlbot> choroba: [Died SIGFPE]
<ilmari> that's "if (i <= IV_MIN / retiv)"
<ilmari> which will overflow if retiv == -1
<gordonfish> Interesting, on a 32-bit centos box, perl -e 'use List::Util qw{ product }; print product -1, 3' yields -3
<gordonfish> choroba: Works (prints -3) on two 32-bit linux machines as well as a 32-bit windows; trying it on a 64-bit windows system caused the whole system to crash..... seems this is a 64-bit problem