Subject: Cygwin Perl and Module Math::BigInt
From: Tels <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Wed, 14 Nov 2001 19:34:32 +0100 (CET)

-----BEGIN PGP SIGNED MESSAGE-----

Moin,

[sorry for the late reply, I don't read this list]

"T.Phan" <tphan at iqrinc dot com> wrote on Fri, 10 Aug 2001 15:38:11 -0500:

>Hi, 
>  I tried to 'make test' on the the Convert:ASN1 and it kept fail at
>  place where the Math::BigInt always returns NaN.
>
>  I cut out the segment below and ran it and sure enough, it return
>  NaN in Cygwin Perl.  However, the same script return a number in
>  ActiveState Perl:
>
>#--------------------------
>use strict;
>use Math::BigInt;
>
>my $num = Math::BigInt->new(-1 * (1<<24) * (1<<24));
>
>print "$num\n";
>
>exit;
>
>#----- Cygwin perl returns:  NaN
>
>#----- ActiveState perl returns :  -281474976710656
>
> Any idea how to fix this in Cygwin?  Thank in advance!

The scalar probably overflowed and returned "NaN" so that BigInt also
produced a "NaN".

On my Linux 32 bit box it produces the same number than Activestate.

What version of Bigint do you have? And what does Perl print without the
bigInt->new() around the expression?

Thanx in advance,

Tels

- --
 "Why do you go so slowly? Do you think this is some kind of game?"
 PGP key available on http://bloodgate.com/tels.asc or via email.
 perl -MDev::Bollocks -e'print Dev::Bollocks->rand(),"\n"'
 proactively transform compelling infrastructures

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/