
25 Jul
2006
25 Jul
'06
12:34 p.m.
Johan RĂ¥de wrote:
I agree that having the three functions
is_infinite (or maybe is_infinity) is_plus_infinity is negative_infinity
is a good idea.
John's proposal has the function is_infinity, in the sense of both plus and minus infinity, but not the functions is_plus_infinity and is_negative_infinity.
Maybe John's intention is that one should test for plus infinity by writing is_infinity(x) && x >= 0 That would work, but is probably inefficient.
For is_plus_infinity why not just: x > std::numeric_limits<T>::max() ? John.