Owl_base_complex
val zero : t
Constant value zero.
val one : t
Constant value one.
val i : t
Constant value i.
val abs : t -> float
TODO
val abs2 : t -> float
TODO
val logabs : t -> float
TODO
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
.
val polar : float -> float -> t
TODO
val rect : float -> float -> t
rect r phi
return a complex number with polar coordinates r
and phi
.
val complex : float -> float -> t
complex re im
returns a complex number {re; im}
.
val of_tuple : (float * float) -> t
of_tuple (re, im)
returns a complex number {re; im}
.
val to_tuple : t -> float * float
to_tuple x
converts a complex number to tuple (x.re; x.im)
.
val is_nan : t -> bool
is_nan x
returns true
if x.re
is nan
or x.im
is nan
.
val is_inf : t -> bool
is_inf x
returns true
if either x.re
or x.im
is infinity
or neg_infinity
.
val is_normal : t -> bool
is_normal x
returns true
if both x.re
and x.im
are normal
.