Skip to content
Snippets Groups Projects
Commit b8637062 authored by Hanjungwoo's avatar Hanjungwoo
Browse files
parents d56bc49a c8a7acbe
No related branches found
No related tags found
No related merge requests found
......@@ -183,23 +183,23 @@
- a. mul
- fx32_mul
~~~
(fixed32)((fa * fb) >> FX32_QNUM )
((fa * fb) >> FX32_QNUM )
~~~
1. fuction that multiplies fa and fb and divides it by 2^32
- fx32_mul1
~~~
((fixed32)(((fa>>16) * fb)>>16))
((fa>>16) * fb)>>16)
~~~
1. Same as fx32_mul, the same fuction as fa*fb>>32, first multiply fa/2^16 and fb, and divide the remaining 2^16
- fx32_mul2
~~~
((fixed32)(((fa>>8)*(fb>>8))>>16))
(((fa>>8)*(fb>>8))>>16)
~~~
1. Same as above, the same fuction as fa*fb>>32, first multiply fa/2^8, fb/2^8, and divide the remaining 2^16
- b. div
- fx32_div
~~~
(fixed32)( (((fixed64)(fa) << FX32_QNUM) /(fb)))
( (((fixed64)(fa) << FX32_QNUM) /(fb)))
~~~
1. fuction that multiplies fa by 2^32 and divides fb.
- fx32_div1
......@@ -250,6 +250,28 @@
}
~~~
- with using sine table and sine function can derive the appropriate sine value.
- there are four part in sine function because it is divided from the 1st quadrant to the 4th quadrant according to the sine value.
- a. angle with negative value
~~~
if ( fa < 0 )
{
sign = -1;
fa *= -1;
}
~~~
- b. 3th, 4th quadrant
~~~
if ( fa >= FX32_180 )
{
sign *= -1;
fa -= FX32_180;
}
~~~
- c. 2th quadrant
~~~
if ( fa > FX32_90 )
fa = FX32_180 - fa;
~~~
### 3. speed vertification review
- a. mul
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment