Subject: Re: HUGE_VAL
To: Ignatios Souvatzis <>
From: Sean Doran <>
List: current-users
Date: 04/14/2000 15:28:25
Ignatios Souvatzis <> writes:

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

Which is to be expected.

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:  3.40282e+38
-HUGE:  3.40282e+38


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