unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Clément Pit--Claudel" <clement.pitclaudel@live.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 25557@debbugs.gnu.org
Subject: bug#25557: Documentation of format doesn't describe "g" accurately
Date: Sat, 28 Jan 2017 15:45:57 -0500	[thread overview]
Message-ID: <1954507f-ab7c-b513-c50a-1803ce4bdce2@live.com> (raw)
In-Reply-To: <83o9yrx70l.fsf@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 843 bytes --]

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!


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2017-01-28 20:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 22:05 bug#25557: Documentation of format doesn't describe "g" accurately Clément Pit--Claudel
2017-01-28  8:37 ` Eli Zaretskii
2017-01-28 15:04   ` Clément Pit--Claudel
2017-01-28 15:23     ` Eli Zaretskii
2017-01-28 15:45       ` Clément Pit--Claudel
2017-01-28 16:01         ` Eli Zaretskii
2017-01-28 16:18           ` Clément Pit--Claudel
2017-01-28 16:25             ` Eli Zaretskii
2017-01-28 19:14               ` Clément Pit--Claudel
2017-01-28 19:31                 ` Eli Zaretskii
2017-01-28 20:06                   ` Clément Pit--Claudel
2017-01-28 20:29                     ` Eli Zaretskii
2017-01-28 20:45                       ` Clément Pit--Claudel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1954507f-ab7c-b513-c50a-1803ce4bdce2@live.com \
    --to=clement.pitclaudel@live.com \
    --cc=25557@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).