[libre-riscv-dev] [Bug 74] preliminary exploratory software emulation of FP SQRT
bugzilla-daemon at libre-riscv.org
bugzilla-daemon at libre-riscv.org
Wed May 8 00:04:41 BST 2019
http://bugs.libre-riscv.org/show_bug.cgi?id=74
--- Comment #43 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Aleksandar Kostovic from comment #42)
> >i added some comments that will help you to transition it from the
> > IEEE754 format that z is in, into s/e/m format.
> Thanks very much. I think i understood ;)
>
> https://git.libre-riscv.org/?p=ieee754fpu.git;a=blobdiff;f=src/ieee754/
> fpsqrt/fsqrt.py;h=f7410703643e763c0ad5c43c57e6c39b3c12e71e;
> hp=5ae2bb253fa1356ec89f2960930b884faf51a2db;
> hb=75f9bd28e14c789872060997a655335bbdaed1aa;
> hpb=5690d1f94f158cbc8e715b9943d3eaba32cec9e3
>
> Take a look
s = 1 # sign (so, s=1)
e = 255 # exponent (minus 128, so e = 127
note the comment that the format of IEEE offsets by 128? so when this value
255 goes through the IEEE format processing, 128 will be added and the value
attempted to be stored will be 255+128.
m = 1<<22 # high bit of mantissa, so m = 1<<22 i think
good...
m = 1
... so... err... why are you trying to then destroy the value?
m = 1<<22 # rest of mantissa is zero, so m = 1<<22 is good.
... and then set it again....
m = 0
... and then destroy it again?
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-riscv-dev
mailing list