bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: About fltexpr


From: Chet Ramey
Subject: Re: About fltexpr
Date: Tue, 23 Sep 2025 15:21:11 -0400
User-agent: Mozilla Thunderbird

On 9/22/25 3:30 AM, Andreas Schwab wrote:
On Sep 22 2025, Duncan Roe via Bug reports for the GNU Bourne Again SHell wrote:

$ printf '%g\n' $(fltexpr -p '0.1 + 0.2')
0.3

That is wrong for a value that needs more than 6 digits of precision.

Salt to taste. '%.15g' would address the OP's requirements.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]