From: Jacob Lifshay Date: Sat, 3 Sep 2022 02:13:16 +0000 (-0700) Subject: add note that sinpi/cospi are actually easier than sin/cos to implement in hardware X-Git-Tag: opf_rfc_ls005_v1~717 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e27157a6ce1735391c8773c568da12b1143d1abb;p=libreriscv.git add note that sinpi/cospi are actually easier than sin/cos to implement in hardware --- 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