| Electronic Components Datasheet Search |
|
PM0014 Datasheet(PDF) 33 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0014 Datasheet(HTML) 33 Page - STMicroelectronics |
|
33 / 46 page ![]() PM0014 Arithmetic library functions 33/46 5.7 Function approximation 5.7.1 sqrt_p16q16_p8q8 void sqrt_p16q16_p8q8 (short xmsb, short xlsb, short *Output). Description: The square root function is approximated by the Hoerner polynomial. The input is in 16.16 format and the output is in 8.8 format with a precision to within three least significant bits. Argument: xmsb Input most significant bits. xlsb Input least significant bits. Output Output pointer. Algorithm: x1/2 ≈ 0.2075806 + 1.454895x - 1.34491x2 +1.106812x3 - 0.536499x4 + 0.11212116x5 Note: The input value can range from 0 to 215 - 1/215. In fact the previous approximation is valid only between 0.5 and 1 but all inputs are scaled into this range. Assembly source code: sqrt_p16q16_p8q8.asm Code size and cycles: Size: 330 bytes Instruction cycles: 164 Test: Two files are provided to test the function: an input vector file (sqrt_p16q16_p8q8.in) and an output vector file (sqrt_p16q16_p8q8.res): sqrt_p16q16_p8q8.in is made as follows: OpLsb1, OpMsb1, OpLsb2, OpMsb2, ... sqrt_p16q16_p8q8.res is made as follows: Output1, Output2, ... |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |