Skip to content

shz_invf

Markdown
SHZ_INLINE float shz_invf(float x) SHZ_NOEXCEPT;

Approximate inverse of a signed number.

NameTypeDescription
xfloatThe signed number to reciprocate.

The approximated value 1.0f / x.

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.
  • No division-by-zero protection: x == 0.0f returns infinity.

shz_invf_fsrra, shz_vec2_inv, shz_vec3_inv, shz_vec4_inv