You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Luc Maisonobe (JIRA)" <ji...@apache.org> on 2010/09/01 21:15:55 UTC

[jira] Commented: (MATH-412) Add high precision decimal floating point library (dfp)

    [ https://issues.apache.org/jira/browse/MATH-412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12905169#action_12905169 ] 

Luc Maisonobe commented on MATH-412:
------------------------------------

I started integrating your dfp library.
I wonder if it would be useful to remove the compile-time constraint on number of digits. A quick glance showed me it would basically mean changing the dfp class (which I renamed Dfp for consistency with our checkstyle settings) into an abstract class without the public final DIGITS field but with a public abstract method getDigits() or getRadixDigits to avoid confusion with DfpDec.getDecimalDigits().

This way, user would remain free to choose the precision they need at run time.

In the existing code, the various use of DIGITS could be replaced either by calls to getRadixDigits() or by mant.length.
Building a new instance from scratch would require an additional argument to set the number of digits, and building instances related to other instances (for example when adding two Dfp instances) would rely on the initial number settings.
For simplicity, operations between instances with different digits settings would be forbidden (using an unchecked exception ...)

Do yo think this could work ?


> Add high precision decimal floating point library (dfp)
> -------------------------------------------------------
>
>                 Key: MATH-412
>                 URL: https://issues.apache.org/jira/browse/MATH-412
>             Project: Commons Math
>          Issue Type: New Feature
>    Affects Versions: 2.1
>         Environment: JDK1.4 - JDK1.6
>            Reporter: William Rossi
>            Assignee: Luc Maisonobe
>             Fix For: 2.2
>
>
> I am offering the dfp library available at http://sourceforge.net/projects/dfp/ to the project.  I've dual licensed the project under ASF and LGPL.   I will submit a software grant shortly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.