![]() |
POSITIVE_ZERO | Constant (Pseudo-constant) |
math.h, timath.h |
Represents an infinitely small quantity which is known to be always non-negative.
In opposite to UNSIGNED_ZERO, POSITIVE_ZERO
is an infinitely
small quantity which is known to be always non-negative. It can be imagined as "the
smallest positive real number", altough something like this does not exist in reality.
TIOS generates POSITIVE_ZERO
in cases when the result is zero, but it is known that the
result can not be negative for any argument. For example, squaring of ZERO
using pow function will return POSITIVE_ZERO
, because the square is
always non-negative. The same is true for acosh when the argument
is equal to 1, etc.
TIOS also generates POSITIVE_ZERO
as the result of positive underflow (i.e. when the
result is positive, but too small to be represented in a float
type),
and as the result of rounding extremely small positive numbers using
round14 or round12_err.
To check whether a value is a positive zero, use is_pzero.
Dividing any finite strictly positive number by POSITIVE_INF
will produce POSITIVE_ZERO
as the result. Dividing any finite strictly positive number by
POSITIVE_ZERO gives POSITIVE_INF, and dividing any finite
strictly negative number by POSITIVE_ZERO
gives NEGATIVE_INF.
Note: Try in TI Basic '1/0'
and '1/0^2'
to see that
'0'
and '0^2'
are not strictly the same
for TIOS. Clever, isn't it?