isPositive

isPositive(x)

Try it yourself:


isPositive(): test whether a number exceeds zero

isPositive(x) returns true when x is strictly greater than zero. It is useful for dimensions, rates, denominators, and quantities that cannot be negative.

Zero is separate

isPositive(0) is false. If zero is allowed, test it separately with isZero(). Use isNegative() for the opposite sign and sign() when you need the three-way result.

Validation

Confirm the value is usable with isFinite() and isNumeric() before applying it to log() or a division. Use a tolerance for values calculated in floating point.

Try Is Positive in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions