[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25557: Documentation of format doesn't describe "g" accurately
From: |
Clément Pit--Claudel |
Subject: |
bug#25557: Documentation of format doesn't describe "g" accurately |
Date: |
Sat, 28 Jan 2017 15:45:57 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 2017-01-28 15:29, Eli Zaretskii wrote:
>> Cc: 25557@debbugs.gnu.org
>> From: Clément Pit--Claudel <clement.pitclaudel@live.com>
>> Date: Sat, 28 Jan 2017 15:06:22 -0500
>>
>>> ??? (format "%d" 3.0) => "3"
>>>
>>> Or maybe you didn't think 3.0 was an "integral value" by my
>>> definition? I meant by that any value VAL which yields zero when
>>> passed through (mod VAL 1.0).
>>
>> Yup, I misunderstood your definition of integral value. But that still
>> doesn't cover formatting e.g. 3.3 as "3.3" instead of "3.30", right?
>
> Yes, but that cannot be a problem, since you said the browsers
> supported 2 digits after the decimal.
Indeed. It's just a readability issue.
> Or you could get fancier by using %.1f for values for which
>
> (zerop (mod (* 10 VAL) 1.0))
>
> is non-nil.
Sounds good. Thanks!
signature.asc
Description: OpenPGP digital signature
- bug#25557: Documentation of format doesn't describe "g" accurately, (continued)
- bug#25557: Documentation of format doesn't describe "g" accurately, Clément Pit--Claudel, 2017/01/28
- bug#25557: Documentation of format doesn't describe "g" accurately, Eli Zaretskii, 2017/01/28
- bug#25557: Documentation of format doesn't describe "g" accurately, Clément Pit--Claudel, 2017/01/28
- bug#25557: Documentation of format doesn't describe "g" accurately, Eli Zaretskii, 2017/01/28
- bug#25557: Documentation of format doesn't describe "g" accurately, Clément Pit--Claudel, 2017/01/28
- bug#25557: Documentation of format doesn't describe "g" accurately, Eli Zaretskii, 2017/01/28
- bug#25557: Documentation of format doesn't describe "g" accurately, Clément Pit--Claudel, 2017/01/28
- bug#25557: Documentation of format doesn't describe "g" accurately, Eli Zaretskii, 2017/01/28
- bug#25557: Documentation of format doesn't describe "g" accurately, Clément Pit--Claudel, 2017/01/28
- bug#25557: Documentation of format doesn't describe "g" accurately, Eli Zaretskii, 2017/01/28
- bug#25557: Documentation of format doesn't describe "g" accurately,
Clément Pit--Claudel <=