Skip to content

std.float

exp, ln, pow for f64 without libm (core::pow needs C’s pow); ~1e-15 relative

pub exp :: fn(x: f64) -> f64

e^x; 0 below ~-745, inf above ~709

pub ln :: fn(x: f64) -> f64

natural log; -inf for x <= 0

pub pow :: fn(x: f64, y: f64) -> f64

x^y; a negative x needs a whole y, else 0