Jafama (Java Fast Math) consists of fast - but not sloppy - counterparts of java.lang.Math treatments, plus additional ones.
They are usually about 2-4 (up to 15) times faster, with about 1e-15 accuracy, and handle special cases (NaN, etc.).
Since version 2.1, a StrictFastMath class is also provided. It is a strictfp version of FastMath (and not a fast version of StrictMath): for a same version of this library, its methods always return a same result for same arguments, which might not be the case for FastMath depending on JIT or other JVM optimizations.
Requires Java 5 or later.
Available on Central since 2015/06/05.
Also available on github since 2015/12/13:
https://github.com/jeffhain/jafama
Categories
MathematicsLicense
Apache License V2.0Follow Jafama
Other Useful Business Software
$300 in Free Credit for Your Google Cloud Projects
Launch your next project with $300 in free Google Cloud credit—no hidden charges. Test, build, and deploy without risk. Use your credit across the Google Cloud platform to find what works best for your needs. After your credits are used, continue building with free monthly usage products. Only pay when you're ready to scale. Sign up in minutes and start exploring.
Rate This Project
Login To Rate This Project
User Reviews
-
You should upload it to maven central.
-
Great speedup of math operations, while retaining the precision of java.lang.Math
-
Got a factor of 2 for some cases on newer Intel chips. Thanks!
-
Great library. I was able to achieve huge performance improvements by using the provided sqrt and trigonometric functions, instead of those provided in the JDK's Math.
-
Jafama is great! Thanks.