Comment #3 on issue 636 by bertbelder: String handling broken (test case)
http://code.google.com/p/v8/issues/detail?id=636
@comment 2
I can confirm that 01000000001 is indeed the wrong value. My bad :-(
Also, the fact that one of the values is undeclared seems to be irrelevant,
and the v
= v >>= 1 is somewhat overkill. So, here's an improved test case.
Vego..., you saw that right, the bug was encountered in a function that
encodes a
number as a binary string.
var test = function() {
var i, result = "";
var value = parseFloat(5.5);
value = Math.abs(1025);
for(i = 12; --i; result = ( value % 2 ) + result, value >>= 1);
return result;
};
// 01000000001 -> wrong
// 10000000001 -> right
test();
Attachments:
test.js 241 bytes
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev