Hi,
I want to sum decimals with the builtin _sum function.
My documents look like
{
"_id": "7a2c5e50dfeb1341d02aa27c7a05f629",
"_rev": "4-482ff2f6b6e5c2aa079e3e4114d02093",
"type": "payment",
"amount": "0.2"
}
I store the numbers as strings because I read this the proper way for
decimals.
If I try to sum them with the builtin _sum I get the following error
"builtin _sum function requires map values to be numbers"
I removed the quotes from the numbers. Now I can sum them but 0.2 + 0.1
equals to 2.99999999
I'm using couchdb 1.3. What can I do?
Best,
Pedro