diff --git a/src/prelude.rs b/src/prelude.rs index 810f582..110c80e 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -55,6 +55,7 @@ pub const UNARY_FUNCS: phf::Map<&'static str, UnaryFuncInfo> = phf::phf_map! { pub const BINARY_FUNCS: phf::Map<&'static str, BinaryFuncInfo> = phf::phf_map! { "max" => BinaryFuncInfo(max, Other), "min" => BinaryFuncInfo(min, Other), + "log" => BinaryFuncInfo(logx, Other), }; enum FuncType { @@ -223,6 +224,10 @@ mod funcs { x.log(10f64) } + pub fn logx(x: f64, y: f64) -> f64 { + x.log(y) + } + pub fn ln(x: f64) -> f64 { x.ln() }