Value ref
binary_exprBinary expression over two ValueRef operands.
left and right accept nested value references or finite numeric
literals. Operators are +, -, *, /, min and max. Nest expressions to form
spreads, ratios and scaled levels; apply unary_expr for transforms or
rolling_stats for smoothing, then compare the result or use it for sizing.
Symbol/resolution overrides belong on supporting leaf operands. Literal
division by zero is refused. Readiness warns about known mismatches for
+, -, min and max, naming the path and both dimensions. Numeric literals
adopt the other dimension for +, -, min, max and comparisons. For * and /,
either literal operand makes the dimension unknown; fully known operands
derive dimensions (price / price is a ratio,
currency / price is quantity, price * quantity is currency). Percent, ratio
and oscillator scales stay distinct. Unknown dimensions never warn. Units
stay advisory except a known sizing formula_unit contradiction.
Consumer-specific admission still applies.
Backing types
BinaryExprValueRef
Required fields
leftreqanyOf (2 variants)-opreqenum: +, -, *, /, max, min-rightreqanyOf (2 variants)-Optional fields
kindstring-Backing types
The IR ValueRef classes this builder field resolves to.