[libre-riscv-dev] [Bug 74] preliminary exploratory software emulation of FP SQRT

bugzilla-daemon at libre-riscv.org bugzilla-daemon at libre-riscv.org
Sat Apr 27 08:36:28 BST 2019


--- Comment #5 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Aleksandar Kostovic from comment #4)
> SO i was reading how the sqrt function in pythons math module works and
> found the alternative to it:
> anynumber ** (1/2) = sqrt(anynumber)
> basicly using exponent operator to devide number with 1/2 and you get sqrt
> of that number.
> checked with nmigen here:
> https://github.com/m-labs/nmigen/blob/master/nmigen/back/rtlil.py#L360 
> it supports ** operator
> so now i am not yet sure but i think this should be able to reduce the
> amount of work needed to produce sqrt function.
> Plan is to re-use get_a and get_b functions, add another func called sqrt in
> the FSM, then add normalise funcs
> what does everyone think?

I highly doubt nmigen supports non-integer exponents.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the libre-riscv-dev mailing list