Subject: Re: HUGE_VAL
To: Patrick Welche <prlw1@newn.cam.ac.uk>
From: Richard Earnshaw <rearnsha@arm.com>
List: port-arm32
Date: 04/14/2000 11:48:03
This has been fixed. See lib/7829

> 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
> 
> Output on arm32:
>  HUGE_VAL:  1.06048e-314
> -HUGE_VAL: -1.06048e-314
> 
> which doesn't appear to be particularly huge to me.
> 
> Systems: NetBSD-1.4U/i386, egcs-2.91.66; NetBSD-1.4/arm32, egcs-2.91.60
> 
> 
> Cheers,
> 
> Patrick
> 
> PS - I'd be interested to see the output from an m68k port user...