Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
dsp::FastMathApproximations Struct Reference

This class contains various fast mathematical function approximations. More...

#include <juce_FastMathApproximations.h>

Static Public Member Functions

template<typename FloatType >
static FloatType cosh (FloatType x) noexcept
 Provides a fast approximation of the function cosh(x) using a Pade approximant continued fraction, calculated sample by sample.
 
template<typename FloatType >
static void cosh (FloatType *values, size_t numValues) noexcept
 Provides a fast approximation of the function cosh(x) using a Pade approximant continued fraction, calculated on a whole buffer.
 
template<typename FloatType >
static FloatType sinh (FloatType x) noexcept
 Provides a fast approximation of the function sinh(x) using a Pade approximant continued fraction, calculated sample by sample.
 
template<typename FloatType >
static void sinh (FloatType *values, size_t numValues) noexcept
 Provides a fast approximation of the function sinh(x) using a Pade approximant continued fraction, calculated on a whole buffer.
 
template<typename FloatType >
static FloatType tanh (FloatType x) noexcept
 Provides a fast approximation of the function tanh(x) using a Pade approximant continued fraction, calculated sample by sample.
 
template<typename FloatType >
static void tanh (FloatType *values, size_t numValues) noexcept
 Provides a fast approximation of the function tanh(x) using a Pade approximant continued fraction, calculated on a whole buffer.
 
template<typename FloatType >
static FloatType cos (FloatType x) noexcept
 Provides a fast approximation of the function cos(x) using a Pade approximant continued fraction, calculated sample by sample.
 
template<typename FloatType >
static void cos (FloatType *values, size_t numValues) noexcept
 Provides a fast approximation of the function cos(x) using a Pade approximant continued fraction, calculated on a whole buffer.
 
template<typename FloatType >
static FloatType sin (FloatType x) noexcept
 Provides a fast approximation of the function sin(x) using a Pade approximant continued fraction, calculated sample by sample.
 
template<typename FloatType >
static void sin (FloatType *values, size_t numValues) noexcept
 Provides a fast approximation of the function sin(x) using a Pade approximant continued fraction, calculated on a whole buffer.
 
template<typename FloatType >
static FloatType tan (FloatType x) noexcept
 Provides a fast approximation of the function tan(x) using a Pade approximant continued fraction, calculated sample by sample.
 
template<typename FloatType >
static void tan (FloatType *values, size_t numValues) noexcept
 Provides a fast approximation of the function tan(x) using a Pade approximant continued fraction, calculated on a whole buffer.
 
template<typename FloatType >
static FloatType exp (FloatType x) noexcept
 Provides a fast approximation of the function exp(x) using a Pade approximant continued fraction, calculated sample by sample.
 
template<typename FloatType >
static void exp (FloatType *values, size_t numValues) noexcept
 Provides a fast approximation of the function exp(x) using a Pade approximant continued fraction, calculated on a whole buffer.
 
template<typename FloatType >
static FloatType logNPlusOne (FloatType x) noexcept
 Provides a fast approximation of the function log(x+1) using a Pade approximant continued fraction, calculated sample by sample.
 
template<typename FloatType >
static void logNPlusOne (FloatType *values, size_t numValues) noexcept
 Provides a fast approximation of the function log(x+1) using a Pade approximant continued fraction, calculated on a whole buffer.
 

Detailed Description

This class contains various fast mathematical function approximations.

Member Function Documentation

◆ cosh() [1/2]

template<typename FloatType >
static FloatType dsp::FastMathApproximations::cosh ( FloatType x)
staticnoexcept

Provides a fast approximation of the function cosh(x) using a Pade approximant continued fraction, calculated sample by sample.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -5 and +5 for limiting the error.

References x.

Referenced by cosh().

◆ cosh() [2/2]

template<typename FloatType >
static void dsp::FastMathApproximations::cosh ( FloatType * values,
size_t numValues )
staticnoexcept

Provides a fast approximation of the function cosh(x) using a Pade approximant continued fraction, calculated on a whole buffer.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -5 and +5 for limiting the error.

References cosh().

◆ sinh() [1/2]

template<typename FloatType >
static FloatType dsp::FastMathApproximations::sinh ( FloatType x)
staticnoexcept

Provides a fast approximation of the function sinh(x) using a Pade approximant continued fraction, calculated sample by sample.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -5 and +5 for limiting the error.

References x.

Referenced by sinh().

◆ sinh() [2/2]

template<typename FloatType >
static void dsp::FastMathApproximations::sinh ( FloatType * values,
size_t numValues )
staticnoexcept

Provides a fast approximation of the function sinh(x) using a Pade approximant continued fraction, calculated on a whole buffer.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -5 and +5 for limiting the error.

References sinh().

◆ tanh() [1/2]

template<typename FloatType >
static FloatType dsp::FastMathApproximations::tanh ( FloatType x)
staticnoexcept

Provides a fast approximation of the function tanh(x) using a Pade approximant continued fraction, calculated sample by sample.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -5 and +5 for limiting the error.

References x.

Referenced by tanh().

◆ tanh() [2/2]

template<typename FloatType >
static void dsp::FastMathApproximations::tanh ( FloatType * values,
size_t numValues )
staticnoexcept

Provides a fast approximation of the function tanh(x) using a Pade approximant continued fraction, calculated on a whole buffer.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -5 and +5 for limiting the error.

References tanh().

◆ cos() [1/2]

template<typename FloatType >
static FloatType dsp::FastMathApproximations::cos ( FloatType x)
staticnoexcept

Provides a fast approximation of the function cos(x) using a Pade approximant continued fraction, calculated sample by sample.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -pi and +pi for limiting the error.

References x.

Referenced by cos().

◆ cos() [2/2]

template<typename FloatType >
static void dsp::FastMathApproximations::cos ( FloatType * values,
size_t numValues )
staticnoexcept

Provides a fast approximation of the function cos(x) using a Pade approximant continued fraction, calculated on a whole buffer.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -pi and +pi for limiting the error.

References cos().

◆ sin() [1/2]

template<typename FloatType >
static FloatType dsp::FastMathApproximations::sin ( FloatType x)
staticnoexcept

Provides a fast approximation of the function sin(x) using a Pade approximant continued fraction, calculated sample by sample.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -pi and +pi for limiting the error.

References x.

Referenced by sin().

◆ sin() [2/2]

template<typename FloatType >
static void dsp::FastMathApproximations::sin ( FloatType * values,
size_t numValues )
staticnoexcept

Provides a fast approximation of the function sin(x) using a Pade approximant continued fraction, calculated on a whole buffer.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -pi and +pi for limiting the error.

References sin().

◆ tan() [1/2]

template<typename FloatType >
static FloatType dsp::FastMathApproximations::tan ( FloatType x)
staticnoexcept

Provides a fast approximation of the function tan(x) using a Pade approximant continued fraction, calculated sample by sample.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -pi/2 and +pi/2 for limiting the error.

References x.

Referenced by tan().

◆ tan() [2/2]

template<typename FloatType >
static void dsp::FastMathApproximations::tan ( FloatType * values,
size_t numValues )
staticnoexcept

Provides a fast approximation of the function tan(x) using a Pade approximant continued fraction, calculated on a whole buffer.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -pi/2 and +pi/2 for limiting the error.

References tan().

◆ exp() [1/2]

template<typename FloatType >
static FloatType dsp::FastMathApproximations::exp ( FloatType x)
staticnoexcept

Provides a fast approximation of the function exp(x) using a Pade approximant continued fraction, calculated sample by sample.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -6 and +4 for limiting the error.

References x.

Referenced by exp().

◆ exp() [2/2]

template<typename FloatType >
static void dsp::FastMathApproximations::exp ( FloatType * values,
size_t numValues )
staticnoexcept

Provides a fast approximation of the function exp(x) using a Pade approximant continued fraction, calculated on a whole buffer.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -6 and +4 for limiting the error.

References exp().

◆ logNPlusOne() [1/2]

template<typename FloatType >
static FloatType dsp::FastMathApproximations::logNPlusOne ( FloatType x)
staticnoexcept

Provides a fast approximation of the function log(x+1) using a Pade approximant continued fraction, calculated sample by sample.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -0.8 and +5 for limiting the error.

References x.

Referenced by logNPlusOne().

◆ logNPlusOne() [2/2]

template<typename FloatType >
static void dsp::FastMathApproximations::logNPlusOne ( FloatType * values,
size_t numValues )
staticnoexcept

Provides a fast approximation of the function log(x+1) using a Pade approximant continued fraction, calculated on a whole buffer.

Note: This is an approximation which works on a limited range. You are advised to use input values only between -0.8 and +5 for limiting the error.

References logNPlusOne().


The documentation for this struct was generated from the following file:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram