You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean Owen (JIRA)" <ji...@apache.org> on 2016/02/03 06:27:39 UTC

[jira] [Commented] (SPARK-13145) checkAnswer should tolerate small float number error

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

Sean Owen commented on SPARK-13145:
-----------------------------------

Isn't this what ~== does?
The error shouldn't be relative to the expected value as it will be very relatively different depending on what's being tested. Usually this is allowing for rounding error which generally does not scale

> checkAnswer should tolerate small float number error
> ----------------------------------------------------
>
>                 Key: SPARK-13145
>                 URL: https://issues.apache.org/jira/browse/SPARK-13145
>             Project: Spark
>          Issue Type: Improvement
>            Reporter: Davies Liu
>
> For example, we should the Float/Double as this:
> {code}
>  abs(actual -  expected) < expected * 1e-12
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org