smallerEq

x <= y

smallerEq(x, y)

Try it yourself:


smallerEq(): Less Than or Equal To

smallerEq() tests an inclusive upper bound. It returns true when the first value is less than or equal to the second, making it useful for limits and allowed ranges.

Inclusive comparisons

Use smaller() when equality should fail and largerEq() for a closed lower bound. Combine tests with and() to validate a range.

Ensure units are comparable, using to() where necessary. For calculated decimals, establish a tolerance instead of relying on formatting.

Try Smaller Eq 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