
302 GPGPU Programming for Games and Science
uses only multiplications and additions and has no branching. For applica-
tions that make heavy use of SLERP, the approximation provides a decent
approximation with a significant speedup.
An alternative that is faster and more robust is presented in [10], which in-
volves a two-variable polynomial approximation. The algorithm uses only mul-
tiplication, addition, and subtraction and does not require division, branching,
or testing for special conditions. It is also friendly to SIMD.
The coefficient sin(tθ)/ sin(θ) in Equation (6.92) is evaluated for t ∈ [0, 1].
It has the same form as sin(nθ)/ sin(θ) for nonneg ...