If the C implementation conforms to IEC 60559 (which it acknowledges by defining __STDC_IEC_559__), then HUGE_VAL shall be positive infinity.
If IEC 60559 is _not_ supported, the C standard only requires that it is "a positive double constant expression" though. So in this case it could theoretically be 1.0...
Also note that if you're using long doubles, HUGE_VALL should be used, not HUGE_VAL.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2003-02-26 13:16: Subject: Floating point (conversion) bug (affected: v7.4 & v7.5; may be Hilfe only)
The problem was in STRTOD in port.c. Upon underflow it reset the pointer to the beginning (but not for overflow). I've changed that.
The overflow case is because it stores HUGE_VAL which seems to be different from infinity. Is that correct?
/ Martin Stjernholm, Roxen IS