HUGE is missing in math.h

Dave Korn
Tue Jun 28 13:45:00 GMT 2005

----Original Message----
>From: Tim Prince
>Sent: 28 June 2005 13:36

> 64-bit, 80-bit and 128-bit long long are supported in common
> IEEE-compliant compilers, 

  I'm not quite sure what you're getting at here, "long long" is an integer
type.  I'll assume that you meant to say "long double", and I imagine this
would be the same as the reason why Jeff said that "HUGE_VALL is the only
one that is difficult."

  Hmm, since they're all just different sized versions of INFINITY, why
can't we just #define HUGE_VALL ((long double)INFINITY)?  Wouldn't that DTRT
by generating a whatever-the-target's-long-double-size-is-sized INF?

> and there are quite a few machines with a long
> long which is not IEEE-compliant.  If newlib is restricted to just one
> of those categories, it doesn't look like "a thoroughly cross-platform
> solution."

  AFAIUI, IEEE fp is mandated by the ISO C spec, so any system that has a
non-IEEE-compliant long double type needs to be using software fp anyway,
doesn't it?  Does newlib care about support for non-ISO-C-compliant targets?

Can't think of a witty .sigline today....

More information about the Newlib mailing list