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 2013/03/09 16:13:13 UTC

[jira] [Commented] (MATH-476) FastMath code contains 'magic' numbers, e.g. (-)4503599627370496.0

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

Luc Maisonobe commented on MATH-476:
------------------------------------

It seems many constants have been fixed (typically Sebb himself documented properly the constant 4503599627370496 he pointed out in the report).

Looking at the current state, I'm not sure we can go any further in this direction. The remaining constants are mainly polynomials, tables or split factors.

Can we consider the issue is resolved?
                
> FastMath code contains 'magic' numbers, e.g. (-)4503599627370496.0
> ------------------------------------------------------------------
>
>                 Key: MATH-476
>                 URL: https://issues.apache.org/jira/browse/MATH-476
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 2.2
>            Reporter: Sebb
>            Priority: Minor
>             Fix For: 3.2
>
>
> The FastMath class contains quite a few 'magic' numbers, not all of which are explained/documented.
> For example, how is the number (-)4503599627370496.0 calculated?
> IMO, all magic numbers should be replaced by constants with a descriptive name and explanatory Javadoc.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira