This package is more or less superseded by the SLEEF.jl package and the Julia math module itself, as many libm implementations have now been converted to pure Julia in the core library
Amal, a pure Julia math library (work in progress)
Amal is an amalgamation of ideas from several open source math libraries, including SLEEF, Cephes, and Musl, and other references, which have all been taken into consideration for the design of this library, combining the best of breed ideas.
The Amal library principles include: avoid expensive branches, avoid table look ups, and to use FMA instructions for CPU's that support it. For CPU's with FMA instruction we take advantage of FMA and prefer polynomial functions to maximize performance if it does not sacrifice accuracy.
We recommend running julia with -O3
for maximal performance using Amal.jl
and to also build a custom system image by running
julia> is_windows() && (Pkg.add("WinRPM"); using WinRPM; WinRPM.install("gcc", yes=true))
julia> include(joinpath(dirname(JULIA_HOME),"share","julia","build_sysimg.jl"))
julia> build_sysimg(force=true)
and then to restart julia
; this will ensure you are taking full advantage of hardware FMA if your CPU supports it.
The exported functions presently include
exp, exp2, exp10,
log,
frexp, ldexp, ilog2
More functions to come in the near future.
To use Amal.jl
julia> Pkg.clone("https://github.com/JuliaMath/Amal.jl.git")
julia> using Amal
julia> Amal.exp(2.0)
7.38905609893065