package batteries

  1. Overview
  2. Docs
A community-maintained standard library extension

Install

Dune Dependency

Authors

Maintainers

Sources

v3.5.1.tar.gz
md5=d3d16ffc960e832a1c0e21b7123194e9
sha512=36c8561079aa9fefc864c2f03bd8ae20aa05987bb67e7a9beac3ab4f440dbf7d44f141c172b05fddb1a5b618fc55a27962bb45fc39bd7b3a15d56e0ed3ff3870

doc/batteries.unthreaded/BatNumber/module-type-Numeric/index.html

Module type BatNumber.Numeric

The full set of operations of a type of numbers

type t
val zero : t
val one : t
val neg : t -> t
val abs : t -> t
val add : t -> t -> t
val sub : t -> t -> t
val mul : t -> t -> t
val div : t -> t -> t
val modulo : t -> t -> t
val pow : t -> t -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val ord : t BatOrd.ord
val of_int : int -> t
val to_int : t -> int
val of_float : float -> t
val to_float : t -> float
val of_string : string -> t
val to_string : t -> string
val operations : t numeric
type discrete = t
val succ : t -> t
val pred : t -> t
module Infix : Infix with type bat__infix_t = t
module Compare : Compare with type bat__compare_t = t
include RefOps with type bat__refops_t = t
type bat__refops_t = t
val (+=) : bat__refops_t ref -> bat__refops_t -> unit
val (-=) : bat__refops_t ref -> bat__refops_t -> unit
val (*=) : bat__refops_t ref -> bat__refops_t -> unit
val (/=) : bat__refops_t ref -> bat__refops_t -> unit
OCaml

Innovation. Community. Security.