Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
secondcoming
· 5y ago · 0 comments
Out of curiosity... did you ever fall into the trap of using
numeric_limits<T>::min()
instead of
numeric_limits<T>::lowest()
? Because I did.
Comments
[–]
saagarjha
5y ago
The distinction is only relevant for floating point types, is it not?
[–]
secondcoming
OP
5y ago
Yes, I believe so.
[–]
SloopJon
5y ago
Yeah, min() returns the most negative int, so it seems like it should do the same for float. Then the float with the least magnitude could have been, say, smallest().