tajo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jihoon Son (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (TAJO-391) Change setting default type in query from FLOAT4 to FLOAT8
Date Sat, 07 Dec 2013 10:54:35 GMT

    [ https://issues.apache.org/jira/browse/TAJO-391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13842162#comment-13842162
] 

Jihoon Son edited comment on TAJO-391 at 12/7/13 10:53 AM:
-----------------------------------------------------------

Basically, I agree with changing the default parsed type of real values from float4 to float8,
because float8 covers a wider range of values. Also, the attached patch looks good.
But, this issue seems to propose that every real value should be float8 for the more precise
math function results.
Hyunsik said that the precision lose problem is occurred only when the constant values are
used as function parameters, but, in my opinion, it is hard to guess the reason.

Currently, the results of math functions are tested by comparing with the exact values of
them.
If the precision problem of the real numbers bothers the testing math functions, it is better
to use assertEquals(double expected, double actual, double delta) instead of assertEquals(double
expected, double actual).


was (Author: jihoonson):
Basically, I agree with changing the default type of real values from float4 to float8, because
float8 covers a wider range of values. Also, the attached patch looks good.
But, this issue seems to propose that every real value should be float8 for the more precise
math function results.
Hyunsik said that the precision lose problem is occurred only when the constant values are
used as function parameters, but, in my opinion, it is hard to guess the reason.

Currently, the results of math functions are tested by comparing with the exact values of
them.
If the precision problem of the real numbers bothers the testing math functions, it is better
to use assertEquals(double expected, double actual, double delta) instead of assertEquals(double
expected, double actual).

> Change setting default type in query from FLOAT4 to FLOAT8
> ----------------------------------------------------------
>
>                 Key: TAJO-391
>                 URL: https://issues.apache.org/jira/browse/TAJO-391
>             Project: Tajo
>          Issue Type: Improvement
>          Components: operator/function/udf
>            Reporter: DaeMyung Kang
>            Assignee: DaeMyung Kang
>            Priority: Minor
>             Fix For: 0.8-incubating
>
>         Attachments: TAJO-391.patch
>
>
> FLOAT4 is default parsed float type in tajo.
> but it can cause some trobles when we use it as FLOAT8.
> for examples.
> 0.4(f) will changed to 0.40000000000005(d)
> so it cause different result from java.Math functions.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message