← All docs
sqrt() — internals
Compiler internals for sqrt(): lowering path, type checks, and runtime helpers.
sqrt() — internals
Where it lives
- Signature:
src/builtins/math/sqrt.rs - Lowering:
src/codegen/lower_inst/builtins/math.rs:97 (lower_sqrt) - Function symbol:
lower_sqrt()
Lowering notes
- Lowers
sqrt()for concrete integer-like and floating operands.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function sqrt(float $num): float
What the type checker enforces
- Arity: takes exactly 1 argument.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/math/sqrt.rs(eval_builtin!) - Dispatch hooks:
direct,values