commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luc Maisonobe (JIRA)" <>
Subject [jira] Commented: (MATH-412) Add high precision decimal floating point library (dfp)
Date Wed, 01 Sep 2010 19:15:55 GMT


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:
>             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 to the
project.  I've dual licensed the project under ASF and LGPL.   I will submit a software grant

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

View raw message