[libre-riscv-dev] [isa-dev] Re: FP transcendentals (trigonometry, root/exp/log) proposal

Hendrik Boom hendrik at topoi.pooq.com
Wed Sep 11 21:38:59 BST 2019


On Wed, Sep 11, 2019 at 12:42:14PM -0700, Allen Baum wrote:
> Argument reduction is a huge pain; maybe even slower than the evaluation
> once it's finished?
> HP calculators guaranteed  accuracy to 1 LSdigit in the *input* argument
> (which is much, much larger than 2pi), not in the output

That's a pretty standard way of doing numerical precision.  I first found it 
in a book by I think Wilkinson in the 70's.  You get the exact answer to an 
approximation to the argument.  And you can do backward chaining on these.  
The equations you get are rather elegant.  Similar equations hold for matrix 
operations, such as inversion.

Of course what you *want* is to know how precise your arguments have to be 
to achieve a certain precision of result.

-- hendrik
   
> 
> On Wed, Sep 11, 2019 at 12:23 PM Jacob Lifshay <programmerjake at gmail.com>
> wrote:
> 
> > On Wed, Sep 11, 2019, 04:43 lkcl <luke.leighton at gmail.com> wrote:
> >
> >>
> >> https://gpuopen.com/wp-content/uploads/2019/08/RDNA_Shader_ISA_5August2019.pdf
> >>
> >>>
> >> someone kindly (privately) pointed out the above - table 22, p44 - and
> >> apart from updating to include F16 and in some cases F64, the opcodes
> >> provided *have not changed* in 11 years since the R500.
> >>
> >
> > looking through it again, the sin/cos instructions for Radeon are actually
> > sin(x * 2 * pi) and cos(x * 2 * pi), reinforcing my idea to just implement
> > sinpi/cospi for GPU applications, though there is a V_TRIG_PREOP_F64
> > instruction to accelerate argument reduction for f64 sin/cos.
> >
> > Jacob
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "RISC-V ISA Dev" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to isa-dev+unsubscribe at groups.riscv.org.
> > To view this discussion on the web visit
> > https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/CAC2bXD4_Mr2Bg4GBrTy9YPaxgsZUXGWeGcp5GEsseAPUhOFbQQ%40mail.gmail.com
> > <https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/CAC2bXD4_Mr2Bg4GBrTy9YPaxgsZUXGWeGcp5GEsseAPUhOFbQQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> > .
> >
> _______________________________________________
> libre-riscv-dev mailing list
> libre-riscv-dev at lists.libre-riscv.org
> http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev



More information about the libre-riscv-dev mailing list