#[inline]
#[must_use]
pub fn mul_add(a: f32, b: f32, c: f32) -> f32 {
#[cfg(feature = "std")]
return f32::mul_add(a, b, c);
#[cfg(not(feature = "std"))]
return libm::fmaf(a, b, c);
}
#[inline]
#[must_use]
pub fn round(x: f32) -> f32 {
#[cfg(feature = "std")]
return f32::round(x);
#[cfg(not(feature = "std"))]
return libm::roundf(x);
}
#[inline]
#[must_use]
pub fn sin(x: f32) -> f32 {
#[cfg(feature = "std")]
return f32::sin(x);
#[cfg(not(feature = "std"))]
return libm::sinf(x);
}
#[inline]
#[must_use]
pub fn cos(x: f32) -> f32 {
#[cfg(feature = "std")]
return f32::cos(x);
#[cfg(not(feature = "std"))]
return libm::cosf(x);
}
#[inline]
#[must_use]
pub fn powf(x: f32, y: f32) -> f32 {
#[cfg(feature = "std")]
return f32::powf(x, y);
#[cfg(not(feature = "std"))]
return libm::powf(x, y);
}
#[inline]
#[must_use]
pub fn exp(x: f32) -> f32 {
#[cfg(feature = "std")]
return f32::exp(x);
#[cfg(not(feature = "std"))]
return libm::expf(x);
}