1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
use crate::macros::dispatch; pub use methods::dispatch as cbrt; #[dispatch] mod methods { use crate::CelValue; fn cbrt(n: i64) -> f64 { (n as f64).cbrt() } fn cbrt(n: u64) -> f64 { (n as f64).cbrt() } fn cbrt(n: f64) -> f64 { n.cbrt() } }