Atmel Software Framework

op_dsp16_fix_sqrt.c File Reference
#include "dsp.h"
#include "preprocessor.h"

Macros

#define DSP16_SQRT_NEWTON_ITERATION(x_num, data)
 
#define DSP16_SQRT_ONE_POINT_FIVE   ((S32) (3 << (DSP16_QB-1)))
 

Functions

dsp16_t dsp16_op_sqrt (dsp16_t num)
 16-bit fixed point version of the square root function. More...
 

#define DSP16_SQRT_NEWTON_ITERATION (   x_num,
  data 
)
Value:
a = ((S32) x)*((S32) x); \
a = (((S32) num)*a) >> (DSP16_QB+1); \
#define DSP16_SQRT_ONE_POINT_FIVE
Definition: op_dsp16_fix_sqrt.c:53
return a(a%b)
int32_t S32
32-bit signed integer.
Definition: compiler.h:224
A_ALIGNED dsp32_t num[NUM_SIZE]
Definition: dsp32_iirpart/iirpart_example.c:102
#define DSP16_QB
number of fractional bits
Definition: dsp_types.h:144
A_ALIGNED dsp32_t x[SIZE+NUM_SIZE]
The input signal.
Definition: dsp32_iirpart/iirpart_example.c:149

Referenced by dsp16_op_sqrt().

#define DSP16_SQRT_ONE_POINT_FIVE   ((S32) (3 << (DSP16_QB-1)))