From 990a2341581f68077e2ce5a0628bd519b8e7907c Mon Sep 17 00:00:00 2001 From: baewoojin <dnwls514@ajou.ac.kr> Date: Thu, 20 Aug 2020 16:22:30 +0900 Subject: [PATCH] Update README.md --- testing/README.md | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/testing/README.md b/testing/README.md index 2fe2f99..1cea696 100644 --- a/testing/README.md +++ b/testing/README.md @@ -10,6 +10,7 @@ - 1.1.2 basic concept - To operate several calculation for fixed-point numebr type casting is essential. - Correct type conversion is very important in order to accurately calculate and avoid missing bits. + - in iteration2, with using shift operation can create a variety of functions that perform differently under different conditions. - 1.1.3 concept of fixed-point number -  - a. data types in computer langauge always have fixed length @@ -23,7 +24,7 @@ ## 2. overall description ### - 2.1 product functions - 2.1.1 list of fuctions - - 2.1.1.1 stpe 1 + - 2.1.1.1 iteration 1 - a. add ~~~ #define fx_add(a, b) ((a)+(b)) @@ -83,4 +84,35 @@ - to do sqrt operation with fixed point number there is need to type conversion - first convert fixed number to double - second do sqrt operation with math library - - thrid conver result calculated by second step to double and return result \ No newline at end of file + - thrid conver result calculated by second step to double and return result + - 2.1.1.2 iteration 2 + - a. mul + ~~~ + ((fa * fb) >> FX32_QNUM ) + ~~~ + - fuction that multiplies fa and fb and divides it by 2^32 + - b. mul1 + ~~~ + ((fa>>16) * fb)>>16) + ~~~ + - Same as fx32_mul, the same fuction as fa*fb>>32, first multiply fa/2^16 and fb, and divide the remaining 2^16 + - c. mul2 + ~~~ + (((fa>>8)*(fb>>8))>>16) + ~~~ + - Same as above, the same fuction as fa*fb>>32, first multiply fa/2^8, fb/2^8, and divide the remaining 2^16 + - d. div + ~~~ + ((((fixed64)(fa) << FX32_QNUM) /(fb))) + ~~~ + - fuction that multiplies fa by 2^32 and divides fb. + - e. div1 + ~~~ + ((((fa)<<16)/(fb))<<16) + ~~~ + - Same as above, it has the same fuction as (fa<<32)/fb. First, fa is multiplied by 2^16 and divided by fb, and then the remaining 2^16 is multiplied + - f. div2 + ~~~ + ((((fa)<<24)/(fb))<<8) + ~~~ + - same as above, it has the same fuction as (fa<<32)/fb. First, fa is multiplied by 2^24, divided by fb, and then the remaining 2^8 is multiplied. \ No newline at end of file -- GitLab