shz_invf_fsrra
SHZ_INLINE float shz_invf_fsrra(float x) SHZ_NOEXCEPT;Fast unsigned approximate inverse of a number.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
x | float | The unsigned number to reciprocate. |
Returns
Section titled “Returns”The approximated value 1.0f / fabsf(x).
Details
Section titled “Details”This routine returns a fast unsigned reciprocal, which is approximately equal to 1.0f / fabsf(x). It can also be paired with a real floating-point reciprocal in the same form with both computing in parallel.
- The vector forms of this routine automatically handle optimal parallelization of this operation across multiple lanes.
Warnings
Section titled “Warnings”- The result value is always positive, regardless of the sign of
x. - No division-by-zero protection:
x==0.0freturns infinity.
Naming and requirements
Section titled “Naming and requirements”_fsrra: UsesFSRRA(fast approximate 1/sqrt(x)). The argument or denominator must be positive. Faster, less precise. (Naming and Suffixes)
Availability
Section titled “Availability”- C++ equivalent:
shz::invf_fsrra - Type-generic form: none
- Back-ends: SH4: shared C implementation · SW: portable C · SPU: shared C implementation
- Defined in:
sh4zam/shz_scalar.h:318 - Module: Scalar, section "FSRRA"
See also
Section titled “See also”shz_invf, shz_vec2_inv_fsrra, shz_vec3_inv_fsrra, shz_vec4_inv_fsrra