Nimony

The road to Nim 3

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.