mathop.h File Reference

Math operations. More...

#include "generic.h"

Go to the source code of this file.

Defines

#define VL_PI   3.141592653589793
 Pi (math constant).
#define VL_SINGLE_EPSILON   1.19209290E-07F
 Single precision epsilon (math constant).
#define VL_DOUBLE_EPSILON   2.220446049250313e-16
 Double precision epsilon (math constant).

Functions

VL_INLINE vl_single vl_mod_2pi_f (vl_single x)
 Modulo 2 PI.
VL_INLINE vl_double vl_mod_2pi_d (vl_double x)
 Modulo 2 PI.
VL_INLINE int vl_floor_f (vl_single x)
 Floor operation ((int) floor(x)).
VL_INLINE int vl_floor_d (vl_double x)
 Floor operation ((int) floor(x)).
VL_INLINE vl_single vl_abs_f (vl_single x)
 Fast abs(x).
VL_INLINE vl_double vl_abs_d (vl_double x)
 Fast abs(x).
VL_INLINE vl_single vl_fast_atan2_f (vl_single y, vl_single x)
 Fast atan2 approximation.
VL_INLINE vl_double vl_fast_atan2_d (vl_double y, vl_double x)
 Fast atan2 approximation.
VL_INLINE vl_single vl_fast_resqrt_f (vl_single x)
 Fast resqrt approximation.
VL_INLINE vl_double vl_fast_resqrt_d (vl_double x)
 Fast resqrt approximation.
VL_INLINE vl_single vl_fast_sqrt_f (vl_single x)
 Fast sqrt approximation.
VL_INLINE vl_double vl_fast_sqrt_d (vl_double x)
 Fast sqrt approximation.


Detailed Description

Author:
Andrea Vedaldi

Define Documentation

#define VL_DOUBLE_EPSILON   2.220446049250313e-16

Difference of the smallest representable number greater than 1.0 and 1.0.

#define VL_SINGLE_EPSILON   1.19209290E-07F

Difference of the smallest representable number greater than 1.0 and 1.0.


Function Documentation

VL_INLINE vl_double vl_abs_d ( vl_double  x  ) 

---------------------------------------------------------------

Parameters:
x argument.
Returns:
abs(x)

VL_INLINE vl_single vl_abs_f ( vl_single  x  ) 

---------------------------------------------------------------

Parameters:
x argument.
Returns:
abs(x)

VL_INLINE vl_double vl_fast_atan2_d ( vl_double  y,
vl_double  x 
)

----------------------------------------------------------------

Parameters:
x argument.
y argument.
Returns:
Approximation of atan2(x).

VL_INLINE vl_single vl_fast_atan2_f ( vl_single  y,
vl_single  x 
)

----------------------------------------------------------------

Parameters:
x argument.
y argument.
Returns:
Approximation of atan2(x).

VL_INLINE vl_double vl_fast_resqrt_d ( vl_double  x  ) 

---------------------------------------------------------------

Parameters:
x argument.
Returns:
Approximation to resqrt(x).

VL_INLINE vl_single vl_fast_resqrt_f ( vl_single  x  ) 

---------------------------------------------------------------

Parameters:
x argument.
Returns:
Approximation to resqrt(x).

VL_INLINE vl_double vl_fast_sqrt_d ( vl_double  x  ) 

---------------------------------------------------------------

Parameters:
x argument.
Returns:
Approximation to sqrt(x).

VL_INLINE vl_single vl_fast_sqrt_f ( vl_single  x  ) 

---------------------------------------------------------------

Parameters:
x argument.
Returns:
Approximation to sqrt(x).

VL_INLINE int vl_floor_d ( vl_double  x  ) 

---------------------------------------------------------------

Parameters:
x argument.
Returns:
(int) floor(x)

VL_INLINE int vl_floor_f ( vl_single  x  ) 

---------------------------------------------------------------

Parameters:
x argument.
Returns:
(int) floor(x)

VL_INLINE vl_double vl_mod_2pi_d ( vl_double  x  ) 

---------------------------------------------------------------

The function is optimized for small values of x.

Returns:
mod(x, 2 * VL_PI)

VL_INLINE vl_single vl_mod_2pi_f ( vl_single  x  ) 

---------------------------------------------------------------

The function is optimized for small values of x.

Returns:
mod(x, 2 * VL_PI)


Generated on Mon Jan 21 17:43:33 2008 for vlfeat by  doxygen 1.5.4