#### ctypes 0.20.1 0.20.0 0.19.1 0.18.0 0.17.1 0.17.0 0.16.0 0.15.1 0.15.0 0.14.0 0.13.1 0.13.0 0.12.1 0.12.0 0.11.5 0.11.4 0.11.3 0.11.2 0.11.1 0.11.0 0.10.5 0.10.4 0.10.3 0.10.2 0.10.1 0.10.0 0.9.5 0.9.4 0.9.3 0.9.2 0.9.1 0.9.0 0.8.2 0.8.1 0.8.0 0.7.2 0.7.1 0.7.0 0.6.3 0.6.2 0.6.1 0.6.0 0.5.1 0.5.0 0.4.2 0.4.1 0.4.0 0.3.4 0.2.3 0.1.1

Combinators for binding to C libraries without writing any C
IN THIS PACKAGE
Module
`type t`

The type of long double complex values

`val make : LDouble.t -> LDouble.t -> t`

`make x y` creates the long double complex value `x + y * i`

`val of_complex : Complex.t -> t`

create a long double complex from a Complex.t

`val to_complex : t -> Complex.t`

Convert a long double complex to a Complex.t. The real and imaginary components are converted by calling `LDouble.to_float` which can produce unspecified results.

`val zero : t`

`0 + i0`

`val one : t`

`1 + i0`

`val i : t`

`0 + i`

`val re : t -> LDouble.t`

return the real part of the long double complex

`val im : t -> LDouble.t`

return the imaginary part of the long double complex

`val neg : t -> t`

Unary negation

`val conj : t -> t`

Conjugate: given the complex `x + i.y`, returns `x - i.y`.

`val add : t -> t -> t`

`val sub : t -> t -> t`

Subtraction

`val mul : t -> t -> t`

Multiplication

`val div : t -> t -> t`

Division

`val inv : t -> t`

Multiplicative inverse (`1/z`).

`val sqrt : t -> t`

Square root.

`val norm2 : t -> LDouble.t`

Norm squared: given `x + i.y`, returns `x^2 + y^2`.

`val norm : t -> LDouble.t`

Norm: given `x + i.y`, returns `sqrt(x^2 + y^2)`.

`val polar : LDouble.t -> LDouble.t -> t`

`polar norm arg` returns the complex having norm `norm` and argument `arg`.

`val arg : t -> LDouble.t`

Argument. The argument of a complex number is the angle in the complex plane between the positive real axis and a line passing through zero and the number.

`val exp : t -> t`

Exponentiation. `exp z` returns `e` to the `z` power.

`val log : t -> t`

Natural logarithm (in base `e`).

`val pow : t -> t -> t`

Power function. `pow z1 z2` returns `z1` to the `z2` power.