[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #66068] built-in printf function not working with float
From: |
Chet Ramey |
Subject: |
Re: [bug #66068] built-in printf function not working with float |
Date: |
Tue, 6 Aug 2024 09:33:05 -0400 |
User-agent: |
Mozilla Thunderbird |
On 8/6/24 5:58 AM, anonymous wrote:
jesusm@liet:[~]$ bash --version
GNU bash, version 5.2.32(1)-release (x86_64-slackware-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
jesusm@liet:[~]$ printf "%f\n" 1.2
-nan
jesusm@liet:[~]$ /bin/printf "%f\n" 1.2
1.200000
jesusm@liet:[~]$
Nothing changed here between 5.2.26 and 5.2.32; you probably updated your
compiler and fell victim to this:
https://lists.gnu.org/archive/html/bug-bash/2023-11/msg00104.html
I attached a patch.
--
``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/
configure-strtold-broken.patch
Description: Text document