|
Boost : |
Subject: Re: [boost] [numeric_limits] min() for floating point versus integers (Was: [xint] Third release is ready, requesting preliminary review)
From: DE (satan66613_at_[hidden])
Date: 2010-05-04 10:47:01
on 04.05.2010 at 18:22
Stewart, Robert wrote :
> DE wrote:
>> Stewart, Robert wrote :
>> > DE wrote:
>> >>
>> >> typedef std::numeric_limits<type> traits;
>> >> const type realy_min = traits::is_integer ? traits::min() :
>> >> -traits::max();
>>
>> > That only works for unsigned types.
>>
>> it does work for bounded signed and unsigned integers, unbounded
>> unsigned integers and also for floating point values (with
>> denormalization)
> Signed integer types use two's complement, so the absolute value of
> the largest positive and largest negative value differs.
so what?
honestly i don't catch your point
-- Pavel P.S. if you notice a grammar mistake or weird phrasing in my message please point it out
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk