Home
last modified time | relevance | path

Searched refs:nth_root (Results 1 – 10 of 10) sorted by relevance

/external/rust/android-crates-io/crates/num-bigint/tests/
Droots.rs7 let root = x.nth_root(n); in check()
18 assert_eq!(lo.nth_root(n), root); in check()
20 assert_eq!((&lo - 1u32).nth_root(n), &root - 1u32); in check()
25 assert_eq!(hi.nth_root(n), &root + 1u32); in check()
26 assert_eq!((&hi - 1u32).nth_root(n), root); in check()
60 assert_eq!(x.nth_root(10), expected); in test_nth_root_big()
71 assert_eq!(googol.nth_root(n), expected); in test_nth_root_googol()
86 assert_eq!(x.nth_root(n), expected); in test_nth_root_twos()
91 assert!(x.nth_root(x.bits() as u32).is_one()); in test_nth_root_twos()
92 assert!(x.nth_root(i32::MAX as u32).is_one()); in test_nth_root_twos()
[all …]
/external/rust/android-crates-io/crates/num-integer/src/
Droots.rs53 fn nth_root(&self, n: u32) -> Self; in nth_root() method
81 self.nth_root(2) in sqrt()
107 self.nth_root(3) in cbrt()
128 pub fn nth_root<T: Roots>(x: T, n: u32) -> T { in nth_root() function
129 x.nth_root(n) in nth_root()
136 fn nth_root(&self, n: u32) -> Self {
138 (*self as $U).nth_root(n) as Self
141 -((self.wrapping_neg() as $U).nth_root(n) as Self)
203 fn nth_root(&self, n: u32) -> Self {
222 (a as u64).nth_root(n) as $T
[all …]
Dlib.rs27 pub use crate::roots::{cbrt, nth_root, sqrt};
/external/rust/android-crates-io/crates/num-integer/tests/
Droots.rs21 let rt = i.nth_root(n); in check()
170 (123 as $I).nth_root(0);
195 fn nth_root() {
215 assert_eq!($I::max_value().nth_root(bits - 1), 2);
216 assert_eq!($I::max_value().nth_root(bits), 1);
217 assert_eq!($I::min_value().nth_root(bits), -2);
218 assert_eq!(($I::min_value() + 1).nth_root(bits), -1);
231 (123 as $U).nth_root(0);
245 fn nth_root() {
256 assert_eq!($U::max_value().nth_root(bits - 1), 2);
[all …]
/external/rust/android-crates-io/crates/num-bigint/benches/
Droots.rs21 let root = x.nth_root(n); in check()
30 assert_eq!(lo.nth_root(n), root); in check()
31 assert_eq!((&lo - 1u32).nth_root(n), &root - 1u32); in check()
35 assert_eq!(hi.nth_root(n), &root + 1u32); in check()
36 assert_eq!((&hi - 1u32).nth_root(n), root); in check()
100 b.iter(|| x.nth_root(n)); in bench_nth_root()
/external/rust/android-crates-io/crates/num-integer/benches/
Droots.rs146 crate::bench_rand_pos(b, |x: &$T| x.nth_root(4), 4);
151 crate::bench_small_pos(b, |x: &$T| x.nth_root(4), 4);
156 crate::bench_rand(b, |x: &$T| x.nth_root(5), 5);
161 crate::bench_small(b, |x: &$T| x.nth_root(5), 5);
/external/rust/android-crates-io/crates/num-bigint/src/
Dbiguint.rs369 fn nth_root(&self, n: u32) -> Self { in nth_root() method
393 return x.nth_root(n).into(); in nth_root()
413 (self >> scale).nth_root(n) << root_scale in nth_root()
984 pub fn nth_root(&self, n: u32) -> Self { in nth_root() method
985 Roots::nth_root(self, n) in nth_root()
Dbigint.rs510 fn nth_root(&self, n: u32) -> Self { in nth_root() method
517 BigInt::from_biguint(self.sign, self.data.nth_root(n)) in nth_root()
1100 pub fn nth_root(&self, n: u32) -> Self { in nth_root() method
1101 Roots::nth_root(self, n) in nth_root()
/external/rust/android-crates-io/crates/num-integer/
DRELEASES.md79 - [The new `Roots` trait provides `sqrt`, `cbrt`, and `nth_root` methods][9],
/external/sdv/vsomeip/third_party/boost/numeric/interval/include/boost/numeric/interval/
Darith2.hpp270 interval<T, Policies> nth_root(interval<T, Policies> const &x, int k) in nth_root() function