isclose
relationalai.semantics.std.math
isclose( x: NumberValue, y: NumberValue, tolerance: NumberValue = 1e-09) -> ExpressionCheck if two values are approximately equal within an absolute tolerance.
Uses abs(x - y) <= abs(tolerance). Unlike Python’s isclose,
there is no relative tolerance component.
Parameters
(xNumberValue) - First value.
(yNumberValue) - Second value.
(toleranceNumberValue, default:1e-09) - Absolute tolerance for comparison. Default: 1e-9.
Returns
Expression- AnExpressionthat evaluates to true if abs(x - y) <= abs(tolerance).
Examples
Check if a value is close to a target:
select(math.isclose(Product.price, 9.99, 0.01))Referenced By
RelationalAI Documentation └── Release Notes └── Python API Release Notes └── What’s New in Version 1.0.6 └── Bug Fixes