incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luca Morandini <lmorand...@ieee.org>
Subject Re: Fixed precision of floating point number not respected in views
Date Tue, 19 Feb 2013 21:15:48 GMT
On 02/20/2013 08:10 AM, Robert Newson wrote:
> (17.0 + 0.3) .toPrecision(21)

This is to be expected, sin't it ?
 > (17.0 + 0.3) .toPrecision(17)
'17.300000000000001'
 > (17.0 + 0.3) .toPrecision(16)
'17.30000000000000'

If you push it to the limit, numerical imprecisions are in order.

What troubles me -and will have a hard time explaining to users- is that numbers 
are changed by the mere act of storing them in CouchDB.

Regards,

Luca Morandini
Data Architect - AURIN project
Department of Computing and Information Systems
University of Melbourne
Tel. +61 03 903 58 380
Skype: lmorandini


Mime
View raw message