James Fang created ASTERIXDB-2293:
-------------------------------------
Summary: Incorrect results when dividing(affects functions like
avg too)
Key: ASTERIXDB-2293
URL: https://issues.apache.org/jira/browse/ASTERIXDB-2293
Project: Apache AsterixDB
Issue Type: Bug
Components: FUN - Functions
Reporter: James Fang
I receive incorrect results when dividing. The following queries give the
incorrect result in AsterixDB and Couchbase, but gives the correct result in
Postgres.
For example:
1) array_avg( [1.2,2.3,3.4] );
2.3000000000000003
2) array_sum( [1.2,2.3,3.4] ) / 3;
2.3000000000000003
3) 6.9 / 3;
2.3000000000000003
Using the [1.1,2.2,3.3] for 1 and 2, and 6.6 instead of 6.9 in for number 3
gives,
2.1999999999999997
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)