My system has a HUGE_VAL with positive infinity. Further inspection shows that pikes STRTOD uses HUGE for overflow, with a fallback to HUGE_VAL only if HUGE isn't defined. HUGE is defined on my system to 3.40282347e+38F. I wonder if there's a good reason for STRTOD to use HUGE firsthand.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-02-26 13:38: Subject: Floating point (conversion) bug (affected: v7.4 & v7.5; may be Hilfe only)
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!)