I'm trying to parse a big int (int64) from a string... I've set up a little test, and I'm getting the wrong number after parsing it... I only get even numbers, never odd numbers...
This is my test:
var test = "10202853558883111";
console.log(test); // outputs 10202853558883111
var iTest = parseInt(test);
console.log(iTest); // outputs 10202853558883112
var fTest = parseFloat(test);
console.log(fTest); // outputs 10202853558883112
var nTest = Number(test);
console.log(nTest); // outputs 10202853558883112
WTF?!?!?!
Could some one explain this, and more importantly, can you please help me solve it... /:
The number is too long, and exceeds Javascript's precison. Look: