similar to bug #869 a formal correctness proof is needed for fused-mul-add * f8 (non-standard -- 5 exponent bits, 2 bits in mantissa field, 3-bit mantissa value): * DONE: implement other rounding modes in the fmadd pipeline * DONE: implement fmsub, fnmadd, fnmsub * DONE: formal verification * f16: * DONE: implement other rounding modes in the fmadd pipeline * DONE: implement fmsub, fnmadd, fnmsub * REMOVED: formal verification -- didn't complete after >8hr * f32 (if smt solver can handle it): * DONE: implement other rounding modes in the fmadd pipeline * DONE: implement fmsub, fnmadd, fnmsub * REMOVED: formal verification -- f16 is too slow, didn't attempt f32 * f64 (if smt solver can handle it): * DONE: implement other rounding modes in the fmadd pipeline * DONE: implement fmsub, fnmadd, fnmsub * REMOVED: formal verification -- f16 is too slow, didn't attempt f64
I implemented fmadd, fmsub, fnmadd, and fnmsub and now just have to work out the remaining bugs. https://git.libre-soc.org/?p=ieee754fpu.git;a=commit;h=449176c8896dd13ae80130a3a0c8fc88026a2499 I probably got fmadd and fnmsub to work for all rounding modes, I'm currently running the formal proofs overnight -- hopefully they won't take too long to run. fmsub and fnmadd have a bug which I'll debug tomorrow.
(In reply to Jacob Lifshay from comment #1) > fmsub and fnmadd have a bug which I'll debug tomorrow. i think i found the bug by reading the diff: i forgot to flip `b`'s sign when `negate_addend` is set in the `0 + x` special case: https://git.libre-soc.org/?p=ieee754fpu.git;a=blob;f=src/ieee754/fpfma/special_cases.py;h=826c32a8e80f2a121a585d7c83bb65e436e97d50;hb=449176c8896dd13ae80130a3a0c8fc88026a2499#l247 i'll fix it tomorrow when it's not 4:30am
(In reply to Jacob Lifshay from comment #2) > (In reply to Jacob Lifshay from comment #1) > > fmsub and fnmadd have a bug which I'll debug tomorrow. I fixed the bug. Since the formal proofs for f16 fma didn't finish after >8hr, I disabled f16 formal proofs by default and added f8 formal proofs: I added support for non-standard floating-point types so we can test f8 (eb=5, sb=3), all those passed without issue. https://git.libre-soc.org/?p=ieee754fpu.git;a=commit;h=a434759860b4e6a92c4c46d4842e767ae5b680e3 I also finished cleaning up all the remaining fixmes, and optimized the amount of padding needed in the intermediate sum. https://git.libre-soc.org/?p=ieee754fpu.git;a=commit;h=80f6d6471d627c1af572d37b99643c66bbe8be67 I'm considering this completed.
*** Bug 123 has been marked as a duplicate of this bug. ***