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

Klaus Ma commented on MESOS-1187:
---------------------------------

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.

[~vi...@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)

Reply via email to