Ondra said:
Greg napsal:
Question was, how to check for infinity (which I understand positive
infinity as 1 is understand +1), not how to check for positive or
negative infinity.
The standard routine, isinf() in <math.h> tests for whether its
argument has an infinite value. Therefore isinf() returns true when
called with either positive or negative infinity, because both are
infinite values.
Implementing another isinf() function that performs a similar, but
different test, would just cause confusion - at best. A programmer
would have to make sure which isinf() is being called in a particular
fil - just to know what its return value means.
Greg