[libre-riscv-dev] fp special functions
Luke Kenneth Casson Leighton
lkcl at lkcl.net
Mon Aug 5 01:26:02 BST 2019
On Sun, Aug 4, 2019 at 7:17 PM Jacob Lifshay <programmerjake at gmail.com> wrote:
>
> On Sat, Aug 3, 2019, 22:25 Luke Kenneth Casson Leighton <lkcl at lkcl.net>
> wrote:
> general powers (as separate extension due to complexity; exp2/log2 plus
> checking for odd powers/roots is sufficient for graphics):
> * pow
> * root
also, you wouldn't get the full accuracy however multiplying by the
base is sufficient to get arbitrary power-of (take log, multiply,
perform exponent). 3 operations... less accurate... but saves on
hardware complexity.
likewise exp10 could be done if you only have exp2, by multiplying by
a magic constant (log(10)/log(2)). it's been a while... there will be
a wolfram or wikipedia page somewhere.
l.
More information about the libre-riscv-dev
mailing list