>>>>> "PD" == Patrick Dupre <patrick.du...@york.ac.uk> writes:
PD> On Sun, 19 Jun 2011, Uri Guttman wrote: >> use bignum; >> >> $x = 2 + 4.5,"\n"; # BigFloat 6.5 >> >> { >> no bignum; >> print 2 ** 256,"\n"; # a normal Perl scalar now >> } >> PD> This is what I tried first, the point is when you quite the PD> enclosure, even if you use no bignum, since the variables have declared PD> previous as bignumn any calculation using such variables previous PD> declared as bignum will be store in variables of the same type. PD> This make sense for perl, only a cast should allow changing the size. PD> In addition, the physical size (SV) of a bignum seems a lot bigger PD> than a usual NV. as rob said, you can always sprintf the bignum and then numify it into a regular float (where bignum isn't in effect). slow but it should work unless the bignum exponent is actually larger than any supported float can handle. uri -- Uri Guttman ------ u...@stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/