Go to the source code of this file.
◆ sofm_sqrt_int16()
| uint16_t sofm_sqrt_int16 |
( |
uint16_t | u | ) |
|
sofm_sqrt_int16() - Calculate 16-bit fractional square root function.
- Parameters
-
| u | Input value in Q4.12 format, from 0 to 16.0. |
- Returns
- Calculated square root of n in Q4.12 format, from 0 to 4.0.
◆ sofm_sqrt_int32()
| int32_t sofm_sqrt_int32 |
( |
int32_t | n | ) |
|
sofm_sqrt_int32() - Calculate 32-bit fractional square root function.
- Parameters
-
| n | Input value in Q2.30 format, from 0 to 2.0. |
- Returns
- Calculated square root of n in Q2.30 format.
The input range of square root function is matched with Q1.31 complex numbers range where the magnitude squared can be to 2.0. The function returns zero for non-positive input values.