Microchip® Advanced 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:46
A_ALIGNED dsp32_t x[FIR_COEF_SIZE]
Definition: simulator_examples/dsp32_nlms/nlms_example.c:229
return a(a%b)
int32_t S32
32-bit signed integer.
Definition: compiler.h:217
#define DSP16_QB
number of fractional bits
Definition: dsp_types.h:137
A_ALIGNED dsp32_t num[NUM_SIZE]
Definition: simulator_examples/dsp32_iir/iir_example.c:87

Referenced by dsp16_op_sqrt().

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