Re: bignum 0.22
- From: gamo <gamo@xxxxxxxxxxxx>
- Date: Fri, 6 Jul 2007 10:53:20 +0200
On Fri, 6 Jul 2007, Mumia W. wrote:
On 07/05/2007 10:08 PM, Sisyphus wrote:Because it's simple to use. It overloads any operation.
"Mumia W." <paduille.4061.mumia.w+nospam@xxxxxxxxxxxxx> wrote in message
news:hq7ji.3972$Od7.1277@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On 07/05/2007 04:36 AM, gamo wrote:
On Thu, 5 Jul 2007, Sisyphus wrote:
"gamo" <gamo@xxxxxxxxxxxx> wrote in message
news:Pine.LNX.4.64.0707041540080.19628@xxxxxxxxx
HelloWhat is the problem ? (I don't see it.)
I found a problem related with calculating Catalan's numbers
Cheers,
Rob
The problem is that this output lacks precision aparently
216489185503133990863274261791925599831200000000000000000000
853702637172735926234421145556838686126800000000000000000000
3366939372774715522158184331074634818182000000000000000000000
[...]
You can set the "accuracy" of the bignum module. Read "perldoc bignum"
Oh, yes ... I should've realised.
Is that a bug in bignum ? I didn't see it documented anywhere that there was
a default "accuracy" set.
The same issue does not arise if you explicitly 'use Math::BigInt;'.
Cheers,
Rob
Yes, I also noticed that Math::BigInt (or "bigint") works right out of the
box.
Evidently "bignum" has more to do and is more complicated, and consequently,
has more bugs. In this case, I don't know if the bug is in the documentation
or code; however, I think that the default accuracy should be given in the
POD.
Nonetheless, it can be queried by calling Math::BigFloat->accuracy().
Gamo, why did you choose bignum rather than bigint?
Fire and forget. No OOP nor especial commands.
If I need to use only BigInt, I'll check GMP::Mpz or Math::PARI, too.
PARI is another kind of animal, because it does functions.
Best regards,
--
http://www.telecable.es/personales/gamo/
perl -e 'print 111_111_111**2,"\n";'
.
- Follow-Ups:
- Re: bignum 0.22
- From: Mumia W.
- Re: bignum 0.22
- References:
- bignum 0.22
- From: gamo
- Re: bignum 0.22
- From: Sisyphus
- Re: bignum 0.22
- From: gamo
- Re: bignum 0.22
- From: Mumia W.
- Re: bignum 0.22
- From: Sisyphus
- Re: bignum 0.22
- From: Mumia W.
- bignum 0.22
- Prev by Date: Re: A lib Net::FTP question.(Transfer file to OpenVMS)
- Next by Date: Re: A lib Net::FTP question.(Transfer file to OpenVMS)
- Previous by thread: Re: bignum 0.22
- Next by thread: Re: bignum 0.22
- Index(es):
Relevant Pages
|
|