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

Project Activity

See All Activity >

Categories

Mathematics

License

Apache License V2.0

Follow Jafama

Jafama Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Ratings

★★★★★
★★★★
★★★
★★
6
0
0
0
0
ease 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 5 / 5
features 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 4 / 5
design 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 5 / 5
support 1 of 5 2 of 5 3 of 5 4 of 5 5 of 5 0 / 5

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.
    1 user found this review helpful.
Read more reviews >

Additional Project Details

Intended Audience

Developers

Programming Language

Java

Related Categories

Java Mathematics Software

Registered

2009-07-20