1.4.4.24 Fract_XtimesY_Q15bfp Function

fract_q15bfp_t Fract_XtimesY_Q15bfp(fract_q15bfp_t x, fract_q15bfp_t y )

Summary

Multiply X times Y, for Q15 block floating point arguments.

Description

Multiply X times Y, for Q15 block floating point arguments.

Preconditions

None.

Parameters

x Q15 block floating point multiplicand

y Q15 block floating point multiplicand

Returns

Product x*y as Q15 block floating point

Remarks

None.

Example

fract_q15bfp_t X,Y,XtimesY;

X.m = 0x1234;

X.e = 0; _// 4660/32768 = 0.142219_

Y.m = 0x5678;

Y.e = 0; _// 22136/32768 = 0.675537_

XtimesY = Fract_XtimesY_Q15bfp(X,Y);

_// XtimesY.m = 0x6260 = 25184/32768 = 0.768554_

_// XtimesY.e = 0xFFFD = -3_

_// XtimesY = 0.768554>>3 = 0.096069_

_// X*Y = 0.142219 * 0.675537 = 0.096069_

C

fract_q15bfp_t Fract_XtimesY_Q15bfp (fract_q15bfp_t x , fract_q15bfp_t y );