commit | 8af1a5dd8d1efaf2a29ed403e98cbf216212220b | [log] [tgz] |
---|---|---|
author | aherbert <aherbert@apache.org> | Mon Feb 03 16:45:05 2020 +0000 |
committer | aherbert <aherbert@apache.org> | Mon Feb 03 16:53:39 2020 +0000 |
tree | ce33869c86aabce72216c29e737b7d8a0088cd6c | |
parent | c79bdffb5c79fe19a662a42b8c69ad3869ed75f8 [diff] |
Change tanh to use the identities for all computations. This removes the requirement to assert that the switch from using sin(2x) and cos(2x) and suitable identities is smooth. The test to assert this failed on Java 11 but passed on Java 8. This may be due to a change in the trigonomic functions between JDKs. The test assertion has been removed as it is no longer valid for the new computation. The functions to compute the identities for overflow are now redundant and have been removed. The function is now overflow safe for finite imaginary with no computation switch as y approaches infinity. This lowers the ulp from the c reference test from 3 to 2 for tanh. Thus the computation accuracy is similar and the c reference data may be using the same computation.
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.