Subject: Re: HUGE_VAL
To: Patrick Welche <prlw1@newn.cam.ac.uk>
From: Lars Hecking <lhecking@nmrc.ucc.ie>
List: current-users
Date: 04/14/2000 11:53:31
Patrick Welche writes:
> >From math.h:
> extern const char __infinity[];
> #define HUGE_VAL        (*(const double *)(const void *)__infinity)
> 
> 1) Does the following test prog make sense? (It does say double above...)
> 
> #include <math.h>
> #include <stdio.h>
> 
> int main()
> {
>   printf(" HUGE_VAL: % g\n", HUGE_VAL);
>   printf("-HUGE_VAL: % g\n",-HUGE_VAL);
> 
>   return 0;
> }
> 
> 2) What am I missing?
> 
> Output on i386:
>  HUGE_VAL:  Inf
> -HUGE_VAL: -Inf
 
 For comparison: same on Solaris and IRIX 6.3. DU 4.0f says
 +/- 1.79769e+308, resp.

> PS - I'd be interested to see the output from an m68k port user...

 Will run it first thing tonight when I get home.