/[jscoverage]/trunk/instrument-js.cpp
ViewVC logotype

Diff of /trunk/instrument-js.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 467 by siliconforks, Sun Sep 27 02:24:33 2009 UTC revision 468 by siliconforks, Fri Oct 2 21:53:10 2009 UTC
# Line 851  Line 851 
851    case TOK_NUMBER:    case TOK_NUMBER:
852      /*      /*
853      A 64-bit IEEE 754 floating point number has a 52-bit fraction.      A 64-bit IEEE 754 floating point number has a 52-bit fraction.
854      2^(-52) = 2.22 x 10^(-16)      (This represents 53 bits of precision - the first bit is not stored.)
855      Thus there are 16 significant digits.      17 decimal digits are required to recover the floating-point number.
856        See http://docs.sun.com/source/806-3568/ncg_goldberg.html
857      To keep the output simple, special-case zero.      To keep the output simple, special-case zero.
858      */      */
859      if (node->pn_dval == 0.0) {      if (node->pn_dval == 0.0) {
# Line 873  Line 874 
874        Stream_write_string(f, "Number.NaN");        Stream_write_string(f, "Number.NaN");
875      }      }
876      else {      else {
877        Stream_printf(f, "%.15g", node->pn_dval);        Stream_printf(f, "%.17g", node->pn_dval);
878      }      }
879      break;      break;
880    case TOK_PRIMARY:    case TOK_PRIMARY:

Legend:
Removed from v.467  
changed lines
  Added in v.468

  ViewVC Help
Powered by ViewVC 1.1.24