Expand your thoughts upon this:
#define INFINITY ((1 << (8*sizeof (int) - 6)) - 4)
Is expanded?
Expand your thoughts upon this:
#define INFINITY ((1 << (8*sizeof (int) - 6)) - 4)
Is expanded?
Why not
numeric_limits<float>::infinity()
or
numeric_limits<double>::infinity()
?
Use numeric_limits
from <limits>
header file, as
numeric_limits<float>::infinity()
See this : http://www.cplusplus.com/reference/std/limits/numeric_limits/