From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25557: Documentation of format doesn't describe "g" accurately Date: Sat, 28 Jan 2017 18:25:20 +0200 Message-ID: <831svnywwf.fsf@gnu.org> References: <78ace0d5-59f1-0d7d-1f0e-b589a947d76c@live.com> <83poj7zika.fsf@gnu.org> <83a8abyzqs.fsf@gnu.org> <1b896eed-9041-83d3-bd46-cde7e534223e@live.com> <837f5fyy09.fsf@gnu.org> <2763023c-ff54-ea65-c1b0-0c22e948f48a@live.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1485620783 28244 195.159.176.226 (28 Jan 2017 16:26:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 28 Jan 2017 16:26:23 +0000 (UTC) Cc: 25557@debbugs.gnu.org To: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 28 17:26:18 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cXVpJ-0006GG-8z for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Jan 2017 17:26:09 +0100 Original-Received: from localhost ([::1]:52394 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXVpO-0000FU-N8 for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Jan 2017 11:26:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41797) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXVpF-0000Ec-Vw for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2017 11:26:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cXVpC-0002DG-S2 for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2017 11:26:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51131) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cXVpC-0002DC-PI for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2017 11:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cXVpC-0003PV-HW for bug-gnu-emacs@gnu.org; Sat, 28 Jan 2017 11:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Jan 2017 16:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25557 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25557-submit@debbugs.gnu.org id=B25557.148562074313085 (code B ref 25557); Sat, 28 Jan 2017 16:26:02 +0000 Original-Received: (at 25557) by debbugs.gnu.org; 28 Jan 2017 16:25:43 +0000 Original-Received: from localhost ([127.0.0.1]:49330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cXVot-0003Oz-I2 for submit@debbugs.gnu.org; Sat, 28 Jan 2017 11:25:43 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cXVor-0003Om-A7 for 25557@debbugs.gnu.org; Sat, 28 Jan 2017 11:25:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cXVoi-0002AY-RP for 25557@debbugs.gnu.org; Sat, 28 Jan 2017 11:25:35 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38224) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXVoi-0002AR-GY; Sat, 28 Jan 2017 11:25:32 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2094 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cXVoh-00055c-9Q; Sat, 28 Jan 2017 11:25:32 -0500 In-reply-to: <2763023c-ff54-ea65-c1b0-0c22e948f48a@live.com> (message from =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel on Sat, 28 Jan 2017 11:18:44 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:128724 Archived-At: > Cc: 25557@debbugs.gnu.org > From: Clément Pit--Claudel > Date: Sat, 28 Jan 2017 11:18:44 -0500 > > I'm trying to get the shortest representation of a decimal number, rounded to .01, not using scientific/exponential notation. I'm using values computed in ELisp to produce CSS style sheets, which until recently didn't allow for exponential notation. I'd like these stylesheets to be readable, so 100% is better 100.00%, and 3.35em is better than 3.35004em. If my code is fed a value of 5000px, I don't want it converted to 5e+3px, because many browsers don't know how to parse that. Then I think you want to use %d for integral values and %.2f for the rest.