Subject: Re: HUGE_VAL
To: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
From: Sean Doran <smd@ebone.net>
List: port-arm32
Date: 04/14/2000 15:28:25
Ignatios Souvatzis <ignatios@cs.uni-bonn.de> writes:

> niud 9% ./huge
>  HUGE_VAL:  Inf
> -HUGE_VAL: -Inf

Which is to be expected.

/usr/include/math.h:
extern __const char __infinity[];
#define HUGE_VAL        (*(__const double *)(__const void *)__infinity)
...
#define HUGE            MAXFLOAT

A small addition to the test program yields:

: sean (es) ; ./a.out
 HUGE_VAL:  Inf
-HUGE_VAL: -Inf
 HUGE:  3.40282e+38
-HUGE:  3.40282e+38

        Sean.

P.S.: This also works with the same sort of results on:
        Linux 2.2.13, IRIX 6.3, and FreeBSD 3.3-RELEASE