numbers
relationalai.semantics.std
Number manipulation functions.
This module provides functions for working with numbers including:
- Number construction with precision and scale
- Integer operations
- Parsing numbers from strings
- Querying number properties (precision, scale, size)
Functions
Section titled “Functions”Functions exposed by this module.
number() Create an expression that represents a number with specified value, precision and scale.
integer() Create an expression that represents an integer with this value.
parse_number() Parse a string value as a number with specified precision and scale.
parse() Parse a string value as a number with the precision and scale of the number argument.
is_number() Check if a concept represents a number.
precision() Get the precision (total number of digits) of a number concept.
scale() Get the scale (number of decimal places) of a number concept.
size() Get the size (number of bits) needed to represent a number concept.
digits_to_bits() Transform from a number of base 10 digits to the number of bits necessary to represent it.