Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 5 Sep 2022 10:49:18 +0200
From: ardi <ardillasdelmonte@...il.com>
To: musl@...ts.openwall.com
Subject: Re: Do you recommend using fmt_fp() and

On Sun, Sep 4, 2022 at 11:59 PM Rich Felker <dalias@...c.org> wrote:
>
> It's not about the exponent size but the mantissa size, and the
> numbers 64 and 120 are completely arbitrary except for being larger
> than the number of mantissa bits and small enough not to overflow (so
> at most a little under twice the max exponent).

Thanks a lot, Rich! After having substituted all the C arithmetic
expressions and libm functions by calls to the SoftFloat functions for
binary128 (and implementing some libm functions not provided by
SoftFloat), I got the FP->String and the String->FP conversion working,
with a 100% software implementation of binary128!!

I tested the round-trip FP->String->FP for a few cases (PI, -PI, 1/3 and
-1/3), using precision 36 (DECIMAL_DIG for binary128), and the
round-trip is successful for binary128!! (yes, I used full-128bit PI from
here: https://www.chusov.org/fp_constants.html )

Of course I need to test this with more numbers, and with a loop of a
zillion random numbers, but for the moment I'm _very_ happy.

I need to tidy it up a bit, and I'd like to implement more libm functions
(ideally I'd wish to provide the full libm catalog). When it's ready, I'll
publish the source in github or similar.

Thanks a lot!!

César

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.