X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fnumber-format.html;h=f722ff25e6d79717571eae4fe06112233898a24c;hb=64f1c4dfd7425931fcd1bd9949157c0ba6958656;hp=23aacf8c80442e9dfcd9721ea71aef2e5589727b;hpb=7e5ddc9488079169a4311f870727043b5216a81e;p=dygraphs.git diff --git a/tests/number-format.html b/tests/number-format.html index 23aacf8..f722ff2 100644 --- a/tests/number-format.html +++ b/tests/number-format.html @@ -1,20 +1,13 @@ - + Test of number formatting - - - + -

The default formatting mimicks printf with %.pg where p is +

The default formatting mimics printf with %.pg where p is the precision to use. It turns out that JavaScript's toPrecision() method is almost but not exactly equal to %g; they differ for values with small absolute values (10^-1 to 10^-5 or so), with toPrecision()