Status: New
Owner: ----

New issue 3025 by [email protected]: number.toString(5) doesn't generate the correct result.
http://code.google.com/p/v8/issues/detail?id=3025

For large numbers, the number.toString with a radix doesn't generate the correct result. Example:
  var n = 0x8000000000000800;
  var s = n.toString(5);
  alert(s);  // alerts    : 1104332401304422434310444401
             // correct is: 1104332401304422434310342411
             // difference: parseInt("101140", 5) == 0xd2a == 3370 ???
  var m = parseInt(s, 5);
alert("0x" + m.toString(16)); // alerts 0x8000000000001800, off by 2 x ulp

(In comparison, IE is more broken, Firefox is correct).

I'm testing round-tripping:
  n == int.parse(n.toString(radix), radix);
and it fails in some cases. There are likely more cases than this, for different radices.




















--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to