No description
Find a file
2016-02-06 20:16:18 -06:00
examples exampl/mtthread: Pass a GEN directly to threads 2016-01-31 19:01:30 -06:00
.gitignore Add complete bindings and examples 2016-01-26 20:14:06 -06:00
LICENSE Initial commit 2016-01-21 22:18:04 -06:00
pari.nim Add multithread example. 2016-01-29 23:41:58 -06:00
pari.nimble Add Readme and nimble files 2016-01-26 20:34:33 -06:00
README.org Add pari/gp version required 2016-02-06 20:16:18 -06:00

Pari/Gp C library wrapper for nim

This is a nim modules with binding to the Pari/Gp library wrapper.

Use

The Pari/Gp - version 2.7.5 - libraries need to be accesssible for dynamic loading.

import pari will import all (or most) C defined functions from Pari/Gp to nim. New type introduced :'GEN'. 'newGEN(1)' to create a new 'GEN' type.

Supported operators includes: '+,-,*,/,^', '$', 'mod', '<,>,==' etc..

Examples:

pari_init(2000000,2000)
var numprime=(newGEN(2)^701+1) / 3
echo numprime
echo "is prime?", isprime(numprime)

Garbage collection needs to be done manually as with the Pari/Gp C code.