Skip to main content

is_cube

Function is_cube 

Source
pub fn is_cube(n: u64) -> bool
Expand description

Check if n is a perfect cube: n = k^3 for some integer k.

ยงExamples

use mathverse_core::integer::is_cube;

assert!(is_cube(27));
assert!(is_cube(0));
assert!(!is_cube(10));