⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 101056 in webkit


Ignore:
Timestamp:
Nov 23, 2011, 1:22:55 AM (15 years ago)
Author:
Nikolas Zimmermann
Message:

Add flags/precision arguments to String::number(double) to allow fine-grained control over the result string
https://bugs.webkit.org/show_bug.cgi?id=72793

Reviewed by Zoltan Herczeg.

Source/JavaScriptCore:

This new code will be used in follow-up patches to replace the String::format("%.2f") usage in
platform/text/TextStream.cpp, and String::format("%.6lg") usage in svg/SVGPathStringBuilder.cpp.

The String::number(double) currently calls String::format("%.6lg") in trunk. In order to replace
this by a variant that properly rounds to six significant figures, JSC code could be refactored.
JSCs Number.toPrecision/toFixed uses wtf/dtoa/double-conversion which provides all features we need,
except truncating trailing zeros, needed to mimic the "g" format, which is either f or e but with
trailing zeros removed, producing shorter results. Changed the default signature to:

"static String number(double, unsigned = ShouldRoundSignificantFigures | ShouldTruncateTrailingZeros, unsigned precision = 6);".

In WebCore we can now replace String::format() calls like this:
String::format("%.2f", f) -> String::number(f, ShouldRoundDecimalPlaces, 2)
String::format("%.6lg", f) -> String::number(f)

The default parameters for precison & flags exactly match the format of the string produced now, except that the result
is rounded according to the rounding mode / formatting mode and precision. This paves the way towards reliable results
in the d="" attribute dumps of SVG paths across platforms. The dtoa rounding code enforces a unique zero, resolving
all 0.0 vs. -0.0 issues currently seen on Windows, and some Gtk/Qt bots.

This patch needs a rebaseline of svg/dom/length-list-parser.html as we don't perfecly mimic the String::format() "lg" mode
result for exponentials, we used to return eg. "e-7" and now return "e-07" - the trailing zero truncation hasn't been
implemented for exponentials, as this really affects only this test and thus wasn't worth the trouble - in contrary the
trailing zero truncation is needed for thousands of other results in "f" notation, and thus needed to match the DRT results.

Here's a performance comparision using a JSC release build and some arbitary numbers:
Converting 123.456 using old approach took 95.527100ms. avg 0.000955ms/call.
Converting 123.456 using new approach took 28.126953ms. avg 0.000281ms/call.

Converting 123 using old approach took 85.411133ms. avg 0.000854ms/call.
Converting 123 using new approach took 24.190186ms. avg 0.000242ms/call.

Converting 0.1 using old approach took 92.622803ms. avg 0.000926ms/call.
Converting 0.1 using new approach took 23.317871ms. avg 0.000233ms/call.

Converting 1/i using old approach took 106.893066ms. avg 0.001069ms/call.
Converting 1/i using new approach took 27.164062ms. avg 0.000272ms/call.

For all numbers I've tested in RoundingSignificantFigures mode and 6 digit precision the speedup was at least 250%.

  • JavaScriptCore.exp: Change String::number(double) signature.
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Ditto.
  • runtime/NumberPrototype.cpp:

(JSC::numberProtoFuncToFixed): Refactor this into numberToFixedPrecisionString(), move to wtf/dtoa.cpp.
(JSC::numberProtoFuncToPrecision): Ditto, refactor this into numberToFixedWidthString.

  • wtf/dtoa.cpp: Moved fixedWidth/Precision helpers into dtoa, extend numberToFixedPrecisionString(). Add a mode which allows to truncate trailing zeros/decimal point.

to make it possible to use them to generate strings that match the output from String::format("%6.lg"), while using our dtoas rounding facilities.

  • wtf/dtoa.h:
  • wtf/dtoa/utils.h: Expose new helper method, which allows us to truncate the result, before generating the output const char*.

(WTF::double_conversion::StringBuilder::SetPosition):

  • wtf/text/WTFString.cpp:

(WTF::String::number): Remove String::format("%6.lg") usage! Switch to rounding to six significant figures, while matching the output of String::format.

  • wtf/text/WTFString.h:

LayoutTests:

Rebaseline one test result, after the String::number(double) changes. Trailing zeros are no longer removed
in the exponential form of the string: e-07 is reported instead of e-7 now. It was decided to leave it as-is
and not introduce trailing zero removal for the exponential formatting, as it only affects this test.

I'll rebaseline other platforms once results are available.

  • svg/dom/length-list-parser-expected.txt:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r101053 r101056  
     12011-11-23  Nikolas Zimmermann  <nzimmermann@rim.com>
     2
     3        Add flags/precision arguments to String::number(double) to allow fine-grained control over the result string
     4        https://bugs.webkit.org/show_bug.cgi?id=72793
     5
     6        Reviewed by Zoltan Herczeg.
     7
     8        Rebaseline one test result, after the String::number(double) changes. Trailing zeros are no longer removed
     9        in the exponential form of the string: e-07 is reported instead of e-7 now. It was decided to leave it as-is
     10        and not introduce trailing zero removal for the exponential formatting, as it only affects this test.
     11
     12        I'll rebaseline other platforms once results are available.
     13
     14        * svg/dom/length-list-parser-expected.txt:
     15
    1162011-11-23  Philippe Normand  <pnormand@igalia.com>
    217
  • trunk/LayoutTests/svg/dom/length-list-parser-expected.txt

    r74788 r101056  
    55
    66Parsed as 1 length(s) [ 8.847 ]: 8.847
    7 Parsed as 1 length(s) [ 8.62569e+06 ]: 8625686 3.0-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, 90,e4997..,782-4326e.  -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013e,+e9     e 4829.,063721-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e6 072
     7Parsed as 1 length(s) [ 8.62569e+6 ]: 8625686 3.0-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, 90,e4997..,782-4326e.   -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013e,+e9     e 4829.,063721-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e6 072
    88Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7
    99Parsed as 2 length(s) [ 2, 0.5 ]: 2     .5,658-7 e ,8477553
     
    1111Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-    8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198        50
    1212Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e       378584833       ,.141   e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
    13 Parsed as 3 length(s) [ -0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608  9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
    14 Parsed as 4 length(s) [ 4, -0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35        +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
     13Parsed as 3 length(s) [ 0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608   9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
     14Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35 +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
    1515Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7
    1616Parsed as 2 length(s) [ 2, 0.5 ]: 2     .5,658-7 e ,8477553
     
    1818Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-    8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198        50
    1919Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e       378584833       ,.141   e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
    20 Parsed as 3 length(s) [ -0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608  9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
    21 Parsed as 4 length(s) [ 4, -0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35        +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
     20Parsed as 3 length(s) [ 0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608   9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
     21Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35 +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
    2222Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7
    2323Parsed as 2 length(s) [ 2, 0.5 ]: 2     .5,658-7 e ,8477553
     
    2525Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-    8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198        50
    2626Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e       378584833       ,.141   e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
    27 Parsed as 3 length(s) [ -0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608  9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
    28 Parsed as 4 length(s) [ 4, -0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35        +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
     27Parsed as 3 length(s) [ 0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608   9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
     28Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35 +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
    2929Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7
    3030Parsed as 2 length(s) [ 2, 0.5 ]: 2     .5,658-7 e ,8477553
     
    3232Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-    8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198        50
    3333Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e       378584833       ,.141   e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
    34 Parsed as 3 length(s) [ -0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608  9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
    35 Parsed as 4 length(s) [ 4, -0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35        +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
     34Parsed as 3 length(s) [ 0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608   9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
     35Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35 +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
    3636Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7
    3737Parsed as 2 length(s) [ 2, 0.5 ]: 2     .5,658-7 e ,8477553
     
    3939Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-    8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198        50
    4040Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e       378584833       ,.141   e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
    41 Parsed as 3 length(s) [ -0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608  9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
    42 Parsed as 4 length(s) [ 4, -0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35        +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
     41Parsed as 3 length(s) [ 0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608   9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
     42Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35 +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
    4343Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7
    4444Parsed as 2 length(s) [ 2, 0.5 ]: 2     .5,658-7 e ,8477553
     
    4646Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-    8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198        50
    4747Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e       378584833       ,.141   e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
    48 Parsed as 3 length(s) [ -0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608  9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
    49 Parsed as 4 length(s) [ 4, -0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35        +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
     48Parsed as 3 length(s) [ 0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608   9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
     49Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35 +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
    5050Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7
    5151Parsed as 2 length(s) [ 2, 0.5 ]: 2     .5,658-7 e ,8477553
     
    5353Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-    8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198        50
    5454Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e       378584833       ,.141   e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
    55 Parsed as 3 length(s) [ -0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608  9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
    56 Parsed as 4 length(s) [ 4, -0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35        +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
     55Parsed as 3 length(s) [ 0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608   9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
     56Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35 +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
    5757Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7
    5858Parsed as 2 length(s) [ 2, 0.5 ]: 2     .5,658-7 e ,8477553
     
    6060Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-    8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198        50
    6161Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e       378584833       ,.141   e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
    62 Parsed as 3 length(s) [ -0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608  9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
    63 Parsed as 4 length(s) [ 4, -0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35        +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
     62Parsed as 3 length(s) [ 0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608   9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
     63Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35 +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
    6464Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7
    6565Parsed as 2 length(s) [ 2, 0.5 ]: 2     .5,658-7 e ,8477553
     
    6767Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-    8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198        50
    6868Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e       378584833       ,.141   e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
    69 Parsed as 3 length(s) [ -0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608  9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
    70 Parsed as 4 length(s) [ 4, -0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35        +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
     69Parsed as 3 length(s) [ 0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608   9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
     70Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35 +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
    7171Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7
    7272Parsed as 2 length(s) [ 2, 0.5 ]: 2     .5,658-7 e ,8477553
     
    7474Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-    8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198        50
    7575Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e       378584833       ,.141   e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
    76 Parsed as 3 length(s) [ -0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608  9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
    77 Parsed as 4 length(s) [ 4, -0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35        +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
     76Parsed as 3 length(s) [ 0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608   9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
     77Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35 +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
    7878Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7
    7979Parsed as 2 length(s) [ 2, 0.5 ]: 2     .5,658-7 e ,8477553
     
    8181Parsed as 1 length(s) [ 1 ]: 1,.,+.833+.004 2-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001+.9-    8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001.7980-555-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-198        50
    8282Parsed as 1 length(s) [ 564281 ]: 564281 0ee51+ e       378584833       ,.141   e8-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-53. 88530-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010 8.-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018.847e28886-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014e85 .-1-
    83 Parsed as 3 length(s) [ -0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608  9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
    84 Parsed as 4 length(s) [ 4, -0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35        +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
     83Parsed as 3 length(s) [ 0, 9, 367 ]: -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001608   9 367 ..81e9e539        e 4 e-17 6911-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e88. 965---39 0
     84Parsed as 4 length(s) [ 4, 0, 35, 684 ]: 04,-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001993,35 +684 +  159e   +.3-e0+,812-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001728-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014+,--1-26e666460-79.5-0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000169603-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010641,,572-960   1-9 289
    8585Parsed as 1 length(s) [ 61822 ]: 61822,15-00.166.7
    8686Parsed as 2 length(s) [ 2, 0.5 ]: 2     .5,658-7 e ,8477553
  • trunk/Source/JavaScriptCore/ChangeLog

    r101054 r101056  
     12011-11-23  Nikolas Zimmermann  <nzimmermann@rim.com>
     2
     3        Add flags/precision arguments to String::number(double) to allow fine-grained control over the result string
     4        https://bugs.webkit.org/show_bug.cgi?id=72793
     5
     6        Reviewed by Zoltan Herczeg.
     7
     8        This new code will be used in follow-up patches to replace the String::format("%.2f") usage in
     9        platform/text/TextStream.cpp, and String::format("%.6lg") usage in svg/SVGPathStringBuilder.cpp.
     10
     11        The String::number(double) currently calls String::format("%.6lg") in trunk. In order to replace
     12        this by a variant that properly rounds to six significant figures, JSC code could be refactored.
     13        JSCs Number.toPrecision/toFixed uses wtf/dtoa/double-conversion which provides all features we need,
     14        except truncating trailing zeros, needed to mimic the "g" format, which is either f or e but with
     15        trailing zeros removed, producing shorter results. Changed the default signature to:
     16
     17        "static String number(double, unsigned = ShouldRoundSignificantFigures | ShouldTruncateTrailingZeros, unsigned precision = 6);".
     18
     19        In WebCore we can now replace String::format() calls like this:
     20        String::format("%.2f", f) -> String::number(f, ShouldRoundDecimalPlaces, 2)
     21        String::format("%.6lg", f) -> String::number(f)
     22
     23        The default parameters for precison & flags exactly match the format of the string produced now, except that the result
     24        is rounded according to the rounding mode / formatting mode and precision. This paves the way towards reliable results
     25        in the d="" attribute dumps of SVG paths  across platforms. The dtoa rounding code enforces a unique zero, resolving
     26        all 0.0 vs. -0.0 issues currently seen on Windows, and some Gtk/Qt bots.
     27
     28        This patch needs a rebaseline of svg/dom/length-list-parser.html as we don't perfecly mimic the String::format() "lg" mode
     29        result for exponentials, we used to return eg. "e-7" and now return "e-07" - the trailing zero truncation hasn't been
     30        implemented for exponentials, as this really affects only this test and thus wasn't worth the trouble - in contrary the
     31        trailing zero truncation is needed for thousands of other results in "f" notation, and thus needed to match the DRT results.
     32
     33        Here's a performance comparision using a JSC release build and some arbitary numbers:
     34        Converting 123.456 using old approach took 95.527100ms. avg 0.000955ms/call.
     35        Converting 123.456 using new approach took 28.126953ms. avg 0.000281ms/call.
     36
     37        Converting 123 using old approach took 85.411133ms. avg 0.000854ms/call.
     38        Converting 123 using new approach took 24.190186ms. avg 0.000242ms/call.
     39
     40        Converting 0.1 using old approach took 92.622803ms. avg 0.000926ms/call.
     41        Converting 0.1 using new approach took 23.317871ms. avg 0.000233ms/call.
     42
     43        Converting 1/i using old approach took 106.893066ms. avg 0.001069ms/call.
     44        Converting 1/i using new approach took 27.164062ms. avg 0.000272ms/call.
     45
     46        For all numbers I've tested in RoundingSignificantFigures mode and 6 digit precision the speedup was at least 250%.
     47
     48        * JavaScriptCore.exp: Change String::number(double) signature.
     49        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Ditto.
     50        * runtime/NumberPrototype.cpp:
     51        (JSC::numberProtoFuncToFixed): Refactor this into numberToFixedPrecisionString(), move to wtf/dtoa.cpp.
     52        (JSC::numberProtoFuncToPrecision): Ditto, refactor this into numberToFixedWidthString.
     53        * wtf/dtoa.cpp: Moved fixedWidth/Precision helpers into dtoa, extend numberToFixedPrecisionString(). Add a mode which allows to truncate trailing zeros/decimal point.
     54                        to make it possible to use them to generate strings that match the output from String::format("%6.lg"), while using our dtoas rounding facilities.
     55        * wtf/dtoa.h:
     56        * wtf/dtoa/utils.h: Expose new helper method, which allows us to truncate the result, before generating the output const char*.
     57        (WTF::double_conversion::StringBuilder::SetPosition):
     58        * wtf/text/WTFString.cpp:
     59        (WTF::String::number): Remove String::format("%6.lg") usage! Switch to rounding to six significant figures, while matching the output of String::format.
     60        * wtf/text/WTFString.h:
     61
    1622011-11-23  Hajime Morrita  <morrita@chromium.org>
    263
  • trunk/Source/JavaScriptCore/JavaScriptCore.exp

    r100510 r101056  
    478478__ZN3WTF4SHA1C1Ev
    479479__ZN3WTF4dtoaEPcdRbRiRj
     480__ZN3WTF11dtoaRoundDPEPcdiRbRiRj
     481__ZN3WTF11dtoaRoundSFEPcdiRbRiRj
    480482__ZN3WTF5Mutex4lockEv
    481483__ZN3WTF5Mutex6unlockEv
     
    496498__ZN3WTF6String6formatEPKcz
    497499__ZN3WTF6String6insertERKS0_j
    498 __ZN3WTF6String6numberEd
     500__ZN3WTF6String6numberEdjj
    499501__ZN3WTF6String6numberEi
    500502__ZN3WTF6String6numberEj
  • trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def

    r100989 r101056  
    249249    ?newUninitialized@CString@WTF@@SA?AV12@IAAPAD@Z
    250250    ?nullptr@@3Vnullptr_t@std@@A
     251    ?number@String@WTF@@SA?AV12@NII@Z
    251252    ?number@UString@JSC@@SA?AV12@H@Z
    252253    ?number@UString@JSC@@SA?AV12@I@Z
    253254    ?number@UString@JSC@@SA?AV12@N@Z
    254255    ?numberToString@WTF@@YAPBDNQAD@Z
     256    ?numberToFixedPrecisionString@WTF@@YAPBDNIQAD_N@Z
     257    ?numberToFixedWidthString@WTF@@YAPBDNIQAD@Z
    255258    ?objectCount@Heap@JSC@@QAEIXZ
    256259    ?objectProtoFuncToString@JSC@@YI_JPAVExecState@1@@Z
  • trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp

    r100006 r101056  
    396396    ASSERT(isfinite(x));
    397397
    398     char buffer[WTF::NumberToStringBufferLength];
    399     DoubleConversionStringBuilder builder(buffer, WTF::NumberToStringBufferLength);
    400     const DoubleToStringConverter& converter = DoubleToStringConverter::EcmaScriptConverter();
    401     builder.Reset();
    402     converter.ToFixed(x, decimalPlaces, &builder);
    403     return JSValue::encode(jsString(exec, UString(builder.Finalize())));
     398    NumberToStringBuffer buffer;
     399    return JSValue::encode(jsString(exec, UString(numberToFixedWidthString(x, decimalPlaces, buffer))));
    404400}
    405401
     
    431427        return JSValue::encode(jsString(exec, UString::number(x)));
    432428
    433     char buffer[WTF::NumberToStringBufferLength];
    434     DoubleConversionStringBuilder builder(buffer, WTF::NumberToStringBufferLength);
    435     const DoubleToStringConverter& converter = DoubleToStringConverter::EcmaScriptConverter();
    436     builder.Reset();
    437     converter.ToPrecision(x, significantFigures, &builder);
    438     return JSValue::encode(jsString(exec, UString(builder.Finalize())));
     429    NumberToStringBuffer buffer;
     430    return JSValue::encode(jsString(exec, UString(numberToFixedPrecisionString(x, significantFigures, buffer))));
    439431}
    440432
  • trunk/Source/JavaScriptCore/wtf/dtoa.cpp

    r95511 r101056  
    17931793}
    17941794
    1795 
    1796 const char *numberToString(double d, NumberToStringBuffer buffer)
     1795const char* numberToString(double d, NumberToStringBuffer buffer)
    17971796{
    17981797    double_conversion::StringBuilder builder(buffer, NumberToStringBufferLength);
     
    18021801}
    18031802
     1803static inline const char* formatStringTruncatingTrailingZerosIfNeeded(NumberToStringBuffer buffer, double_conversion::StringBuilder& builder)
     1804{
     1805    size_t length = builder.position();
     1806    size_t decimalPointPosition = 0;
     1807    for (; decimalPointPosition < length; ++decimalPointPosition) {
     1808        if (buffer[decimalPointPosition] == '.')
     1809            break;
     1810    }
     1811
     1812    // No decimal seperator found, early exit.
     1813    if (decimalPointPosition == length)
     1814        return builder.Finalize();
     1815
     1816    size_t truncatedLength = length - 1;
     1817    for (; truncatedLength > decimalPointPosition; --truncatedLength) {
     1818        if (buffer[truncatedLength] != '0')
     1819            break;
     1820    }
     1821
     1822    // No trailing zeros found to strip.
     1823    if (truncatedLength == length - 1)
     1824        return builder.Finalize();
     1825
     1826    // If we removed all trailing zeros, remove the decimal point as well.
     1827    if (truncatedLength == decimalPointPosition) {
     1828        ASSERT(truncatedLength > 0);
     1829        --truncatedLength;
     1830    }
     1831
     1832    // Truncate the StringBuilder, and return the final result.
     1833    builder.SetPosition(truncatedLength + 1);
     1834    return builder.Finalize();
     1835}
     1836
     1837const char* numberToFixedPrecisionString(double d, unsigned significantFigures, NumberToStringBuffer buffer, bool truncateTrailingZeros)
     1838{
     1839    // Mimic String::format("%.[precision]g", ...), but use dtoas rounding facilities.
     1840    // "g": Signed value printed in f or e format, whichever is more compact for the given value and precision.
     1841    // The e format is used only when the exponent of the value is less than –4 or greater than or equal to the
     1842    // precision argument. Trailing zeros are truncated, and the decimal point appears only if one or more digits follow it.
     1843    // "precision": The precision specifies the maximum number of significant digits printed.
     1844    double_conversion::StringBuilder builder(buffer, NumberToStringBufferLength);
     1845    const double_conversion::DoubleToStringConverter& converter = double_conversion::DoubleToStringConverter::EcmaScriptConverter();
     1846    converter.ToPrecision(d, significantFigures, &builder);
     1847    if (!truncateTrailingZeros)
     1848        return builder.Finalize();
     1849    return formatStringTruncatingTrailingZerosIfNeeded(buffer, builder);
     1850}
     1851
     1852const char* numberToFixedWidthString(double d, unsigned decimalPlaces, NumberToStringBuffer buffer)
     1853{
     1854    // Mimic String::format("%.[precision]f", ...), but use dtoas rounding facilities.
     1855    // "f": Signed value having the form [ – ]dddd.dddd, where dddd is one or more decimal digits.
     1856    // The number of digits before the decimal point depends on the magnitude of the number, and
     1857    // the number of digits after the decimal point depends on the requested precision.
     1858    // "precision": The precision value specifies the number of digits after the decimal point.
     1859    // If a decimal point appears, at least one digit appears before it.
     1860    // The value is rounded to the appropriate number of digits.   
     1861    double_conversion::StringBuilder builder(buffer, NumberToStringBufferLength);
     1862    const double_conversion::DoubleToStringConverter& converter = double_conversion::DoubleToStringConverter::EcmaScriptConverter();
     1863    converter.ToFixed(d, decimalPlaces, &builder);
     1864    return builder.Finalize();
     1865}
     1866
    18041867} // namespace WTF
  • trunk/Source/JavaScriptCore/wtf/dtoa.h

    r94452 r101056  
    4444typedef char NumberToStringBuffer[NumberToStringBufferLength];
    4545typedef UChar NumberToUStringBuffer[NumberToStringBufferLength];
    46 const char *numberToString(double, NumberToStringBuffer);
     46const char* numberToString(double, NumberToStringBuffer);
     47const char* numberToFixedPrecisionString(double, unsigned significantFigures, NumberToStringBuffer, bool truncateTrailingZeros = false);
     48const char* numberToFixedWidthString(double, unsigned decimalPlaces, NumberToStringBuffer);
    4749
    4850} // namespace WTF
     
    5153using WTF::NumberToUStringBuffer;
    5254using WTF::numberToString;
     55using WTF::numberToFixedPrecisionString;
     56using WTF::numberToFixedWidthString;
    5357
    5458#endif // WTF_dtoa_h
  • trunk/Source/JavaScriptCore/wtf/dtoa/utils.h

    r97568 r101056  
    197197            ASSERT(!is_finalized());
    198198            return position_;
     199        }
     200         
     201        // Set the current position in the builder.
     202        void SetPosition(int position)
     203        {
     204            ASSERT(!is_finalized());
     205            ASSERT(position < size());
     206            position_ = position;
    199207        }
    200208       
  • trunk/Source/JavaScriptCore/wtf/text/WTFString.cpp

    r100405 r101056  
    459459}
    460460   
    461 String String::number(double n)
    462 {
    463     return String::format("%.6lg", n);
     461String String::number(double number, unsigned flags, unsigned precision)
     462{
     463    NumberToStringBuffer buffer;
     464
     465    // Mimic String::format("%.[precision]g", ...), but use dtoas rounding facilities.
     466    if (flags & ShouldRoundSignificantFigures)
     467        return String(numberToFixedPrecisionString(number, precision, buffer, flags & ShouldTruncateTrailingZeros));
     468
     469    // Mimic String::format("%.[precision]f", ...), but use dtoas rounding facilities.
     470    return String(numberToFixedWidthString(number, precision, buffer));
    464471}
    465472
  • trunk/Source/JavaScriptCore/wtf/text/WTFString.h

    r101054 r101056  
    9191float charactersToFloat(const UChar*, size_t, bool* ok = 0, bool* didReadNumber = 0);
    9292
     93enum FloatConversionFlags {
     94    ShouldRoundSignificantFigures = 1 << 0,
     95    ShouldRoundDecimalPlaces = 1 << 1,
     96    ShouldTruncateTrailingZeros = 1 << 2
     97};
     98
    9399template<bool isSpecialCharacter(UChar)> bool isAllSpecialCharacters(const UChar*, size_t);
    94100
     
    191197    WTF_EXPORT_PRIVATE static String number(long long);
    192198    WTF_EXPORT_PRIVATE static String number(unsigned long long);
    193     WTF_EXPORT_PRIVATE static String number(double);
     199    WTF_EXPORT_PRIVATE static String number(double, unsigned = ShouldRoundSignificantFigures | ShouldTruncateTrailingZeros, unsigned precision = 6);
    194200
    195201    // Find a single character or string, also with match function & latin1 forms.
     
    615621using WTF::isSpaceOrNewline;
    616622using WTF::reverseFind;
     623using WTF::ShouldRoundDecimalPlaces;
    617624
    618625#include "AtomicString.h"
Note: See TracChangeset for help on using the changeset viewer.