@sagemath/gmp

1.0.0 • Public • Published

GNU Multiprecision Arithmetic

Quickstart

Install the package

$ npm i @sagemath/gmp

There's nothing you can directly do with this yet.

Build from source

You need to install emscripten. Then do

npm run build

This will download and build GMP from source.

TODO

Automate running the test suite.

Good news -- I did run it (as below) with a build and it fully passes (I didn't run everything in mpz).

In particular, make check currently doesn't run because the output of emcc ... -o foo can't be run via ./foo . However, if you try make check in the build directory, then (with make-executable.sh as below ):

$ ls --ignore='*.*' | grep ^t- | xargs make-executable.sh

That makes all the outputs from emcc executable; you can then type make check again and the test suite runs. I tediously did this and all tests pass.

Here is make-executable.sh

#!/usr/bin/env bash

# Given some scripts built using emscripten, modify them
# so they are executable.

sed -i '1s/^/#!\/usr\/bin\/env node \n/' "$@"
chmod +x "$@"

Probably a much better way is to patch the autoconf script to run the tests as `node ./testfile`.

Readme

Keywords

Package Sidebar

Install

npm i @sagemath/gmp

Weekly Downloads

0

Version

1.0.0

License

GPL-3.0-or-later

Unpacked Size

1.32 MB

Total Files

10

Last publish

Collaborators

  • wstein