Fast, approximate versions of mathematical functions. Includes:
- Logarithms:
log2
, - Exponentials:
exp
,exp2
, - Trigonometric functions:
atan
,atan2
.
Fast, approximate versions of mathematical functions
Home Page: http://huonw.github.io/fast-math
License: Apache License 2.0
Fast, approximate versions of mathematical functions. Includes:
log2
,exp
, exp2
,atan
, atan2
.erf
erfc
Potentially also exp2_m1
etc, since packaging that up likely saves a multiplication?
powf
powi
asinh
acosh
atanh
There are hardware instructions on X86 for approximate inverse square root and square root which can improved upon via newton's method.
See the for loop at the bottom of bodies_advance
here: https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/nbody-rust-7.html
It would look a lot better if this example could be re-written to use purely safe, normal looking rust code.
lgamma
tgamma
These names are the conventional/libc ones, but it might be nice to break with convention?
sin
cos
sin_cos
(potentially saves some computation)tan
In case the goal of this crate is to include more fast functions (which I hope), here is some inspiration:
https://www.kvraudio.com/forum/viewtopic.php?f=33&t=464290
https://github.com/herumi/fmath
https://github.com/herumi/xbyak
https://varietyofsound.wordpress.com/2011/02/14/efficient-tanh-computation-using-lamberts-continued-fraction/#more-1929
I'm not sure if these are the best/fastest (for writing audio DSP plugins). It's always a tradeoff between accuracy and speed.
It would be useful to have them in Rust too, when writing audio DSP plugins in Rust.
log
(with base
argument)ln
log10
Also their _1p
variants (#11).
Potentially best implemented in the form of log2_1p
, but ln_1p
should be exposed too.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.