fedeomoto / nim-gmp Goto Github PK
View Code? Open in Web Editor NEWNimrod/Nim wrapper for the GNU multiple precision arithmetic library
License: Other
Nimrod/Nim wrapper for the GNU multiple precision arithmetic library
License: Other
in the second example, line 9:
let x: mpz = 10 # convert int to mpz_t
doesn't compile on my machine (nim 0.10.3 nightly from github, win64)
and returns nimgmp.nim(8, 13) Error: type mismatch: got (int literal(10)) but expected 'mpz'
.
Adding a
converter convert*(a: int): mpz_t =
mpz_init_set_si(result,clong(a))
seems to fix it, but i'm not sure that's the way you want to go
Entered on nim forum:
nim2 c -d:release rho4.nim
import bignum # 0.4 latest version
...
/home/doug/.nimble/pkgs/gmp-0.2.5/gmp/pure.nim(19, 48) Error: invalid indentation
reply by ringabout:
https://github.com/subsetpark/nim-gmp/blob/7dfd4570c2a986c2e90ea16bb917a1b99668c460/src/gmp/pure.nim#L19
Pragmas cannot be placed after the object in v2.
mm_gmp_randstate_algdata* {.pure, union.} = object
mp_lc*: pointer
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.