Subject: | numify() doesn't handle infs and nans |
The numify() method converts objects into scalar values, but it doesn't handle infs and nans:
$ perl -Mautobox::universal=type -MMath::BigInt -wle '$x = Math::BigInt -> binf() -> numify(); print $x, " is a ", type($x)'
inf is a STRING
$ perl -Mautobox::universal=type -MMath::BigInt -wle '$x = Math::BigInt -> bnan() -> numify(); print $x, " is a ", type($x)'
NaN is a STRING
Compare this with Inf() in Math::Complex:
$ perl -Mautobox::universal=type -MMath::Complex=Inf -wle '$x = Inf; print $x, " is a ", type($x)'
inf is a FLOAT