M
Mark P
I have a float value which should be initialized to the minimum allowed
value (analogous to -infinity). I discovered today (thank you, unit
tests!) that numeric_limits<float>::min() returns a very small number
greater than 0, rather than the extremely negative number which I want.
Is it safe to use -numeric_limits<float>::max() for this purpose, or
is something else preferred?
Thanks,
Mark
value (analogous to -infinity). I discovered today (thank you, unit
tests!) that numeric_limits<float>::min() returns a very small number
greater than 0, rather than the extremely negative number which I want.
Is it safe to use -numeric_limits<float>::max() for this purpose, or
is something else preferred?
Thanks,
Mark