Boost logo

Boost :

From: Johan Råde (rade_at_[hidden])
Date: 2006-07-25 09:02:27

me22 wrote:
> On 7/25/06, Paul Giaccone <paulg_at_[hidden]> wrote:
>> Is "is_infinity" the opposite of "is_finite" or the same as
>> "is_plus_infinity"? The former, I would presume, but the name suggests
>> the latter. This is the ambiguity I mentioned before. The function would
>> be better named "is_infinite", IMO.
> Agreed.
> A few people have mentioned:
>> is_plus_infinity()
>> is_minus_infinity()
> I think positive/negative is better than plus/minus. It's slightly
> longer but fits the terminology I understand as being more "correct".
> std::plus and std::minus also give a precedent for plus/minus being
> operations (addition and subtraction), not classifications for values.
> So I'd vote for these instead:
> is_positive_infinity()
> is_negative_infinity()
> ~ Scott McMurray
> _______________________________________________
> Unsubscribe & other changes:

Agree. Then we have:

   template<class T> bool is_finite(T t);
   template<class T> bool is_normal(T t);
   template<class T> bool is_subnormal(T t);

   template<class T> bool is_infinite(T t);
   template<class T> bool is_positive_infinity(T t);
   template<class T> bool is_negative_infinity(T t);

   template<class T> bool is_nan(T t);
   template<class T> bool is_quiet_nan(T t);
   template<class T> bool is_signalling_nan(T t);

--Johan Råde

Boost list run by bdawes at, gregod at, cpdaniel at, john at