number
relationalai.semantics.std.numbers
number(value: NumberValue, precision: int = 38, scale: int = 14) -> VariableCreate an expression that represents a number with specified value, precision and scale.
Parameters
(valueNumberValue) - The numeric value.
(precisionint, default:38) - The precision (total number of digits).
(scaleint, default:14) - The scale (number of decimal places).
Returns
Variable- AVariablerepresenting the number with the specified properties. ReturnsNumber.
Examples
Create a number with custom precision and scale:
numbers.number(123.456, precision=10, scale=3)numbers.number(Product.price, precision=12, scale=2)Referenced By
RelationalAI Documentation └── Build With RelationalAI └── Understand how PyRel works > Use advanced reasoning > Rules-based reasoning └── Work with numbers └── Cast numeric values