You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/01/20 02:32:00 UTC

[jira] [Work logged] (NUMBERS-90) DoublePrecisionContext

     [ https://issues.apache.org/jira/browse/NUMBERS-90?focusedWorklogId=187462&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-187462 ]

ASF GitHub Bot logged work on NUMBERS-90:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 20/Jan/19 02:31
            Start Date: 20/Jan/19 02:31
    Worklog Time Spent: 10m 
      Work Description: darkma773r commented on pull request #28: NUMBERS-90: adding DoublePrecisionContext and FloatPrecisionContext
URL: https://github.com/apache/commons-numbers/pull/28
 
 
   Adding DoublePrecisionContext and FloatPrecisionContext abstract classes along with simple epsilon-based implementations. I also created a package named "precision" for these and moved the "Precision" utility class there as well.
   
   These changes are required for GEOMETRY-11.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 187462)
            Time Spent: 10m
    Remaining Estimate: 0h

> DoublePrecisionContext
> ----------------------
>
>                 Key: NUMBERS-90
>                 URL: https://issues.apache.org/jira/browse/NUMBERS-90
>             Project: Commons Numbers
>          Issue Type: New Feature
>            Reporter: Matt Juntunen
>            Priority: Blocker
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> We should add a new class to commons-numbers-core that encapsulates configurable strategies for comparing doubles. This is required for GEOMETRY-11. Here is what I'm picturing:
> {code:java}
> // abstract class for the general concept of comparisons
> public abstract class DoublePrecisionContext implements Comparator<Double> {
>     public abstract boolean equals(double a, double b);
>     public int compare(double a, double b) { /* ... */ }
>     public int compare(Double a, Double b) { /* ... */ }
> }
> // ...
> // concrete class implementing a specific strategy
> public class EpsilonUlpDoublePrecisionContext extends DoublePrecisionContext {
>     public EpsilonUlpDoublePrecisionContext(double eps, double maxUlps) { /* ... */ }
>     @Override
>     public boolean equals(double a, double b) { /* ... */ }
> } 
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)