Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pmuellr/node-gmp-ffi
node interface to the GNU Multiple Precision Arithmetic Library
https://github.com/pmuellr/node-gmp-ffi
Last synced: about 2 months ago
JSON representation
node interface to the GNU Multiple Precision Arithmetic Library
- Host: GitHub
- URL: https://github.com/pmuellr/node-gmp-ffi
- Owner: pmuellr
- License: lgpl-3.0
- Created: 2015-08-03T12:12:55.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-09T04:59:15.000Z (over 9 years ago)
- Last Synced: 2024-04-09T21:04:46.722Z (10 months ago)
- Language: JavaScript
- Size: 3.97 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
node interface to the GNU Multiple Precision Arithmetic Library
================================================================================This package provides a multiple precision arithmetic library for node,
implemented on top of the
[GNU Multiple Precision Arithmetic Library](https://gmplib.org/).module exports
================================================================================`mpz`
--------------------------------------------------------------------------------The `mpz` export is a function which can be used as a constructor or invoked
as a function (which will invoke the constructor), to create an `mpz` object.An `mpz` object has the following methods:
* `mpz_init()`
* `mpz_clear()`
* `mpz_get_ui()`
* `mpz_get_si()`
* `mpz_set_ui(ulong)`
* `mpz_set_si(long)`
* `mpz_add(mpzOther, mpzResult)`
* `mpz_mul(mpzOther, mpzResult)`
* `mpz_toString(base)`rebuild
================================================================================To rebuild the shared libraries, you'll need to:
* download the source
* invoke the appropriate Makefile targetTo download the source, you can use the Makefile target `gmp-src`:
make gmp-src
The shared libraries built from the gmp source are all stored as the expected
shared library file name, in a directory based on the os name and architecture.The following line, when executed in a terminal, will print the expected
directory name containing the shared library:node -e 'os = require("os"); console.log(os.platform()+"-"+os.arch())'
license
================================================================================This package is licensed under the GNU LESSER GENERAL PUBLIC LICENSE, version 3.
See the LICENSE file for more information