couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: Fixed precision of floating point number not respected in views
Date Tue, 19 Feb 2013 09:09:54 GMT
Huh. First time I've seen spam make it through ASF filters.


On Tue, Feb 19, 2013 at 3:08 AM, Fabio Morandini
<morandini.fabio@gmail.com>wrote:

> Hi Luca Morandini. I'm Fabio Morandini from Italy.
>  Where do you live?
> My son's name is Luca Morandini!
> pleased to meet you
>
> *Fabio Morandini* *
> *Cavaglià (BI) - Italia
>
> Cell. +39 328 8436256
>
> *morandini.fabio@gmail.com*
>
> *@mfabio* <https://twitter.com/mfabio>****
>
> *Fabio Morandini*<https://plus.google.com/u/0/116660117363668905012/about>
> ****
>
> *fabio.morandini* <https://www.facebook.com/fabio.morandini>****
>
> *fabiomorandini* <http://friendfeed.com/fabiomorandini>****
>
> *morandini.fabio* <http://www.skype.com/intl/it/home?intcmp=wlogo>****
>
> *Rispetta l'ambiente. Non stampare questa mail se non è necessario**.*
>
>
>
> 2013/2/19 Luca Morandini <lmorandini@ieee.org>
>
>> Folks,
>>
>> I have stored fixed precision numbers in a database, but when they are
>> spit out by a view, the precision is full, and -which is worse- the
>> trailing decimal digits are not all zeroes.
>>
>> In other words:
>>
>> Data in the database (as I loaded them as they do appear in Futon):
>> {
>>    "_id": "**4864f365b6962af5a9c4064b340017**22",
>>    "_rev": "1-**73d234f7ed07b0fc9d4671a9f8ef9b**91",
>>    "type": "Feature",
>>    "properties": {
>>        "poll_id": 2734,
>>        "dataset": "pbc",
>>        "ced": null
>>    },
>>    "bbox": [
>>        151.17281,
>>        -33.91018,
>>        151.18159,
>>        -33.90162
>>    ]
>> ...
>>
>> Output of the view:
>> {
>>   "_id": "**4864f365b6962af5a9c4064b340017**22",
>>   "_rev": "1-**73d234f7ed07b0fc9d4671a9f8ef9b**91",
>>   "type": "Feature",
>>   "properties": {
>>         "poll_id": 2734,
>>         "dataset": "pbc",
>>         "ced":null
>>   },
>>   "bbox": [
>>      151.17280999999999835,
>>      -33.91017999999999688,
>>      151.18158999999999992,
>>      -33.901620000000001198
>>   ]
>> ...
>>
>> Of course, in the view I do not alter the doc (moreover, the same output
>> of the view is replicated when I directly request a document via the
>> Document API).
>>
>> Am I doing something silly ?
>>
>> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message