log
relationalai.semantics.std.math
log(x: NumberValue, base: NumberValue | None = None) -> ExpressionCompute the logarithm with optional base.
Parameters
Section titled “Parameters”
(xNumberValue) - The positive input value. If the input value is not statically known to be non-positive, but turns out to be non-positive at runtime, returnsNaN.
(baseNumberValue|None, default:None) - The logarithm base. If None, computes natural log. Default: None.
Returns
Section titled “Returns”Expression- AnExpressioncomputing log_base(x), or ln(x) if base is None. ReturnsFloat.
Raises
Section titled “Raises”ValueError- Ifxcan be computed statically and is non-positive.
Examples
Section titled “Examples”Compute logarithm:
>>> select(math.log(100, 10))>>> select(math.log(Signal.amplitude))