[
https://issues.apache.org/jira/browse/MATH-690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130005#comment-13130005
]
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: https://issues.apache.org/jira/browse/MATH-690
> 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:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira