[Libre-soc-dev] we need two XLENs

Richard Wilbur richard.wilbur at gmail.com
Fri Sep 9 15:56:58 BST 2022

> On Sep 8, 2022, at 20:10, Jacob Lifshay via Libre-soc-dev <libre-soc-dev at lists.libre-soc.org> wrote:
> imho it's a waay better idea to have the two variables, a post-analysis
> isn't sufficient because of things like combined fp arithmetic and fp
> format conversion, (e.g. fsqrt with srcelwid=64 and destelwid=f16) where
> rounding correctly requires fsqrt to know what the actual destination
> format is, if it just rounds to f64 and then rounds again to f16, it'll
> give the wrong result in some cases.

The infamous double round?
extended result = 1.000000000499999999999
rounded to 20 digits = 1.00000000050000000000
extended result rounded to 10 digits
= 1.000000000
20-digit rounded result rounded to 10 digits = 1.000000001

More information about the Libre-soc-dev mailing list