-
Notifications
You must be signed in to change notification settings - Fork 0
infinity0/gmp-java
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
# Build There are two forms ("d" and "s") of this library. Each of these require different Java class/library paths for user code to work; see the corresponding check_? target for details. The "meat" of this library is the class gcj.math.BigInteger. In GCJ, this class is simply java.math.BigInteger, but here we rename it so that you can use the former in a non-GCJ JVM too. ## Build against libgmp-dev and libgcj.jar libgcj.jar is the GNU Classpath / GCJ implementation of standard java library, so you need GCJ installed to build and run against this form. Note that this does *not* mean you need to use GCJ as your JVM; you just need to be able to link against its jars and libs on your file system. This is the preferred form if you already have GCJ installed (default on many GNU/Linux distributions), and results in the least code duplication from GCJ. # install libgmp-dev, gcj-4.?-jre-lib, and optionally gcj-4.?-source[1] # edit Makefile vars JUNIT_*, GCJ_* $ make gmp.jar check_d [1] if not, we fall back to downloading GCJ source from GNU servers ## Build against libgmp-dev only This form is useful for people that are unable to, or refuse to, have GCJ installed on their machines. It copies a minimal set of math-related code from GCJ and uses it to build this library. # install libgmp-dev # edit Makefile vars JUNIT_* $ make gmp-nogcj.jar libgmp-jni.so check_s # Quirks We should probably use ant to do the javac/jar/junit-related stuff. There was enough non-java stuff that I initially decided to use GNU make, and ended up sticking with it. # Credits Inspired by https://bitbucket.org/dfdeshom/gmp-java/overview I decided to code this version to be - easier to track modifications from upstream GCJ - use the actual BigInteger class, which is immutable, rather than try to retrofit the lower-level GMP class, which is mutable in GCJ, into a BigInteger-style interface (i.e. similar methods). # TODO debian build script that builds gmp.jar
About
GMP-based implementation of BigInteger for Java
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published