Re: bignum incompatible with looks_like_number() ???




"C B" <cb0@xxxxxxx> wrote in message news:cb0-0DBFAF.08135629062007@xxxxxxxxxxxxxxxxxxxxx
..
..

Well, I started by reading this carefully:
http://perldoc.perl.org/bignum.html

As it says:
------------------------------------
If you do
use bignum;

at the top of your script, Math::BigFloat and Math::BigInt will be loaded and any constant number will be converted to an object (Math::BigFloat for floats like 3.1415 and Math::BigInt for integers like 1234).
------------------------------------

That's about all it does, all it ever has does, and all it ever will do.

It's just a convenient way of working with the Math::Big* modules. It doesn't mean that perl has suddenly been transformed into something that natively handles numbers with magically-extended precision. If you want the extended precision you still have to stay within the realm of the Math::Big* modules - or you can use other packages that provided extended precision (Math::Pari, Math::GMP, Math::MPFR, etc.)

There's no mention of 'looks_like_number' anywhere on that page.


Then I found a bunch of stuff like this:
http://rt.perl.org/rt3//Public/Bug/Display.html?id=27606


That's just a discussion of a bug in looks_like_number() - whereby looks_like_number(undef) returned true. I don't see the relevance of that in the context of this thread. The bug is fixed in perl 5.8.8 (and perhaps earlier - I haven't checked).

Cheers,
Rob

Cheers,
Rob

.