← All docs
log() — internals
Compiler internals for log(): lowering path, type checks, and runtime helpers.
log() — internals
Where it lives
- Signature:
src/builtins/math/log.rs - Lowering:
src/codegen/lower_inst/builtins/math/libm.rs:51 (lower_log) - Function symbol:
lower_log()
Lowering notes
- Lowers
log()in one-argument and base-changing two-argument forms.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function log(float $num, float $base = 2.718281828459045): float
What the type checker enforces
- Arity: takes 1–2 arguments (1 optional).
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/math/log.rs(eval_builtin!) - Dispatch hooks:
direct,values