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.
func exp(x: float32): float32Exponential, base e (float32) Calculate the exponential of x, that is, e raised to the power x
func exp(x: float64): float64Exponential, base e (float64) Calculate the exponential of x, that is, e raised to the power x
func ln(x: float32): float32The natural logarithm of x (float32).
func ln(x: float64): float64The natural logarithm of x (float64).
func log2(x: float32): float32The base-2 logarithm of x (float32).
func log2(x: float64): float64The base-2 logarithm of x (float64).
func log10(x: float32): float32The base-10 logarithm of x (float32).
func log10(x: float64): float64The base-10 logarithm of x (float64).
func log1p(x: float32): float32Computes ln(1 + x) accurately for small x (float32).
func log1p(x: float64): float64Computes ln(1 + x) accurately for small x (float64).