Base.Complex

This document is auto-generated for Owl’s APIs. #70 entries have been extracted. timestamp: 2018-04-16 13:12:54

Github: {Signature} {Implementation}

Type definition and constants

type t = Complex.t

Type definition of a complex number.

val zero : t

Constant value zero.

val one : t

Constant value one.

val i : t

Constant value i.

source code

Unary functions

val neg : t -> t

TODO

val abs : t -> float

TODO

source code

val abs2 : t -> float

TODO

source code

val logabs : t -> float

TODO

source code

val conj : t -> t

TODO

val inv : t -> t

TODO

val sqrt : t -> t

TODO

val exp : t -> t

TODO

val log : t -> t

TODO

val sin : t -> t

TODO

source code

val cos : t -> t

TODO

source code

val tan : t -> t

TODO

source code

val cot : t -> t

TODO

source code

val sec : t -> t

TODO

source code

val csc : t -> t

TODO

source code

val sinh : t -> t

TODO

source code

val cosh : t -> t

TODO

source code

val tanh : t -> t

TODO

source code

val sech : t -> t

TODO

source code

val csch : t -> t

TODO

source code

val coth : t -> t

TODO

source code

val asin : t -> t

TODO

source code

val acos : t -> t

TODO

source code

val atan : t -> t

TODO

source code

val asec : t -> t

TODO

source code

val acsc : t -> t

TODO

source code

val acot : t -> t

TODO

source code

val asinh : t -> t

TODO

source code

val acosh : t -> t

TODO

source code

val atanh : t -> t

TODO

source code

val asech : t -> t

TODO

source code

val acsch : t -> t

TODO

source code

val acoth : t -> t

TODO

source code

val arg : t -> float

arg x returns the angle of a complex number x.

val phase : t -> float

phase x returns the phase of a complex number x.

source code

Binary functions

val add : t -> t -> t

TODO

val sub : t -> t -> t

TODO

val mul : t -> t -> t

TODO

val div : t -> t -> t

TODO

val add_re : t -> float -> t

TODO

source code

val add_im : t -> float -> t

TODO

source code

val sub_re : t -> float -> t

TODO

source code

val sub_im : t -> float -> t

TODO

source code

val mul_re : t -> float -> t

TODO

source code

val mul_im : t -> float -> t

TODO

source code

val div_re : t -> float -> t

TODO

source code

val div_im : t -> float -> t

TODO

source code

val pow : t -> t -> t

TODO

val polar : float -> float -> t

TODO

val rect : float -> float -> t

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

source code

Comparison functions

val equal : t -> t -> bool

TODO

source code

val not_equal : t -> t -> bool

TODO

source code

val less : t -> t -> bool

TODO

source code

val greater : t -> t -> bool

TODO

source code

val less_equal : t -> t -> bool

TODO

source code

val greater_equal : t -> t -> bool

TODO

source code

Helper functions

val complex : float -> float -> t

complex re im returns a complex number {re; im}.

source code

val of_tuple : float * float -> t

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

source code

val to_tuple : t -> float * float

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

source code

val is_nan : t -> bool

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

source code

val is_inf : t -> bool

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

source code