You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Klaus Ma (JIRA)" <ji...@apache.org> on 2015/11/01 07:37:27 UTC

[jira] [Comment Edited] (MESOS-1187) precision errors with allocation calculations

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

Klaus Ma edited comment on MESOS-1187 at 11/1/15 6:36 AM:
----------------------------------------------------------

Just go through {{AlmostEqual}} in googletest for double equal check (https://github.com/google/googletest/blob/master/googletest/include/gtest/internal/gtest-internal.h#L358), it follows the idea the paper of Bruce Dawson at http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm . So the proposal to check whether the two double is equal in Mesos are:
    1. Dump the logic of {{AlmostEqual}} of googletest into Mesos: a.) copy the file from googletest (checked its license, it's fine by including google's announcement) b.) re-implement it in Mesos
    2. Define a "reasonable" epsilon, and check whether the two double is closed enough by {{fabs(l - r) < epsilon}}; for the "reasonable" epsilon, maybe 0.01 is enough.

[~vinod@twitter.com]/[~jieyu], any comments for the proposal?


was (Author: klaus1982):
Just go through {{AlmostEqual}} in googletest for double equal check (https://github.com/google/googletest/blob/master/googletest/include/gtest/internal/gtest-internal.h#L358), it follows the idea the paper of Bruce Dawson at http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm . So the proposal to check whether the two double is equal in Mesos are:
    1. Dump the logic of {{AlmostEqual}} of googletest into Mesos: a.) copy the file from googletest (need confirm its license) b.) re-implement it in Mesos
    2. Define a "reasonable" epsilon, and check whether the two double is closed enough by {{fabs(l - r) < epsilon}}; for the "reasonable" epsilon, maybe 0.01 is enough.

[~vinod@twitter.com]/[~jieyu], any comments for the proposal?

> precision errors with allocation calculations
> ---------------------------------------------
>
>                 Key: MESOS-1187
>                 URL: https://issues.apache.org/jira/browse/MESOS-1187
>             Project: Mesos
>          Issue Type: Bug
>          Components: allocation, master
>            Reporter: aniruddha sathaye
>            Assignee: Klaus Ma
>
> As allocations are stored/transmitted as doubles many a times precision errors creep in. 
> we have seen erroneous share calculations happen only because of floating point arithmetic. 



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