Charles Cooper created MATH-954:
-----------------------------------
Summary: Faster implementation of FastMath.abs
Key: MATH-954
URL: https://issues.apache.org/jira/browse/MATH-954
Project: Commons Math
Issue Type: Improvement
Affects Versions: 3.1.1
Environment: java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.4) (6b27-1.12.4-1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.39-2 x86_64 GNU/Linux
Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz
Reporter: Charles Cooper
Priority: Minor
Fix For: 3.1.1
Faster implementations of abs() which use bitwise operations in preference to
branching. By my benchmark abs(double/float) are about 10-20% faster, and
abs(long/int) more than twice as fast. 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