PHP has an "INF" (infinite) double constant(php.net)
php.net
PHP has an "INF" (infinite) double constant
http://php.net/manual/en/math.constants.php
2 comments
This allows me to simplify the code a lot in all that cases I deal with non-bounded ranges.
It's easy enough to create these values and assign them to variable names. Both INF and NAN are available as unique codes defined in IEEE 754:
http://en.wikipedia.org/wiki/IEEE_floating_point
Quote: "The standard defines arithmetic formats: sets of binary and decimal floating-point data, which consist of finite numbers (including signed zeros and subnormal numbers), infinities, and special "not a number" values (NaNs)"
http://en.wikipedia.org/wiki/IEEE_floating_point
Quote: "The standard defines arithmetic formats: sets of binary and decimal floating-point data, which consist of finite numbers (including signed zeros and subnormal numbers), infinities, and special "not a number" values (NaNs)"