bug-bash
[Top][All Lists]
Advanced

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

Re: printf inconsistent results for %.0f


From: Chet Ramey
Subject: Re: printf inconsistent results for %.0f
Date: Mon, 12 Aug 2024 11:04:15 -0400
User-agent: Mozilla Thunderbird

On 8/12/24 10:30 AM, Laur Aliste wrote:

Bash Version: 5.2
Patch Level: 21
Release Status: release

Description:
     One of my old script that's been in use for 10+ years is using
built-in bash printf
     for rounding float value to int via `printf`; as of today (Aug 12)
it started
     returning erroneous and inconsistent results.
     Note it doesn't require float input value - trying to format full integers
     reproduces the problem the same.

It's probably a bug with configure, which a gcc update has triggered.
I've attached a patch.


     Bash version hasn't been updated for ages so assuming it has to be
a dependency issue.

My question is why the (admittedly old) gnulib replacement strtod/strtold
is messing things up.

--
``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: configure-strtold-check
Description: Text document

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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