Git Product home page Git Product logo

fast-math's Introduction

fast-math

Build Status codecov

Fast, approximate versions of mathematical functions. Includes:

  • Logarithms: log2,
  • Exponentials: exp, exp2,
  • Trigonometric functions: atan, atan2.

Documentation, crates.io.

fast-math's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fast-math's Issues

fast exp/log/tanh

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.

exp_m1

Potentially also exp2_m1 etc, since packaging that up likely saves a multiplication?

log_1p

Potentially best implemented in the form of log2_1p, but ln_1p should be exposed too.

Gamma functions

  • lgamma
  • tgamma

These names are the conventional/libc ones, but it might be nice to break with convention?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.