/* ======================================================================== */ /* TEXAS INSTRUMENTS, INC. */ /* */ /* NAME */ /* DSPF_sp_vecrecip -- Single Precision vector reciprocal */ /* */ /* USAGE */ /* */ /* This routine is C callable, and has the following C prototype: */ /* */ /* void DSPF_sp_vecrecip(const float *x, */ /* float * restrict r, */ /* int n */ /* ) */ /* */ /* x : Pointer to input array */ /* r : Pointer to output array */ /* n : Number of elements in array */ /* */ /* DESCRIPTION */ /* */ /* The DSPF_sp_vecrecip module calculates the reciprocal of each element */ /* in the array x and returns the output in array r. It uses 2 */ /* iterations of the Newton-Raphson method to improve the accuracy */ /* of the output generated by the RCPSP instruction of the C67x. */ /* Each iteration doubles the accuracy. The initial output generated */ /* by RCPSP is 8 bits.So after the first iteration it is 16 bits and */ /* after the second it is the full 23 bits. The formula used is: */ /* */ /* r[n+1] = r[n](2 - v*r[n]) */ /* */ /* where v = the number whose reciprocal is to be found. */ /* x[0], the seed value for the algorithm, is given by RCPSP. */ /* */ /* ------------------------------------------------------------------------ */ /* Copyright (c) 2003 Texas Instruments, Incorporated. */ /* All Rights Reserved. */ /* ======================================================================== */ #ifndef DSPF_SP_VECRECIP_ #define DSPF_SP_VECRECIP_ 1 void DSPF_sp_vecrecip(const float * x, float * restrict r, int n); #endif /* ======================================================================== */ /* End of file: dspf_sp_vecrecip.h */ /* ------------------------------------------------------------------------ */ /* Copyright (C) 2003 Texas Instruments, Incorporated. */ /* All Rights Reserved. */ /* ======================================================================== */