From e27157a6ce1735391c8773c568da12b1143d1abb Mon Sep 17 00:00:00 2001 From: Jacob Lifshay Date: Fri, 2 Sep 2022 19:13:16 -0700 Subject: [PATCH] add note that sinpi/cospi are actually easier than sin/cos to implement in hardware --- openpower/transcendentals.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openpower/transcendentals.mdwn b/openpower/transcendentals.mdwn index 4d89ad7b2..cf68d6888 100644 --- a/openpower/transcendentals.mdwn +++ b/openpower/transcendentals.mdwn @@ -372,6 +372,8 @@ Ztrignpi are the basic trigonometric functions through which all others could be synthesised, and they are typically the base trigonometrics provided by GPUs for 3D, warranting their own subset. +(programmerjake: actually, all other GPU ISAs mentioned in this document have sinpi/cospi or equivalent, and often not sin/cos, because sinpi/cospi are actually *waay* easier to implement because range reduction is simply a bitwise mask, whereas for sin/cos range reduction is a full division by pi) + In the case of the Ztrigpi subset, these are commonly used in for loops with a power of two number of subdivisions, and the cost of multiplying by PI inside each loop (or cumulative addition, resulting in cumulative -- 2.30.2