[libre-riscv-dev] [isa-dev] Re: FP transcendentals (trigonometry, root/exp/log) proposal
Allen Baum
allen.baum at esperantotech.com
Thu Aug 8 20:09:11 BST 2019
Regarding the statement:
As with frm, an implementation can choose to support any permutation of
dynamic fam-instruction pairs.
It will illegal-instruction trap upon executing an unsupported
fam-instruction pair.
Putting my compliance hat on (I have to do that a lot), this works only if
- the reference model is capable of being configured to trapon any
permutation of illegal opcodes, OR
- the compliance framework can load and properly execute abitrary (vendor
supplied) emulation routines
-- and they get exactly the same answer as the reference model.
This is all mot if you don't want to use the RISC-V trademark, or the
platform doesn't requirement whatever is non-compliant, of course (which
isn't flippant - its then a custom extension that may work perfectly well
for some custom appllication).
On Thu, Aug 8, 2019 at 11:36 AM Allen Baum <allen.baum at esperantotech.com>
wrote:
> For what it's worth, the HP calculator algorithms had Prof. Kahan as a
> consultant (and HP had exclusive rights for the decimal versions of the
> algorithm; I think Intel had rights to the binary versions).
> Their accuracy requirements were that the result was accurate to with +/-1
> bit of the *input* argument, which gives quite a bit of leeway when the
> slope of the function is extremely steep. Since many of the trig functions
> required input reduction of X mod pi ( or 2pi of .5pi - don't recall) -
> that could be pretty far out without ~99 digits of pi to reduce it, and
> even if it was perfectly reduced, one LSB of X.xxxxxxxxE 99 is not a small
> number, so accuracy at the end of the scale is a bit nebulous.
>
> On Thu, Aug 8, 2019 at 8:58 AM 'MitchAlsup' via RISC-V ISA Dev <
> isa-dev at groups.riscv.org> wrote:
>
>>
>> We are talking about all of this without a point of reference.
>>
>> Here is what I do know about correctly rounded transcendentals::
>>
>> My technology for performing transcendentals in an FMAC unit performs a
>> power series polynomial calculation.
>>
>> I can achieve 14 cycle LN2, EXP2 and 19 cycle SIN, COS faithfully rounded
>> with coefficient tables which are (essentially) the same size as the
>> FDIV/FSQRT seed tables for Newton-Raphson (or Goldschmidt) iterations. FDIV
>> will end up at 17 cycles and FSQRT at 23 cycles. This is exactly what
>> Opteron FDIV/FSQRT performance was (oh so onog ago).
>>
>> If you impose the correctly rounded requirement::
>> a) the size of the coefficient tables grows by 3.5× and
>> b) the number of cycles to compute grows by 1.8×
>> c) the power to compute grows by 2.5×
>> For a gain of accuracy of about 0.005 ULP
>>
>> --
>> 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/26e2386a-8a8e-450b-9ab7-dc2453ccce71%40groups.riscv.org
>> <https://groups.google.com/a/groups.riscv.org/d/msgid/isa-dev/26e2386a-8a8e-450b-9ab7-dc2453ccce71%40groups.riscv.org?utm_medium=email&utm_source=footer>
>> .
>>
>
More information about the libre-riscv-dev
mailing list