npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ocaml-wasm/4.12--zarith

v1.13.0-0

Published

The Zarith library implements arithmetic and logical operations over arbitrary-precision integers and rational numbers. (WASM port, wasi-sdk 12)

Downloads

68

Readme

The Zarith library

OVERVIEW

This library implements arithmetic and logical operations over arbitrary-precision integers.

The module is simply named Z. Its interface is similar to that of the Int32, Int64 and Nativeint modules from the OCaml standard library, with some additional functions. See the file z.mli for documentation.

The implementation uses GMP (the GNU Multiple Precision arithmetic library) to compute over big integers. However, small integers are represented as unboxed Caml integers, to save space and improve performance. Big integers are allocated in the Caml heap, bypassing GMP's memory management and achieving better GC behavior than e.g. the MLGMP library. Computations on small integers use a special, faster path (in C or OCaml) eschewing calls to GMP, while computations on large intergers use the low-level MPN functions from GMP.

Arbitrary-precision integers can be compared correctly using OCaml's polymorphic comparison operators (=, <, >, etc.).

Additional features include:

  • a module Q for rationals, built on top of Z (see q.mli)
  • a compatibility layer Big_int_Z that implements the same API as Big_int from the legacy Num library, but uses Z internally

REQUIREMENTS

  • OCaml, version 4.04.0 or later.
  • Either the GMP library or the MPIR library, including development files.
  • GCC or Clang or a gcc-compatible C compiler and assembler (other compilers may work).
  • The Findlib package manager (optional, recommended).

INSTALLATION

  1. First, run the "configure" script by typing:
   ./configure

The configure script has a few options. Use the -help option to get a list and short description of each option.

  1. It creates a Makefile, which can be invoked by:
   make

This builds native and bytecode versions of the library.

  1. The libraries are installed by typing:
   make install

or, if you install to a system location but are not an administrator

   sudo make install

If Findlib is detected, it is used to install files. Otherwise, the files are copied to a zarith/ subdirectory of the directory given by ocamlc -where.

The libraries are named zarith.cmxa and zarith.cma, and the Findlib module is named zarith.

Compiling and linking with the library requires passing the -I +zarith option to ocamlc / ocamlopt, or the -package zarith option to ocamlfind.

  1. (optional, recommended) Test programs are built and run by the additional command
  make tests

(but these are not installed).

  1. (optional) HTML API documentation is built (using ocamldoc) by the additional command
  make doc

ONLINE DOCUMENTATION

The documentation for the latest release is hosted on GitHub Pages.

LICENSE

This Library is distributed under the terms of the GNU Library General Public License version 2, with a special exception allowing unconstrained static linking. See LICENSE file for details.

AUTHORS

  • Antoine Miné, Sorbonne Université, formerly at ENS Paris.
  • Xavier Leroy, Collège de France, formerly at Inria Paris.
  • Pascal Cuoq, TrustInSoft.
  • Christophe Troestler (toplevel module)

COPYRIGHT

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).

CONTENTS

Source files | Description --------------------|----------------------------------------- configure | configuration script z.ml[i] | Z module and implementation for small integers caml_z.c | C implementation big_int_z.ml[i] | wrapper to provide a Big_int compatible API to Z q.ml[i] | rational library, pure OCaml on top of Z zarith_top.ml | toplevel module to provide pretty-printing projet.mak | builds Z, Q and the tests zarith.opam | package description for opam z_mlgmpidl.ml[i] | conversion between Zarith and MLGMPIDL tests/ | simple regression tests and benchmarks