Need a std::numeric_limits<T>::lowest() equivalent

John Colvin via Digitalmars-d digitalmars-d at puremagic.com
Sat Jan 21 01:54:00 PST 2017


On Saturday, 21 January 2017 at 00:03:11 UTC, Xavier Bigand wrote:
> std::numeric_limits<T>::lowest() is describe as "A finite value 
> x such that there is no other finite value y
>        *  where y < x."

According to what I presume that definition means ("no other 
finite value" means "no other finite value representable in T"), 
that's just IntegerT.min or -FloatingT.max respectively. Shared 
numeric logic between integer and floating types is generally a 
bad idea in my experience, what's a compelling use-case for 
"lowest"?


More information about the Digitalmars-d mailing list