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

Jacob Lifshay programmerjake at gmail.com
Thu Aug 8 12:56:00 BST 2019


On Thu, Aug 8, 2019, 03:09 Jacob Lifshay <programmerjake at gmail.com> wrote:

> maybe a solution would be to add an extra field to the fp control csr (or
> isamux?) to allow selecting one of several accurate or fast modes:
> - machine-learning-mode: fast as possible
>     -- maybe need additional requirements such as monotonicity for atanh?
> - GPU-mode: accurate to within a few ULP
>     -- see Vulkan, OpenGL, and OpenCL specs for accuracy guidelines
> - almost-accurate-mode: accurate to <1 ULP
>      (would 0.51 or some other value be better?)
> - fully-accurate-mode: correctly rounded in all cases
> - maybe more modes?
>

One more part: hw can implement a less accurate mode as if a more accurate
mode was selected, so, for example, hw can implement all modes using hw
that produces correctly-rounded results (which will be the most accurate
mode defined) and just ignore the mode field since correct-rounding is not
less accurate than any of the defined modes.

Jacob

>


More information about the libre-riscv-dev mailing list