[libre-riscv-dev] [isa-dev] Re: FP transcendentals (trigonometry, root/exp/log) proposal
Mitchalsup
mitchalsup at aol.com
Thu Jan 16 17:50:18 GMT 2020
Mitch AlsupMitchAlsup at aol.com
-----Original Message-----
From: lkcl . <luke.leighton at gmail.com>
To: Jacob Lifshay <programmerjake at gmail.com>
Cc: MitchAlsup <MitchAlsup at aol.com>; Libre-RISCV General Development <libre-riscv-dev at lists.libre-riscv.org>
Sent: Wed, Jan 15, 2020 9:04 pm
Subject: Re: [isa-dev] Re: FP transcendentals (trigonometry, root/exp/log) proposal
(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 greatin my implementation the number of exceptions is about 1/243* there's an *easy* (fast) way to detect the times when rounding would be wrong.You look for 3 patterns in the bits being considered for rounding.* what about when the accuracy is in ULP 1?In my implementation the accuracy is always better than 1ULP prior to rounding which can become exactly 1ULP after rounding
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