Re: GMP for Math::BigInt not working ?

2007-06-03 Thread Mumia W.
On 06/03/2007 10:42 AM, Mumia W. wrote: [...] the docs say that the Math::GMP module is not used by Math::BigInt::GMP. Math::BigInt::GMP uses the binary GMP library if it's installed, so perhaps you could look there. Duh. Of course you have the binary GMP library installed--othe

Re: GMP for Math::BigInt not working ?

2007-06-03 Thread Mumia W.
On 06/03/2007 08:40 AM, David Unric wrote: Any idea why the following code falls back to slow standard Perl implementation of BigInt module instead of highspeed GMP being used ? (no warnings, GMP module _is_ installed) --- use Math::BigInt lib => 'GMP'; m

GMP for Math::BigInt not working ?

2007-06-03 Thread David Unric
Any idea why the following code falls back to slow standard Perl implementation of BigInt module instead of highspeed GMP being used ? (no warnings, GMP module _is_ installed) --- use Math::BigInt lib => 'GMP'; my $fac = Math::BigInt->new('4000'

Re: Math::BigInt maximum value

2006-02-08 Thread Tom Phoenix
On 2/8/06, Rob Benton <[EMAIL PROTECTED]> wrote: > What are the limitatins of Math::BigInt? I ask because I have a c++ > program that outputs an unsigned 64 bit integer that my perl script > picks up. Am I safe to use BigInt for this on all platforms? Have you seen the wording

Math::BigInt maximum value

2006-02-08 Thread Rob Benton
What are the limitatins of Math::BigInt? I ask because I have a c++ program that outputs an unsigned 64 bit integer that my perl script picks up. Am I safe to use BigInt for this on all platforms? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

XML::Simple + Math::Currency / Math::BigInt problem

2005-10-17 Thread Peter Rabbitson
= Math::Currency->new ('1'); my $string = XMLout ( { number => $number } ); dies with this: Can't call method "as_number" on unblessed reference at /usr/share/perl/5.8/Math/BigFloat.pm line 129. If I change Math::Currency to Math::BigInt - the result is slightly

Re: Math::BigInt

2005-03-16 Thread JupiterHost.Net
my $x = Math::BigFloat->new(2); Math::BigFloat->precision(5); # 5 digits max my $y = $x->copy()->bdiv(3); # will give 0.6 print Dumper $y; The docs says "will give 0.6" so how does one get $y to give you that? That is what I can't seem to find and the Dump of $y doe

Re: Math::BigInt

2005-03-16 Thread Jay Savage
On Wed, 16 Mar 2005 13:39:34 -0600, JupiterHost.Net <[EMAIL PROTECTED]> wrote: > Hello, > > My goal is to divide two whole numbers and get the results to a given > number of decimals. [cut] > #!/usr/bin/perl > > use strict; > use warnings; > use Math::BigFloat; > use Data::Dumper; [cut] > my

Re: Math::BigInt

2005-03-16 Thread JupiterHost.Net
Peter Rabbitson wrote: AFAIK perl will handle up to 15 (14 to be exact) precision without any helpers like Math::BigFloat. Then you just use sprintf ('%.Xf', $var) where X is the precision you want. Keep in mind that standard rounding is enforced (.4 - .5 as breakpoint) Thanks Peter I think I w

Re: Math::BigInt

2005-03-16 Thread Peter Rabbitson
AFAIK perl will handle up to 15 (14 to be exact) precision without any helpers like Math::BigFloat. Then you just use sprintf ('%.Xf', $var) where X is the precision you want. Keep in mind that standard rounding is enforced (.4 - .5 as breakpoint) Peter > Hello, > > My goal is to divide two

Math::BigInt

2005-03-16 Thread JupiterHost.Net
Hello, My goal is to divide two whole numbers and get the results to a given number of decimals. $ perl -e 'print 2/3,"\n";' 0.667 $ #!/usr/bin/perl use strict; use warnings; use Math::BigFloat; use Data::Dumper; # from http://search.cpan.org/~tels/Math-

Re: Math::BigInt

2001-11-14 Thread Tels
$value *= $factor; >$value =~ s/.$//; # Remove decimal point >print "Value 4: $value.\n"; Fine, but remember that the result is a bare string, not an object. >$value .= $string; # Append string >print "Value 5: $value.\n"; >This outputs: >Value 1: 1000123123.12345

Re: Math::BigInt

2001-10-29 Thread Curtis Poe
--- Frank Newland <[EMAIL PROTECTED]> wrote: > Readers, > > I've been to cpan.org site but some of the pages are not appearing. > what does Math::BigInt do in the following perl line? > > $amount= Math::BigInt ->new("$posted_amount"); > >

RE: Math::BigInt

2001-10-29 Thread Bob Showalter
> -Original Message- > From: Frank Newland [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 29, 2001 11:57 AM > To: [EMAIL PROTECTED] > Subject: Math::BigInt > > > Readers, > > I've been to cpan.org site but some of the pages are not appearing.

Math::BigInt

2001-10-29 Thread Frank Newland
Readers, I've been to cpan.org site but some of the pages are not appearing. what does Math::BigInt do in the following perl line? $amount= Math::BigInt ->new("$posted_amount"); tia, Frank -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Math::BigInt

2001-09-14 Thread Richard J. Barbalace
Gibbs Tanton writes: > You might want to try Math::BigFloat instead. I originally wrote: > I'm trying to perform the following calculation: > $value = ($float + $integer) * 10; > $string = "$value:test"; I now have code like the following: use Math::BigFloat; # Initial values my $float =

RE: Math::BigInt

2001-09-13 Thread Gibbs Tanton - tgibbs
You might want to try Math::BigFloat instead. -Original Message- From: Richard J. Barbalace To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: 9/13/2001 2:17 PM Subject: Math::BigInt Hi. I'm trying to perform the following calculation: $value = ($float + $integer) * 10; $s

Math::BigInt

2001-09-13 Thread Richard J. Barbalace
ng by 1,000,000 causes it to exceed perl's integer range. Thus I would like to use Math::BigInt, but I am having trouble getting it to work with the floating point value. For example, if $value is 1234567890123456.123456, and $integer is 1, then I want the final resulting