jeffhain / jafama Goto Github PK
View Code? Open in Web Editor NEWA (Strict)FastMath class with 1e-15ish accuracy.
A (Strict)FastMath class with 1e-15ish accuracy.
For maven users, the latest version is still 2.1.0:
Please add the property Automatic-Module-Name to the MANIFEST.MF file. For better support in projects using the Java Platform Module System (JPMS).
In a particular application (HMM parameter fitting in log-space using the Baum-Welch
algorithm), I am seeing a small, but noticeable performance benefit from using your
optimized logarithm method FastMath.log. However, jafama delegates calls to FastMath.log
to Math.log unless a system property "jafama.fastlog" is set to "true". There are two
issues with this design choice:
The code I am writing is part of a library, so there seems to be no way for me to reliably set
the property before jafama is loaded. I can only document the requirement and trust the
users to do the right thing, which is somewhat unsatisfying.
In the (admittedly unlikely) case that someone uses my library in conjunction with
another library, which also depends on jafama, setting the global property will affect the
behavior of both libraries.
It would be much appreciated if you introduced a new method (say, FastMath.logOptimized),
that implements the same alogrithm as FastMath.log, but, like FastMath.logQuick, only
delegates to Math.log if "jafama.usejdk" is "true".
It would be great to reevaluate on modern CPUs and JDKs which of these functions are still beneficial to use.
Jar file downloaded from maven seems to be corrupted.
$ jar -tf jafama-2.3.0.jar
META-INF/MANIFEST.MF
java.lang.NullPointerException
at java.util.zip.ZipFile.getZipEntry(ZipFile.java:566)
at java.util.zip.ZipFile.access$900(ZipFile.java:60)
at java.util.zip.ZipFile$ZipEntryIterator.next(ZipFile.java:524)
at java.util.zip.ZipFile$ZipEntryIterator.nextElement(ZipFile.java:499)
at java.util.zip.ZipFile$ZipEntryIterator.nextElement(ZipFile.java:480)
at sun.tools.jar.Main.list(Main.java:1118)
at sun.tools.jar.Main.run(Main.java:293)
at sun.tools.jar.Main.main(Main.java:1288)
$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.