Changed nth_sqrt to nth_root.

This commit is contained in:
PaddiM8 2020-06-18 16:20:52 +02:00
parent 1fdfcc29c1
commit aa0e62af4c

View File

@ -63,7 +63,7 @@ pub const BINARY_FUNCS: phf::Map<&'static str, BinaryFuncInfo> = phf::phf_map! {
"min" => BinaryFuncInfo(min, Other),
"hyp" => BinaryFuncInfo(hyp, Other),
"log" => BinaryFuncInfo(logx, Other),
"sqrt" => BinaryFuncInfo(nth_sqrt, Other),
"root" => BinaryFuncInfo(nth_root, Other),
};
enum FuncType {
@ -317,7 +317,7 @@ mod funcs {
x.sqrt()
}
pub fn nth_sqrt(x: Float, n: Float) -> Float {
pub fn nth_root(x: Float, n: Float) -> Float {
x.pow(Float::with_val(1, 1) / n)
}