shz_invf
SHZ_INLINE float shz_invf(float x) SHZ_NOEXCEPT;Approximate inverse of a signed number.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
x | float | The signed number to reciprocate. |
Returns
Section titled “Returns”The approximated value 1.0f / x.
Details
Section titled “Details”This routine takes approximately the same number of cycles as 1.0f / x on the SH4 and is slightly less accurate; however, it can be paired with a full inversion to perform the two in parallel.
- The vector forms of this routine automatically handle optimal parallelization of this operation across multiple lanes.
Warnings
Section titled “Warnings”- No division-by-zero protection:
x==0.0freturns infinity.
Availability
Section titled “Availability”- C++ equivalent:
shz::invf,shz::operator/,shz::quat::operator/= - Type-generic form: none
- Back-ends: SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- Defined in:
sh4zam/shz_scalar.h:299 - Module: Scalar, section "FSRRA"