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
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
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'
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
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
= 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
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
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
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
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
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-
$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
--- 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");
>
>
> -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.
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]
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 =
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
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
18 matches
Mail list logo