[libre-riscv-dev] div/mod algorithm written in python

Luke Kenneth Casson Leighton lkcl at lkcl.net
Tue Jul 9 00:34:00 BST 2019


On Mon, Jul 8, 2019 at 10:23 PM Jacob Lifshay <programmerjake at gmail.com> wrote:

> For verifying frsqrt, we could use the bigfloat library (python bindings to
> mpfr).

 hmmm... a second (large) library as a major dependency... hmmm...

> It supports emulating different ieee 754-2008 fp formats. We will
> have to remember that ieee 754-2008 defines sqrt(-0) to be -0 and rsqrt(-0)
> to be -infinity (not +infinity).

 the reason for using sfpy is because softfloat has specifically been
written to emulate risc-v (in full).  all of the rounding modes,
tininess, they're all there [except sfpy doesn't expose the tininess
modes through the bindings yet] and all properly compatible.

 using bigfloat is therefore a lot more work than it first appears.

l.



More information about the libre-riscv-dev mailing list