http://codereview.chromium.org/1032007/diff/21001/22010 File src/fast-dtoa.cc (right):
http://codereview.chromium.org/1032007/diff/21001/22010#newcode43 src/fast-dtoa.cc:43: // The bigger the range, the fewer cached numbers we need. On 2010/03/18 12:36:45, William Hesse wrote:
Goodbye line.
Done. http://codereview.chromium.org/1032007/diff/21001/22010#newcode111 src/fast-dtoa.cc:111: // Note that buffer could lie anywhere inside the range too_low to too_high. On 2010/03/18 12:36:45, William Hesse wrote:
the value of buffer
Done. http://codereview.chromium.org/1032007/diff/21001/22010#newcode127 src/fast-dtoa.cc:127: // that the chosen one is closer to any number within the range w_low to On 2010/03/18 12:36:45, William Hesse wrote:
is closer to both w_low and w_high, since v can be anywhere between
them. Done. http://codereview.chromium.org/1032007/diff/21001/22010#newcode130 src/fast-dtoa.cc:130: // By generating the digits of too_high we got the biggest last digit. On 2010/03/18 12:36:45, William Hesse wrote:
we got the largest buffer that might round to v.
Done. http://codereview.chromium.org/1032007/diff/21001/22010#newcode145 src/fast-dtoa.cc:145: small_distance - rest >= rest + ten_kappa - small_distance)) { On 2010/03/18 12:36:45, William Hesse wrote:
Aren't tests 1 and 3 redundant: small_distance - rest > 0
(small_distance - rest > ten_kappa || small_distance - rest >= ten_kappa/2)
They are redundant, but only if we don't take into account overflows. If rest > small_distance, then small_distance - rest underflows which would make the third test fail. Maybe there are other ways to get around this, but a simple test in the beginning seems to be the easiest solution. http://codereview.chromium.org/1032007/diff/21001/22010#newcode177 src/fast-dtoa.cc:177: // Returns the biggest power of ten that is less or equal than the given On 2010/03/18 12:36:45, William Hesse wrote:
less than or equal to
Done. http://codereview.chromium.org/1032007/diff/21001/22010#newcode179 src/fast-dtoa.cc:179: // If number_bits == 0 then 0^-1 is returned On 2010/03/18 12:36:45, William Hesse wrote:
Precondition: (1 << (number_bits + 1)) > number >= (1 << number_bits)
Done. http://codereview.chromium.org/1032007 -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
