Searched refs:nth_root (Results 1 – 5 of 5) sorted by relevance
/external/rust/crates/num-integer/src/ |
D | roots.rs | 55 fn nth_root(&self, n: u32) -> Self; in nth_root() method 83 self.nth_root(2) in sqrt() 109 self.nth_root(3) in cbrt() 130 pub fn nth_root<T: Roots>(x: T, n: u32) -> T { in nth_root() function 131 x.nth_root(n) in nth_root() 138 fn nth_root(&self, n: u32) -> Self { 140 (*self as $U).nth_root(n) as Self 143 -((self.wrapping_neg() as $U).nth_root(n) as Self) 206 fn nth_root(&self, n: u32) -> Self { 225 (a as u64).nth_root(n) as $T [all …]
|
D | lib.rs | 31 pub use roots::{cbrt, nth_root, sqrt};
|
/external/rust/crates/num-integer/tests/ |
D | roots.rs | 24 let rt = i.nth_root(n); in check() 173 (123 as $I).nth_root(0); 198 fn nth_root() { 218 assert_eq!($I::max_value().nth_root(bits - 1), 2); 219 assert_eq!($I::max_value().nth_root(bits), 1); 220 assert_eq!($I::min_value().nth_root(bits), -2); 221 assert_eq!(($I::min_value() + 1).nth_root(bits), -1); 234 (123 as $U).nth_root(0); 248 fn nth_root() { 259 assert_eq!($U::max_value().nth_root(bits - 1), 2); [all …]
|
/external/rust/crates/num-integer/benches/ |
D | roots.rs | 148 ::bench_rand_pos(b, |x: &$T| x.nth_root(4), 4); 153 ::bench_small_pos(b, |x: &$T| x.nth_root(4), 4); 158 ::bench_rand(b, |x: &$T| x.nth_root(5), 5); 163 ::bench_small(b, |x: &$T| x.nth_root(5), 5);
|
/external/rust/crates/num-integer/ |
D | RELEASES.md | 52 - [The new `Roots` trait provides `sqrt`, `cbrt`, and `nth_root` methods][9],
|