[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:33:17 BST 2019


http://bugs.libre-riscv.org/show_bug.cgi?id=74

--- Comment #4 from Aleksandar Kostovic <alexandar.kostovic at gmail.com> ---
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?

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


More information about the libre-riscv-dev mailing list