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.08--num

v1.4.0

Published

The legacy Num library for arbitrary-precision integer and rational arithmetic (WASM port)

Downloads

2

Readme

The Num library for arithmetic on big integers and rationals

Overview

This library implements arbitrary-precision arithmetic on big integers and on rationals.

This is a legacy library. It used to be part of the core OCaml distribution (in otherlibs/num) but is now distributed separately. New applications that need arbitrary-precision arithmetic should use the Zarith library (https://github.com/ocaml/Zarith) instead of the Num library, and older applications that already use Num are encouraged to switch to Zarith. Zarith delivers much better performance than Num and has a nicer API.

Usage

To use the bignum library from your programs, it is recommended to use ocamlfind:

    ocamlfind ocamlc -package num ...
    ocamlfind ocamlopt -package num ...

Alternatively, you can do

    ocamlc <options> nums.cma <.cmo and .ml files>
    ocamlopt <options> nums.cmxa <.cmx and .ml files>

For toplevel use, just issue the commands

    #use "topfind";;
    #package "num";;

or

    #load "nums.cma";;

Documentation

The following modules are documented in their interfaces:

  • Big_int: operations on arbitrary-precision integers
  • Num: operations on arbitrary-precision numbers (integers and rationals)
  • Arith_status: flags that control rational arithmetic

More documentation on the functions provided in this library can be found in The CAML Numbers Reference Manual by Valérie Ménissier-Morain, INRIA technical report 141, july 1992, http://hal.inria.fr/docs/00/07/00/27/PDF/RT-0141.pdf

Compilation and installation

Prerequisites: OCaml version 4.04 or newer.

        make all
        make test
        make install
        make clean

History

This library is derived from Valérie Ménissier-Morain's implementation of rational arithmetic for Caml V3.1. Xavier Leroy did the Caml Light port. Victor Manuel Gulias Fernandez did the initial Caml Special Light / OCaml port. Pierre Weis did most of the maintenance and bug fixing.

Initially, the low-level big integer operations were provided by the BigNum package developed by Bernard Serpette, Jean Vuillemin and Jean-Claude Hervé (INRIA and Digital PRL). License issues forced us to replace the BigNum package. The current implementation of low-level big integer operations is due to Xavier Leroy.