Math::BigFloat doesn't appear to have an as_int() method, and it doesn't look like its AUTOLOAD() will provide a non-trivial one.
There is an as_number() method which does what as_int() is documented to do. Changing the call to that in your code gives:
Documentation bug.$ perl as_int.pl $float is a: Math::BigFloat $int is a: Math::BigInt $float 1.41421356237309504880168872420969807857 $int: 1 $
After Compline,
Zaxo
In reply to Re: Unexpected behavior of a method in BigFloat
by Zaxo
in thread Unexpected behavior of a method in BigFloat
by spiritway
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |