Tels schrieb am 2001-09-14, 21:13:

Hallo Tels,

>On 14-Sep-01 Gerrit Haase tried to scribble about:
>> some tests fail:
>
>Arg. Will look into it.
>
>> ================
>> $ make test
>> PERL_DL_NONLAZY=1 /bin/perl -Iblib/arch -Iblib/lib
>> -I/usr/lib/perl5/5.6.1/cygwin-multi -I/
>> usr/lib/perl5/5.6.1 -e 'use Test::Harness qw(&runtests $verbose);
>> $verbose=0; runtests @AR
>> GV;' t/*.t
>> t/bigfltpm..........ok
>> t/bigintpari........ok
>> t/bigintpm..........FAILED test 1427
>>         Failed 1/1439 tests, 99.93% okay
>> Failed Test  Status Wstat Total Fail  Failed  List of Failed
>
>It is the second of these two tests:
>
>$z = 1050000000000000;          # may be int on systems with 64bit?
>$x = Math::BigInt->new($z); ok ($x->bsstr(),'105e+13'); # not 1.03e+15
>
>$z = 1e+129;                    # definitely a float (may fail on UTS)
>$x = Math::BigInt->new($z); ok ($x->bsstr(),$z); 
>
>It seems that Cygwin can not handle 1e+129 :-(
>
>What is the biggest number Cygwin can handle (aka what is the float size
>there)?

/*
 * The characteristics of float.
 */

/* The radix for floating point representation. */
#define FLT_RADIX       2

/* Decimal digits of precision. */
#define FLT_DIG         6

/* Smallest number such that 1+x != 1 */
#define FLT_EPSILON     1.19209290e-07F

/* The number of base FLT_RADIX digits in the mantissa. */
#define FLT_MANT_DIG    24

/* The maximum floating point number. */
#define FLT_MAX         3.40282347e+38F

/* Maximum n such that FLT_RADIX^n - 1 is representable. */
#define FLT_MAX_EXP     128

/* Maximum n such that 10^n is representable. */
#define FLT_MAX_10_EXP  38

/* Minimum normalized floating-point number. */
#define FLT_MIN         1.17549435e-38F

/* Minimum n such that FLT_RADIX^n is a normalized number. */
#define FLT_MIN_EXP     (-125)

/* Minimum n such that 10^n is a normalized number. */
#define FLT_MIN_10_EXP  (-37)


/*
 * The characteristics of double.
 */
#define DBL_DIG         15
#define DBL_EPSILON     1.1102230246251568e-16
#define DBL_MANT_DIG    53
#define DBL_MAX         1.7976931348623157e+308
#define DBL_MAX_EXP     1024
#define DBL_MAX_10_EXP  308
#define DBL_MIN         2.2250738585072014e-308
#define DBL_MIN_EXP     (-1021)
#define DBL_MIN_10_EXP  (-307)


/*
 * The characteristics of long double.
 * NOTE: long double is the same as double.
 */
#define LDBL_DIG        15
#define LDBL_EPSILON    1.1102230246251568e-16L
#define LDBL_MANT_DIG   53
#define LDBL_MAX        1.7976931348623157e+308L
#define LDBL_MAX_EXP    1024
#define LDBL_MAX_10_EXP 308
#define LDBL_MIN        2.2250738585072014e-308L
#define LDBL_MIN_EXP    (-1021)
#define LDBL_MIN_10_EXP (-307)


>I think I need to adjust Calc.pm for this, too. The code to determine the
>maximum safe integer number base migh guess wrong. 
>
>The Math::Pari failure is something I can do little about, because if Perl
>(via underlying OS/lib) can not handle so large numbers, I might have no
>recurse except skipping that test there :-/
>
>Or, could I just use 2^64 and hope that it is not an integer (no 128 bit
>systems out there ;), but always fits into a float on any system?
>
>The test is not critical, anyway.

Thanks,

Gerrit


-- 
=^..^=

Reply via email to