Math Module
Collaboration diagram for Math Module:

## Functions

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

## Function Documentation

 double jit_math_acos ( double x )

Calculates the arccosine.

Parameters:
 x input
Returns:
output
 double jit_math_acosh ( double x )

Calculates the hyperbolic arccosine.

Parameters:
 x input
Returns:
output
 double jit_math_asin ( double x )

Calculates the arcsine.

Parameters:
 x input
Returns:
output
 double jit_math_asinh ( double x )

Calculates the hyperbolic arcsine.

Parameters:
 x input
Returns:
output
 double jit_math_atan ( double x )

Calculates the arctangent.

Parameters:
 x input
Returns:
output
 double jit_math_atan2 ( double y, double x )

Parameters:
 y input x input
Returns:
output
 double jit_math_atanh ( double x )

Calculates the hyperbolic arctangent.

Parameters:
 x input
Returns:
output
 double jit_math_ceil ( double x )

Calculates the ceiling.

Parameters:
 x input
Returns:
output
 double jit_math_cos ( double x )

Calculates the cosine.

Parameters:
 x input
Returns:
output
 double jit_math_cosh ( double x )

Calculates the hyperbolic cosine.

Parameters:
 x input
Returns:
output
 double jit_math_exp ( double x )

Calculates the exponent.

Parameters:
 x input
Returns:
output
 double jit_math_exp2 ( double x )

Calculates the exponent base 2.

Parameters:
 x input
Returns:
output
 double jit_math_expm1 ( double x )

Calculates the exponent minus 1.

Parameters:
 x input
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:
 x input
Returns:
output
 float jit_math_fast_asin ( float x )

Calculates the arcsine by fast approximation.

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

Parameters:
 x input
Returns:
output
 float jit_math_fast_atan ( float x )

Calculates the arctangent by fast approximation.

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

Parameters:
 x input
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:
 x input
Returns:
output
 float jit_math_fast_invsqrt ( float x )

Calculates the inverse square root by fast approximation.

Parameters:
 x input
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:
 x input
Returns:
output
 float jit_math_fast_sqrt ( float n )

Calculates the square root by fast approximation.

Parameters:
 n input
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:
 x input
Returns:
output
 double jit_math_floor ( double x )

Calculates the floor.

Parameters:
 x input
Returns:
output
 double jit_math_fmod ( double x, double y )

Calculates the floating point x modulo y.

Parameters:
 x input y input
Returns:
output
 double jit_math_fold ( double x, double lo, double hi )

Calculates the fold of x between lo and hi.

Parameters:
 x input lo lower bound hi upper bound
Returns:
output
 double jit_math_hypot ( double x, double y )

Calculates the hypotenuse.

Parameters:
 x input y input
Returns:
output
 long jit_math_is_finite ( float v )

Checks if input is finite.

Parameters:
 v input
Returns:
1 if finite. Otherwise, 0.
 long jit_math_is_nan ( float v )

Checks if input is not a number (NaN).

Parameters:
 v input
Returns:
1 if not a number. Otherwise, 0.
 long jit_math_is_poweroftwo ( long x )

Checks if input is a power of two.

Parameters:
 x input
Returns:
1 if finite. Otherwise, 0.
 long jit_math_is_valid ( float v )

Checks if input is both finite and a number.

Parameters:
 v input
Returns:
1 if vaild. Otherwise, 0.
 double jit_math_j1 ( double x )

Calcuates the j1 Bessel function.

Parameters:
 x input
Returns:
output
 double jit_math_j1_0 ( double x )

Calcuates the j1_0 Bessel function.

Parameters:
 x input
Returns:
output
 double jit_math_log ( double x )

Calculates the logarithm.

Parameters:
 x input
Returns:
output
 double jit_math_log10 ( double x )

Calculates the logarithm base 10.

Parameters:
 x input
Returns:
output
 double jit_math_log2 ( double x )

Calculates the logarithm base 2.

Parameters:
 x input
Returns:
output
 double jit_math_p1 ( double x )

Calcuates the p1 Bessel function.

Parameters:
 x input
Returns:
output
 double jit_math_pow ( double x, double y )

Calculates x raised to the y power.

Parameters:
 x input y input
Returns:
output
 double jit_math_q1 ( double x )

Calcuates the q1 Bessel function.

Parameters:
 x input
Returns:
output
 double jit_math_round ( double x )

Rounds the input.

Parameters:
 x input
Returns:
output
 unsigned long jit_math_roundup_poweroftwo ( unsigned long x )

Rounds up to the nearest power of two.

Parameters:
 x input
Returns:
output
 double jit_math_sin ( double x )

Calculates the sine.

Parameters:
 x input
Returns:
output
 double jit_math_sinh ( double x )

Calculates the hyperbolic sine.

Parameters:
 x input
Returns:
output
 double jit_math_sqrt ( double x )

Calculates the square root.

Parameters:
 x input
Returns:
output
 double jit_math_tan ( double x )

Calculates the tangent.

Parameters:
 x input
Returns:
output
 double jit_math_tanh ( double x )

Calculates the hyperbolic tangent.

Parameters:
 x input
Returns:
output
 double jit_math_trunc ( double x )

Truncates the input.

Parameters:
 x input
Returns:
output
 double jit_math_wrap ( double x, double lo, double hi )

Calculates the wrap of x between lo and hi.

Parameters:
 x input lo lower bound hi upper bound
Returns:
output