Nimony

The road to Nim 3

exponential

nimony/lib/std/math/exponential.nim

Native (libc-free) implementations of exponential and logarithmic functions. exp follows FreeBSD/SunPro fdlibm's range reduction and polynomial; its exponent scaling is adapted to handle subnormals without constructing an invalid exponent field. The logarithm routines follow the corresponding fdlibm algorithms and coefficients, as carried by Rust compiler-builtins/libm. Original C sources: FreeBSD /usr/src/lib/msun/src/{e_exp,e_expf,e_log,e_log2,e_log10,s_log1p}.c. Rust references: library/compiler-builtins/libm/src/math/{exp,expf,log,log2,log10,log1p,scalbn}.rs. Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved. Copyright (c) 2018 Jorge Aparicio (Rust compiler-builtins/libm port). Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice is preserved.