commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (Commented) (JIRA)" <>
Subject [jira] [Commented] (MATH-690) Remove methods from "MathUtils"
Date Tue, 18 Oct 2011 20:39:12 GMT


Gilles commented on MATH-690:

Please have a look at revision 1185841.

I've implemented "copySign" for "byte" arguments. It can replace the "sign" method; however,
the additional functionality comes at the cost of a more complex method that must also check
for overflow.
Shall I go on and implement "copySign" for the other integral types?
Shall I remove "sign"?

The "indicator" methods are slightly different: They return -1 or 1 (whereas "sign", and "copySign",
can return 0). There is a single use of it in CM (in class "Complex"). Is it safe to remove
them, and replace with "copySign"?

> Remove methods from "MathUtils"
> -------------------------------
>                 Key: MATH-690
>                 URL:
>             Project: Commons Math
>          Issue Type: Task
>            Reporter: Gilles
>            Assignee: Gilles
>            Priority: Trivial
>              Labels: api-change
>             Fix For: 3.0
> I propose to remove the following methods from "MathUtils":
>   public static double sign(final double x)
>   public static float sign(final float x)
>   public static double sinh(double x)
>   public static double cosh(double x)
> Also, "sign" and "indicator" functions seem redundant (and the "float" and
> "double" versions are not dealing correctly with -0.0).

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message