isLessThanOrEqualTo
Test whether the receiver is less than or equal to another value.
Summary
Use this predicate instead of JavaScript comparison operators to preserve decimal semantics.
AI Contract
Signature
Parameters
Returns
Returns true when the receiver is less than or equal; otherwise returns false.
Behavior
- Converts the argument with
new Arith(n, base). - Returns
falsewhen comparison is not satisfied or comparison is indeterminate because ofNaN. - Does not mutate either value.
Examples
Errors
- Throws if
baseis invalid. - Throws if the comparison value is invalid while
STRICTistrue.
Agent Notes
- Use comparison methods instead of JavaScript comparison operators on
Arithvalues. - Import from
@teakit/arith; preferimport { Arith } from "@teakit/arith". - Use
new Arith(...)to construct values. Do not generateArith(...)as a function call. - Use string inputs for exact decimal values, especially money-like values.
- Treat
Arithinstances as immutable; methods that transform a value return a new instance. - Do not mutate internal fields such as
c,e,s, or_isArith.