incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noah Slater <nsla...@tumbolia.org>
Subject Re: Silent corruption of large numbers
Date Wed, 11 Nov 2009 01:00:49 GMT

On 11 Nov 2009, at 00:52, Adam Kocoloski wrote:
>
> Hi Noah, I think the part you're missing is that JavaScript does not  
> actually have integers.  All numbers are internally represented  
> using double-precision floating point.  So in fact a number that  
> looks like an integer can be corrupted.  Easiest way to see this, as  
> Roger pointed out, is to try to enter something like
>
> 9223372036854775807
>
> as the value for a field in Futon.  You can't do it, Futon will  
> corrupt it and give you back
>
> 9223372036854776000

Isn't it just the case that there is a ceiling for representable  
integers, then?

Mime
View raw message