package owl-base

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

Module Owl_base_complexSource

Type definition and constants

Type definition of a complex number.

Sourceval zero : t

Constant value zero.

Sourceval one : t

Constant value one.

Sourceval i : t

Constant value i.

Unary functions
Sourceval neg : t -> t

TODO

Sourceval abs : t -> float

TODO

Sourceval abs2 : t -> float

TODO

Sourceval logabs : t -> float

TODO

Sourceval conj : t -> t

TODO

Sourceval inv : t -> t

TODO

Sourceval sqrt : t -> t

TODO

Sourceval exp : t -> t

TODO

Sourceval exp2 : t -> t

TODO

Sourceval exp10 : t -> t

TODO

Sourceval expm1 : t -> t

TODO

Sourceval log : t -> t

TODO

Sourceval log2 : t -> t

TODO

Sourceval log10 : t -> t

TODO

Sourceval log1p : t -> t

TODO

Sourceval sin : t -> t

TODO

Sourceval cos : t -> t

TODO

Sourceval tan : t -> t

TODO

Sourceval cot : t -> t

TODO

Sourceval sec : t -> t

TODO

Sourceval csc : t -> t

TODO

Sourceval sinh : t -> t

TODO

Sourceval cosh : t -> t

TODO

Sourceval tanh : t -> t

TODO

Sourceval sech : t -> t

TODO

Sourceval csch : t -> t

TODO

Sourceval coth : t -> t

TODO

Sourceval asin : t -> t

TODO

Sourceval acos : t -> t

TODO

Sourceval atan : t -> t

TODO

Sourceval asec : t -> t

TODO

Sourceval acsc : t -> t

TODO

Sourceval acot : t -> t

TODO

Sourceval asinh : t -> t

TODO

Sourceval acosh : t -> t

TODO

Sourceval atanh : t -> t

TODO

Sourceval asech : t -> t

TODO

Sourceval acsch : t -> t

TODO

Sourceval acoth : t -> t

TODO

Sourceval arg : t -> float

``arg x`` returns the angle of a complex number ``x``.

Sourceval phase : t -> float

``phase x`` returns the phase of a complex number ``x``.

Sourceval floor : t -> t

``floor x``

Sourceval ceil : t -> t

``ceil x``

Sourceval round : t -> t

``round x``

Sourceval trunc : t -> t

``trunc x``

Sourceval fix : t -> t

``fix x``

Binary functions
Sourceval add : t -> t -> t

TODO

Sourceval sub : t -> t -> t

TODO

Sourceval mul : t -> t -> t

TODO

Sourceval div : t -> t -> t

TODO

Sourceval add_re : t -> float -> t

TODO

Sourceval add_im : t -> float -> t

TODO

Sourceval sub_re : t -> float -> t

TODO

Sourceval sub_im : t -> float -> t

TODO

Sourceval mul_re : t -> float -> t

TODO

Sourceval mul_im : t -> float -> t

TODO

Sourceval div_re : t -> float -> t

TODO

Sourceval div_im : t -> float -> t

TODO

Sourceval pow : t -> t -> t

TODO

Sourceval polar : float -> float -> t

TODO

Sourceval rect : float -> float -> t

``rect r phi`` return a complex number with polar coordinates ``r`` and ``phi``.

Comparison functions
Sourceval equal : t -> t -> bool

TODO

Sourceval not_equal : t -> t -> bool

TODO

Sourceval less : t -> t -> bool

TODO

Sourceval greater : t -> t -> bool

TODO

Sourceval less_equal : t -> t -> bool

TODO

Sourceval greater_equal : t -> t -> bool

TODO

Helper functions
Sourceval complex : float -> float -> t

``complex re im`` returns a complex number ``re; im``.

Sourceval of_tuple : (float * float) -> t

``of_tuple (re, im)`` returns a complex number ``re; im``.

Sourceval to_tuple : t -> float * float

``to_tuple x`` converts a complex number to tuple ``(x.re; x.im)``.

Sourceval is_nan : t -> bool

``is_nan x`` returns ``true`` if ``x.re`` is ``nan`` or ``x.im`` is ``nan``.

Sourceval is_inf : t -> bool

``is_inf x`` returns ``true`` if either ``x.re`` or ``x.im`` is ``infinity`` or ``neg_infinity``.

Sourceval is_normal : t -> bool

``is_normal x`` returns ``true`` if both ``x.re`` and ``x.im`` are ``normal``.

OCaml

Innovation. Community. Security.