rounding
nimony/lib/std/math/rounding.nim
Native (libc-free) implementations of floating-point rounding and remainder. The bit-level copySign, floor, ceil, round, and trunc routines follow Rust compiler-builtins/libm's generic routines; floor/ceil/trunc derive from musl. Floating-point mod adapts the significand reduction in generic/fmod.rs. Sources: library/compiler-builtins/libm/src/math/generic/{copysign,floor,ceil,round,trunc,fmod}.rs; musl src/math/{floorf,ceilf,trunc}.c. Copyright (c) 2018 Jorge Aparicio (Rust compiler-builtins/libm). Copyright © 2005-2020 Rich Felker, et al. (musl-derived portions). See /tmp/rust/library/compiler-builtins/libm/LICENSE.txt for the applicable MIT and MIT OR Apache-2.0 license notices.
func copySign(x: float32; y: float32): float32func copySign(x: float64; y: float64): float64func floor(x: float32): float32func floor(x: float64): float64func ceil(x: float32): float32func ceil(x: float64): float64func trunc(x: float32): float32func trunc(x: float64): float64func round(x: float32): float32func round(x: float64): float64func mod(x: float32; y: float32): float32func mod(x: float64; y: float64): float64