commit | 643e1693b7ba06aa3cc524fb8b83a983a62a6227 | [log] [tgz] |
---|---|---|
author | aherbert <aherbert@apache.org> | Wed Jan 22 17:58:04 2020 +0000 |
committer | Alex Herbert <aherbert@apache.org> | Tue Mar 24 23:24:20 2020 +0000 |
tree | 491a58100e6788af049ddd2cbf9c359f32910d34 | |
parent | 817cb6d4c8ec6afdfed94e9d5e8bbd50e0b9f9db [diff] |
NUMBERS-143: Added specialised hypot function to Complex. The new implementation is faster and has lower maximum error than using Math.hypot. This is a port of the "Freely Distributable Math Library" hypot function. The original source notice is included in the project LICENSE. The functionality of Complex.abs should match Math.hypot for infinity edge case handling and scaling of the intermediate sum. Tests have been added to the CStandardTest to check the returned value on random numbers. Update Complex performance test for Complex.abs(). Add tests for Math.sqrt(Complex.norm()) and use of Math.hypot(). Increase size to 10000 to prevent branch prediction memorising the test data. Exclude PMD rule ExcessiveMethodLength for Complex.
The Apache Commons Numbers project provides number types and utilities.
More information can be found on the homepage. The JavaDoc can be browsed. Questions related to the usage of Apache Commons Numbers should be posted to the user mailing list.
You can download source and binaries from our download page.
Alternatively you can pull it from the central Maven repositories:
<dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-numbers</artifactId> <version>1.0</version> </dependency>
We accept PRs via github. The developer mailing list is the main channel of communication for contributors. There are some guidelines which will make applying PRs easier for us:
mvn clean test
.If you plan to contribute on a regular basis, please consider filing a contributor license agreement. You can learn more about contributing via GitHub in our contribution guidelines.
Code is under the Apache Licence v2.
You like Apache Commons Numbers? Then donate back to the ASF to support the development.