https://github.com/musm/sleef.jl
A pure Julia port of the SLEEF math library
https://github.com/musm/sleef.jl
julia math
Last synced: 3 months ago
JSON representation
A pure Julia port of the SLEEF math library
- Host: GitHub
- URL: https://github.com/musm/sleef.jl
- Owner: musm
- License: other
- Created: 2016-10-06T03:28:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-02-10T20:14:35.000Z (over 6 years ago)
- Last Synced: 2025-05-07T03:46:54.520Z (about 1 year ago)
- Topics: julia, math
- Language: Julia
- Homepage:
- Size: 89.8 KB
- Stars: 25
- Watchers: 6
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
A pure Julia port of the [SLEEF math library](https://github.com/shibatch/SLEEF)
**History**
- Release [v0.4.0](https://github.com/musm/SLEEF.jl/releases/tag/v0.4.0) based on SLEEF v2.110
- Release [v0.3.0](https://github.com/musm/SLEEF.jl/releases/tag/v0.3.0) based on SLEEF v2.100
- Release [v0.2.0](https://github.com/musm/SLEEF.jl/releases/tag/v0.2.0) based on SLEEF v2.90
- Release [v0.1.0](https://github.com/musm/SLEEF.jl/releases/tag/v0.1.0) based on SLEEF v2.80
[](https://travis-ci.org/musm/SLEEF.jl)
[](https://ci.appveyor.com/project/musm/SLEEF-jl/branch/master)
[](https://coveralls.io/github/musm/SLEEF.jl?branch=master)
[](http://codecov.io/github/musm/SLEEF.jl?branch=master)
# Usage
To use `SLEEF.jl`
```julia
pkg> add SLEEF
julia> using SLEEF
julia> SLEEF.exp(3.0)
20.085536923187668
julia> SLEEF.exp(3f0)
20.085537f0
```
The available functions include (within 1 ulp)
```julia
sin, cos, tan, asin, acos, atan, sincos, sinh, cosh, tanh,
asinh, acosh, atanh, log, log2, log10, log1p, ilogb, exp, exp2, exp10, expm1, ldexp, cbrt, pow
```
Faster variants (within 3 ulp)
```julia
sin_fast, cos_fast, tan_fast, sincos_fast, asin_fast, acos_fast, atan_fast, atan2_fast, log_fast, cbrt_fast
```
## Notes
The trigonometric functions are tested to return values with specified
accuracy when the argument is within the following range:
- Double (Float64) precision trigonometric functions : `[-1e+14, 1e+14]`
- Single (Float32) precision trigonometric functions : `[-39000, 39000]`