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

lkcl . luke.leighton at gmail.com
Thu Jan 16 03:04:23 GMT 2020


(removing isa-dev, i'm done with them, mitch)

On Thu, Jan 16, 2020 at 1:31 AM Jacob Lifshay <programmerjake at gmail.com>
wrote:

> On Wed, Jan 15, 2020, 17:10 'MitchAlsup' via RISC-V ISA Dev <
> isa-dev at groups.riscv.org> wrote:
>


>
>
There is one way around this that I did invent::
>> Consider a set of instructions that for a "very vast majority" of input
>> operands deliver results completely compatible with IEEE 754-2008.
>> For those results that are not, we are at most off by a rounding
>> (otherwise the very vast majority could not have been correct.)
>> Since these are only different by a rounding (conforming to the word
>> "Faithful" rounding), we can detect those pre-rounded results that could
>> potentially be misrounded, and instead of delivering an incorrect IEEE
>> 754-2008 but a faithfully rounded result, instead we raise an UNCERTAIN
>> exception (that is an exception not currently in anyone's exception list) ,
>> and let a long winded, known to be correct, hunk of SW produce the IEEE
>> 754-2008 compliant result.
>>
>
> That's a good idea!
>

i like it, as long as:

* the number of exceptions is not great
* there's an *easy* (fast) way to detect the times when rounding would be
wrong.
* what about when the accuracy is in ULP 1?

as in: for some low-cost algorithm implementations their accuracy is
reduced sufficiently that the last place is wrong a significant amount of
the time (let alone rounding).  how do you *know* when the rounding (or the
last bit of the mantissa) is wrong?

l.


More information about the libre-riscv-dev mailing list