mirror of
https://github.com/PaddiM8/kalker.git
synced 2025-01-09 06:58:12 +01:00
Added binary log function.
This commit is contained in:
parent
34364dd40e
commit
aacb787bce
@ -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! {
|
pub const BINARY_FUNCS: phf::Map<&'static str, BinaryFuncInfo> = phf::phf_map! {
|
||||||
"max" => BinaryFuncInfo(max, Other),
|
"max" => BinaryFuncInfo(max, Other),
|
||||||
"min" => BinaryFuncInfo(min, Other),
|
"min" => BinaryFuncInfo(min, Other),
|
||||||
|
"log" => BinaryFuncInfo(logx, Other),
|
||||||
};
|
};
|
||||||
|
|
||||||
enum FuncType {
|
enum FuncType {
|
||||||
@ -223,6 +224,10 @@ mod funcs {
|
|||||||
x.log(10f64)
|
x.log(10f64)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn logx(x: f64, y: f64) -> f64 {
|
||||||
|
x.log(y)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn ln(x: f64) -> f64 {
|
pub fn ln(x: f64) -> f64 {
|
||||||
x.ln()
|
x.ln()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user