On Tuesday, October 21, 2014 10:44:30 PM UTC-4, Stefan Karpinski wrote: > > I think you can get it with 1.0/0.0 even if INFINITY isn't defined. >
Even better, you can just use HUGE_VAL. HUGE_VAL (defined in C89) is equivalent to INFINITY on all IEEE machines (i.e. all modern CPUs); I don't really understand why they bothered to add INFINITY in C99. IIRC, some compilers will complain about 1.0/0.0 literals; they don't like constants that throw floating-point exceptions.
