Expand description
Square root of f32 for no_std, powered by embedded-f32-sqrt.
This module calls embedded_f32_sqrt::sqrt rather than relying on
micromath or floating-point methods that require std. It uses
IEEE 754 bit manipulation and Newton-Raphson iterations and is suitable
for embedded targets with or without an FPU.
§Behavior
| Input | Result |
|---|---|
>= 0.0 | Ok(square_root) |
-0.0 | Ok(-0.0) |
| Negative value | Err(NegativeInput) |
NaN | Ok(NaN) |
+Infinity | Ok(+Infinity) |
Structs§
- Negative
Input - Error returned for a negative input.
Functions§
- sqrt
- Computes the square root of
x.