Math Module
+ Collaboration diagram for Math Module:

Functions

double jit_math_cos (double x)
 Calculates the cosine. More...
 
double jit_math_sin (double x)
 Calculates the sine. More...
 
double jit_math_tan (double x)
 Calculates the tangent. More...
 
double jit_math_acos (double x)
 Calculates the arccosine. More...
 
double jit_math_asin (double x)
 Calculates the arcsine. More...
 
double jit_math_atan (double x)
 Calculates the arctangent. More...
 
double jit_math_atan2 (double y, double x)
 Calculates the four quadrant arctangent. More...
 
double jit_math_cosh (double x)
 Calculates the hyperbolic cosine. More...
 
double jit_math_sinh (double x)
 Calculates the hyperbolic sine. More...
 
double jit_math_tanh (double x)
 Calculates the hyperbolic tangent. More...
 
double jit_math_acosh (double x)
 Calculates the hyperbolic arccosine. More...
 
double jit_math_asinh (double x)
 Calculates the hyperbolic arcsine. More...
 
double jit_math_atanh (double x)
 Calculates the hyperbolic arctangent. More...
 
double jit_math_exp (double x)
 Calculates the exponent. More...
 
double jit_math_expm1 (double x)
 Calculates the exponent minus 1. More...
 
double jit_math_exp2 (double x)
 Calculates the exponent base 2. More...
 
double jit_math_log (double x)
 Calculates the logarithm. More...
 
double jit_math_log2 (double x)
 Calculates the logarithm base 2. More...
 
double jit_math_log10 (double x)
 Calculates the logarithm base 10. More...
 
double jit_math_hypot (double x, double y)
 Calculates the hypotenuse. More...
 
double jit_math_pow (double x, double y)
 Calculates x raised to the y power. More...
 
double jit_math_sqrt (double x)
 Calculates the square root. More...
 
double jit_math_ceil (double x)
 Calculates the ceiling. More...
 
double jit_math_floor (double x)
 Calculates the floor. More...
 
double jit_math_round (double x)
 Rounds the input. More...
 
double jit_math_trunc (double x)
 Truncates the input. More...
 
double jit_math_fmod (double x, double y)
 Calculates the floating point x modulo y. More...
 
double jit_math_fold (double x, double lo, double hi)
 Calculates the fold of x between lo and hi. More...
 
double jit_math_wrap (double x, double lo, double hi)
 Calculates the wrap of x between lo and hi. More...
 
double jit_math_j1_0 (double x)
 Calcuates the j1_0 Bessel function. More...
 
double jit_math_p1 (double x)
 Calcuates the p1 Bessel function. More...
 
double jit_math_q1 (double x)
 Calcuates the q1 Bessel function. More...
 
double jit_math_j1 (double x)
 Calcuates the j1 Bessel function. More...
 
unsigned long jit_math_roundup_poweroftwo (unsigned long x)
 Rounds up to the nearest power of two. More...
 
long jit_math_is_finite (float v)
 Checks if input is finite. More...
 
long jit_math_is_nan (float v)
 Checks if input is not a number (NaN). More...
 
long jit_math_is_valid (float v)
 Checks if input is both finite and a number. More...
 
long jit_math_is_poweroftwo (long x)
 Checks if input is a power of two. More...
 
float jit_math_fast_sqrt (float n)
 Calculates the square root by fast approximation. More...
 
float jit_math_fast_invsqrt (float x)
 Calculates the inverse square root by fast approximation. More...
 
float jit_math_fast_sin (float x)
 Calculates the sine by fast approximation. More...
 
float jit_math_fast_cos (float x)
 Calculates the cosine by fast approximation. More...
 
float jit_math_fast_tan (float x)
 Calculates the tangent by fast approximation. More...
 
float jit_math_fast_asin (float x)
 Calculates the arcsine by fast approximation. More...
 
float jit_math_fast_acos (float x)
 Calculates the arccosine by fast approximation. More...
 
float jit_math_fast_atan (float x)
 Calculates the arctangent by fast approximation. More...
 

Detailed Description

Function Documentation

double jit_math_acos ( double  x)

Calculates the arccosine.

Parameters
xinput
Returns
output
double jit_math_acosh ( double  x)

Calculates the hyperbolic arccosine.

Parameters
xinput
Returns
output
double jit_math_asin ( double  x)

Calculates the arcsine.

Parameters
xinput
Returns
output
double jit_math_asinh ( double  x)

Calculates the hyperbolic arcsine.

Parameters
xinput
Returns
output
double jit_math_atan ( double  x)

Calculates the arctangent.

Parameters
xinput
Returns
output
double jit_math_atan2 ( double  y,
double  x 
)

Calculates the four quadrant arctangent.

Parameters
yinput
xinput
Returns
output
double jit_math_atanh ( double  x)

Calculates the hyperbolic arctangent.

Parameters
xinput
Returns
output
double jit_math_ceil ( double  x)

Calculates the ceiling.

Parameters
xinput
Returns
output
double jit_math_cos ( double  x)

Calculates the cosine.

Parameters
xinput
Returns
output

Referenced by jit_math_j1().

double jit_math_cosh ( double  x)

Calculates the hyperbolic cosine.

Parameters
xinput
Returns
output
double jit_math_exp ( double  x)

Calculates the exponent.

Parameters
xinput
Returns
output
double jit_math_exp2 ( double  x)

Calculates the exponent base 2.

Parameters
xinput
Returns
output
double jit_math_expm1 ( double  x)

Calculates the exponent minus 1.

Parameters
xinput
Returns
output
float jit_math_fast_acos ( float  x)

Calculates the arccosine by fast approximation.

Absolute error of 6.8e-05 for [0, 1]

Parameters
xinput
Returns
output

References jit_math_sqrt().

+ Here is the call graph for this function:

float jit_math_fast_asin ( float  x)

Calculates the arcsine by fast approximation.

Absolute error of 6.8e-05 for [0, 1]

Parameters
xinput
Returns
output

References jit_math_sqrt().

+ Here is the call graph for this function:

float jit_math_fast_atan ( float  x)

Calculates the arctangent by fast approximation.

Absolute error of 1.43-08 for [-1, 1]

Parameters
xinput
Returns
output
float jit_math_fast_cos ( float  x)

Calculates the cosine by fast approximation.

Absolute error of 1.2e-03 for [0, PI/2]

Parameters
xinput
Returns
output
float jit_math_fast_invsqrt ( float  x)

Calculates the inverse square root by fast approximation.

Parameters
xinput
Returns
output
float jit_math_fast_sin ( float  x)

Calculates the sine by fast approximation.

Absolute error of 1.7e-04 for [0, PI/2]

Parameters
xinput
Returns
output
float jit_math_fast_sqrt ( float  n)

Calculates the square root by fast approximation.

Parameters
ninput
Returns
output
float jit_math_fast_tan ( float  x)

Calculates the tangent by fast approximation.

Absolute error of 1.9e-00 for [0, PI/4]

Parameters
xinput
Returns
output
double jit_math_floor ( double  x)

Calculates the floor.

Parameters
xinput
Returns
output
double jit_math_fmod ( double  x,
double  y 
)

Calculates the floating point x modulo y.

Parameters
xinput
yinput
Returns
output
double jit_math_fold ( double  x,
double  lo,
double  hi 
)

Calculates the fold of x between lo and hi.

Parameters
xinput
lolower bound
hiupper bound
Returns
output
double jit_math_hypot ( double  x,
double  y 
)

Calculates the hypotenuse.

Parameters
xinput
yinput
Returns
output
long jit_math_is_finite ( float  v)

Checks if input is finite.

Parameters
vinput
Returns
1 if finite. Otherwise, 0.

Referenced by jit_math_is_valid().

long jit_math_is_nan ( float  v)

Checks if input is not a number (NaN).

Parameters
vinput
Returns
1 if not a number. Otherwise, 0.

Referenced by jit_math_is_valid().

long jit_math_is_poweroftwo ( long  x)

Checks if input is a power of two.

Parameters
xinput
Returns
1 if finite. Otherwise, 0.
long jit_math_is_valid ( float  v)

Checks if input is both finite and a number.

Parameters
vinput
Returns
1 if vaild. Otherwise, 0.

References jit_math_is_finite(), and jit_math_is_nan().

+ Here is the call graph for this function:

double jit_math_j1 ( double  x)

Calcuates the j1 Bessel function.

Parameters
xinput
Returns
output

References jit_math_cos(), jit_math_j1_0(), jit_math_p1(), jit_math_q1(), and jit_math_sin().

+ Here is the call graph for this function:

double jit_math_j1_0 ( double  x)

Calcuates the j1_0 Bessel function.

Parameters
xinput
Returns
output

Referenced by jit_math_j1().

double jit_math_log ( double  x)

Calculates the logarithm.

Parameters
xinput
Returns
output
double jit_math_log10 ( double  x)

Calculates the logarithm base 10.

Parameters
xinput
Returns
output
double jit_math_log2 ( double  x)

Calculates the logarithm base 2.

Parameters
xinput
Returns
output
double jit_math_p1 ( double  x)

Calcuates the p1 Bessel function.

Parameters
xinput
Returns
output

Referenced by jit_math_j1().

double jit_math_pow ( double  x,
double  y 
)

Calculates x raised to the y power.

Parameters
xinput
yinput
Returns
output
double jit_math_q1 ( double  x)

Calcuates the q1 Bessel function.

Parameters
xinput
Returns
output

Referenced by jit_math_j1().

double jit_math_round ( double  x)

Rounds the input.

Parameters
xinput
Returns
output
unsigned long jit_math_roundup_poweroftwo ( unsigned long  x)

Rounds up to the nearest power of two.

Parameters
xinput
Returns
output
double jit_math_sin ( double  x)

Calculates the sine.

Parameters
xinput
Returns
output

Referenced by jit_math_j1().

double jit_math_sinh ( double  x)

Calculates the hyperbolic sine.

Parameters
xinput
Returns
output
double jit_math_sqrt ( double  x)

Calculates the square root.

Parameters
xinput
Returns
output

Referenced by jit_math_fast_acos(), and jit_math_fast_asin().

double jit_math_tan ( double  x)

Calculates the tangent.

Parameters
xinput
Returns
output
double jit_math_tanh ( double  x)

Calculates the hyperbolic tangent.

Parameters
xinput
Returns
output
double jit_math_trunc ( double  x)

Truncates the input.

Parameters
xinput
Returns
output
double jit_math_wrap ( double  x,
double  lo,
double  hi 
)

Calculates the wrap of x between lo and hi.

Parameters
xinput
lolower bound
hiupper bound
Returns
output
  Copyright © 2015, Cycling '74