gr_math.h File Reference

Go to the source code of this file.

Functions

long gr_gcd (long m, long n)
int gr_isnan (double value)
int gr_signbit (double x)
float gr_fast_atan2f (float y, float x)
 Fast arc tangent using table lookup and linear interpolation.


Function Documentation

float gr_fast_atan2f ( float  y,
float  x 
)

Fast arc tangent using table lookup and linear interpolation.

Parameters:
y component of input vector
x component of input vector
Returns:
float angle angle of vector (x, y) in radians
This function calculates the angle of the vector (x,y) based on a table lookup and linear interpolation. The table uses a 256 point table covering -45 to +45 degrees and uses symetry to determine the final angle value in the range of -180 to 180 degrees. Note that this function uses the small angle approximation for values close to zero. This routine calculates the arc tangent with an average error of +/- 0.045 degrees.

long gr_gcd ( long  m,
long  n 
)

int gr_isnan ( double  value  ) 

int gr_signbit ( double  x  ) 


Generated on Sat Apr 18 14:00:49 2009 for GNU Radio 3.0.4 by  doxygen 1.5.8