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

Yes, the number is exactly representable as a double (and it's, not by coincidence, the first such that isn't an int64_t and that also requires 53 bits of precision).

I don't mind a slight loss of precision. Ofcourse it's best if n.toString(5) gives the base-5 representation of the exact value of the double, but if it gives a base-5 representation of another integer that maps to the same double, it should be ok too.

In this case, the actual value is off by two ulps of the original number, so parsing it back (using parseInt(...,5)) gives a *different* double. I.e., the string representation returned by .toString(5) can't be said to represent the original number (which is pretty much the only requirement in the ES5 spec).



--
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