// the perfect divisors are just powers of two for exp in1..=EXP { let n = 2u32.pow(exp); let expected = BigUint::one() << (LOG2 / n as usize);
assert_eq!(x.nth_root(n), expected);
check(x.clone(), n);
}
// degenerate cases should return quickly
assert!(x.nth_root(x.bits() as u32).is_one());
assert!(x.nth_root(i32::MAX as u32).is_one());
assert!(x.nth_root(u32::MAX).is_one());
}
#[test] fn test_roots_rand1() { // A random input that found regressions let s = "575981506858479247661989091587544744717244516135539456183849\ 986593934723426343633698413178771587697273822147578889823552\ 182702908597782734558103025298880194023243541613924361007059\ 353344183590348785832467726433749431093350684849462759540710\ 026019022227591412417064179299354183441181373862905039254106\ 4781867"; let x: BigUint = s.parse().unwrap();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.