package logtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Builtin.ArithOpSource

Sourceexception TypeMismatch of string

This exception is raised when Arith functions are called on non-numeric values

Sourcetype arith_view = [
  1. | `Int of Z.t
  2. | `Rat of Q.t
  3. | `Other of t
]
Sourceval view : t -> arith_view

Arith centered view of symbols

Sourceval parse_num : string -> t
Sourceval sign : t -> int
Sourceval one_i : t
Sourceval zero_i : t
Sourceval one_rat : t
Sourceval zero_rat : t
Sourceval zero_of_ty : [< `Int | `Rat ] -> t
Sourceval one_of_ty : [< `Int | `Rat ] -> t
Sourceval is_zero : t -> bool
Sourceval is_one : t -> bool
Sourceval is_minus_one : t -> bool
Sourceval floor : t -> t
Sourceval ceiling : t -> t
Sourceval truncate : t -> t
Sourceval round : t -> t
Sourceval prec : t -> t
Sourceval succ : t -> t
Sourceval sum : t -> t -> t
Sourceval difference : t -> t -> t
Sourceval uminus : t -> t
Sourceval product : t -> t -> t
Sourceval quotient : t -> t -> t
Sourceval quotient_e : t -> t -> t
Sourceval quotient_t : t -> t -> t
Sourceval quotient_f : t -> t -> t
Sourceval remainder_e : t -> t -> t
Sourceval remainder_t : t -> t -> t
Sourceval remainder_f : t -> t -> t
Sourceval to_int : t -> t
Sourceval to_rat : t -> t
Sourceval abs : t -> t
Sourceval divides : t -> t -> bool
Sourceval gcd : t -> t -> t
Sourceval lcm : t -> t -> t
Sourceval less : t -> t -> bool
Sourceval lesseq : t -> t -> bool
Sourceval greater : t -> t -> bool
Sourceval greatereq : t -> t -> bool
Sourceval divisors : Z.t -> Z.t list

List of non-trivial strict divisors of the int.

  • returns

    if int <= 1, the list of divisors otherwise. Empty list for prime numbers, obviously.

OCaml

Innovation. Community. Security.