W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2015

[Bug 28845] fn:format-number, formatting rules for exponential notation

From: <bugzilla@jessica.w3.org>
Date: Thu, 10 Sep 2015 09:33:04 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-28845-523-V0u3mz5laO@http.www.w3.org/Bugs/Public/>

--- Comment #9 from Debbie Lockett <debbie@saxonica.com> ---
Subtle amendment to the proposed adjustment to the rules for

if minimum-integer-part-size and maximum-fractional-part-size are both zero,
        • if there is an exponent separator, set *minimum-fractional-part-size*
(and maximum-fractional-part-size) to 1;
        • otherwise set minimum-integer-part-size to 1.

Corresponding amendment to 4.7.4 new rule:
if the effect of the above rules is that minimum-integer-part-size and
maximum-fractional-part-size are both zero, then an adjustment is applied as
follows: if an exponent separator is present then minimum-fractional-part-size
is changed to 1 (one) (and so is maximum-fractional-part-size); otherwise
minimum-integer-part-size is changed to 1 (one).

Then in the first example:
fn:format-number(0.2, '#.e9') => ".2e1"

(Explanation: min-int-part-size=0, scaling-factor=0. Initially
max-frac-part-size=0, but it and min-frac-part-size get adjusted to 1 by the
new rule. A '#' in the integer part of the picture has no effect except on
grouping separators. But see the CODA, which would change the result to 0.2e1)

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Thursday, 10 September 2015 09:33:07 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:56 UTC