You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2013/03/20 11:55:16 UTC

[jira] [Commented] (MATH-951) Patch: Faster implementation of double org.apache.commons.math3.FastMath.copySign(double, double)

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

Sebb commented on MATH-951:
---------------------------

Surely m^s can overflow an int here? What happens then?

Also, I suspect exponentiation speed may vary considerably between processors - what CPU are you using?
                
> Patch: Faster implementation of double org.apache.commons.math3.FastMath.copySign(double, double)
> -------------------------------------------------------------------------------------------------
>
>                 Key: MATH-951
>                 URL: https://issues.apache.org/jira/browse/MATH-951
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.2
>         Environment: java version "1.6.0_27"
> OpenJDK Runtime Environment (IcedTea6 1.12.3) (6b27-1.12.3-1)
> OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
> Linux debian 3.2.0-4-amd64 #2 SMP Wed Jan 2 01:41:29 PST 2013 x86_64 GNU/Linux
> Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz
>            Reporter: Charles Cooper
>            Priority: Minor
>              Labels: patch, performance
>             Fix For: 3.2
>
>         Attachments: patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Between 40-50% faster than both current implementation and java.lang.Math.copySign by my (sloppy) benchmark. Patch attached.

--
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