You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "James Fang (JIRA)" <ji...@apache.org> on 2018/03/12 21:43:00 UTC

[jira] [Closed] (ASTERIXDB-2293) Incorrect results when dividing(affects functions like avg too)

     [ https://issues.apache.org/jira/browse/ASTERIXDB-2293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Fang closed ASTERIXDB-2293.
---------------------------------
    Resolution: Not A Problem

> 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
>            Priority: Minor
>
> 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)