diff --git a/testing/README.md b/testing/README.md index 2fe8e84d826e8da3acba8e7949580b0950214749..2fe2f991ab2f4a96eb66058ccdec4c41f98a7f82 100644 --- a/testing/README.md +++ b/testing/README.md @@ -59,4 +59,28 @@ ~~~ #define double_to_fx(a) (long long)(a*P2_2to32) ~~~ - - to convert double to fixed point should multiply double number and 2^32(s31(32)=>decimal part bits) \ No newline at end of file + - to convert double to fixed point should multiply double number and 2^32(s31(32)=>decimal part bits) + - h. sine + ~~~ + #define fx_sin(a) double_to_fx(sin(fx_to_double(a))) + ~~~ + - to convert fixed point number to sine value there is need to type conversion + - first convert fixed number to double + - second do sine operation with math library + - thrid conver result calculated by second step to double and return result + - i. power + ~~~ + #define fx_power(a, b) double_to_fx(pow(fx_to_double(a), fx_to_double(b))) + ~~~ + - to do power 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 + - j. sqrt + ~~~ + #define fx_sqrt(a) double_to_fx(sqrt(fx_to_double(a))) + ~~~ + - 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