EasyManuals Logo

Texas Instruments C28 Series User Manual

Texas Instruments C28 Series
76 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #72 background imageLoading...
Page #72 background image
Function Descriptions
3.38 Fast Square Root
Description:
This function is an inline optmized fast square root function using two iterations of the newton
raphson method to achieve an accurate result.
Header File:
FPU.h
Declaration:
inline static float32 __ffsqrtf(float32 x)
Usage:
__ffsqrtf(x);
float32 x
input variable
Alignment Requirements:
None
Notes:
1. Performance is best with -o2, -mn compiler options (cgtools v6.0.1)
Example:
#include "FPU.h"
float32 x,y;
main()
{
y = __ffsqrtf(x);
}
Benchmark Information:
A single invocation of the __ffsqrtf function takes 22 cycles to complete. Inspection of the
generated assembly code would reveal 11 NOP’s used as delay slots between instructions. If
the user were to chain back-to-back invocations of the __ffsqrtf function, and then subsequently
use the results in either arithmetic or assignment statements, the compiler will interleave the
instructions of both functions, effectively resulting in 11 cycles per function call. The compiler
will not interleave the instructions of back-to-back functions if their results are subsequently
used in logical statements.
Sep 10, 2012 72

Table of Contents

Other manuals for Texas Instruments C28 Series

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments C28 Series and is the answer not in the manual?

Texas Instruments C28 Series Specifications

General IconGeneral
BrandTexas Instruments
ModelC28 Series
CategoryComputer Hardware
LanguageEnglish

Related product manuals