From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29363 invoked from network); 5 Sep 2022 08:49:44 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 5 Sep 2022 08:49:44 -0000 Received: (qmail 3399 invoked by uid 550); 5 Sep 2022 08:49:41 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 3364 invoked from network); 5 Sep 2022 08:49:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date; bh=s+n5BrqTw9oHgc2aVDJ2yJheKkrhZzfrJFUNS3Qc2Xw=; b=ek4mwYwetdbedhxadKMhbLN6dkLAFaKMCPyxLPUDpIyVExljAThqGIPoo/jHWmDJSX ejaa28Q+zBKeEq+NylwHMpc6Jeh8CLen5KRNzGfZHca0rJEBTOUPRj29HWM23sNXDcfs +lISvPPYnqsEjueedAKgM5bIfemGANnLYGDL9TKynaJ0uMOKYH2YG5DO4x5eD58EQpop u07eco88OWqoNnwL9ObL0NBYSec40mWz9wOlpfi3twO1hZcaJnwLw2Umk2tx0tTfr3IN Jr5m2KU4aBoe8nfP4stxwAF0VBxo6Ncap6p0U5nb0keIoY9EOEib1ornGhilO4ljDHNY PjCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=s+n5BrqTw9oHgc2aVDJ2yJheKkrhZzfrJFUNS3Qc2Xw=; b=lKVNhURxPU/+7kWMQDrnO/fU6wqfzVO/CGSKTbRI3iQZTfCF9+gC6hG5X1DyfoZQac a05E8BcP0ycaSE45ZMAqnbNiS0vrrtp2kPJs2cjfmyzKsbpK95Jq8QIh4/7fDGTsjI8l /FRGE9SxVJVdR/gDzWRmQuKuSYzDiwWcs2o5G/GpOhxnxtCgd+4uOjkMubHI3XP3DpWe CodAbH/JRIkkWJrbYTR8NQlZBv3tiiGCmmUZmBwKOYWJMakEu4r2hSwCZqYVR6kPlDqm Z/1BEz0NzPJVWrWP9K0IGXxFDXVTS3Im7qDs2qF6vZIRubqsEmah6/YP6rGApLcUL5Dl KsqA== X-Gm-Message-State: ACgBeo1rPG4AFx/Dl7Nzh66uOdaHX9/jQhO7m6uCirAiR/AUSXXOx6mx s1UP3rjs2gfSAua8zZrH5hPucK5qSvObOP5nILOyZztK1k8= X-Google-Smtp-Source: AA6agR5ccqiOE6EB4sc7Bh/fc7QpkWfpiDwO3PJAHDNZRKKFmt9tg5UojrBCXUWnKH03c99s0QsD71ia6IqGCrwvQL8= X-Received: by 2002:a67:cc13:0:b0:390:f2ee:69c5 with SMTP id q19-20020a67cc13000000b00390f2ee69c5mr10163936vsl.58.1662367768861; Mon, 05 Sep 2022 01:49:28 -0700 (PDT) MIME-Version: 1.0 References: <20220819031934.GH7074@brightrain.aerifal.cx> <20220823173020.GJ7074@brightrain.aerifal.cx> <20220830122627.GA16467@brightrain.aerifal.cx> <20220904215927.GB9709@brightrain.aerifal.cx> In-Reply-To: <20220904215927.GB9709@brightrain.aerifal.cx> From: ardi Date: Mon, 5 Sep 2022 10:49:18 +0200 Message-ID: To: musl@lists.openwall.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] Do you recommend using fmt_fp() and On Sun, Sep 4, 2022 at 11:59 PM Rich Felker 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=C3=A9sar