03.08.2013 Views

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Function MLIB_Div_FLT<br />

4.139 Function MLIB_Div_FLT<br />

This function divides the first parameter by the second one.<br />

4.139.1 Declaration<br />

tFloat MLIB_Div_FLT(register tFloat fltIn1, register tFloat fltIn2);<br />

4.139.2 Arguments<br />

Table 4-176. MLIB_Div_FLT arguments<br />

Type Name Direction Description<br />

register tFloat fltIn1 input Numerator of division.<br />

register tFloat fltIn2 input Denominator of division.<br />

4.139.3 Return<br />

Division of two input values.<br />

4.139.4 Description<br />

This inline function returns the division of two input values. The first input value is<br />

numerator <strong>and</strong> the second input value is denominator. The input values as well as output<br />

value is considered as single precision floating point data type. The output saturation is<br />

not implemented in this function, thus in case the division of input values is outside the<br />

(-2 128 , 2 128 ) interval, the output value will overflow without any detection. As the<br />

division by zero can be h<strong>and</strong>led differently on each plat<strong>for</strong>m <strong>and</strong> potentially can cause the<br />

core exception, the division by zero is h<strong>and</strong>led separately.<br />

The output of the function is defined by the following simple equation:<br />

<strong>Embedded</strong> <strong>Software</strong> <strong>and</strong> <strong>Motor</strong> <strong>Control</strong> <strong>Libraries</strong> <strong>for</strong> <strong>PXR40xx</strong>, Rev. 1.0<br />

590 Freescale Semiconductor, Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!