Subject: | Math::GMP needs bool overload |
Math::GMP->new($obj) can fail if $obj is already a Math::GMP object for a large number. This is because in new we have C< my $ival = shift || 0; >, and the boolean check falls back to the intify overload in the absence of an explicit bool overload (and the intify is truncating).
Attached change is enough to fix that (forcing it to use the <=> overload instead); intify() itself could also do with improvement, but I haven't attempted that at this point.
Hugo
Subject: | Math-GMP-bool-overload |
Message body not shown because it is not plain text.