Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- installs in `ocamlc -where`/zarith instead of `ocamlc -where` when no ocamlfind found - adde Z.version: the library version in string form - added zarith.h: conversion between GMP and Zarith for C libraries
- Loading branch information
1 parent
1fe08e3
commit b757af4
Showing
8 changed files
with
72 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
description = "Arbitrary precision integers" | ||
requires = "" | ||
version = "0.1" | ||
version = "1.1" | ||
archive(byte) = "zarith.cma" | ||
archive(native) = "zarith.cmxa" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
Public C interface for Zarith. | ||
This is intended for C libraries that wish to convert between mpz_t and | ||
Z.t objects. | ||
This file is part of the Zarith library | ||
http://forge.ocamlcore.org/projects/zarith . | ||
It is distributed under LGPL 2 licensing, with static linking exception. | ||
See the LICENSE file included in the distribution. | ||
Copyright (c) 2010-2011 Antoine Miné, Abstraction project. | ||
Abstraction is part of the LIENS (Laboratoire d'Informatique de l'ENS), | ||
a joint laboratory by: | ||
CNRS (Centre national de la recherche scientifique, France), | ||
ENS (École normale supérieure, Paris, France), | ||
INRIA Rocquencourt (Institut national de recherche en informatique, France). | ||
*/ | ||
|
||
|
||
/* gmp.h or mpir.h must be included manually before zarith.h */ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#include <caml/mlvalues.h> | ||
|
||
/* sets rop to the value in op (limbs are copied) */ | ||
void ml_z_mpz_set_z(mpz_t rop, value op); | ||
|
||
/* inits and sets rop to the value in op (limbs are copied) */ | ||
void ml_z_mpz_init_set_z(mpz_t rop, value op); | ||
|
||
/* returns a new z objects equal to op (limbs are copied) */ | ||
value ml_z_from_mpz(mpz_t op); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |