complex

@extern
object complex

All functions take complex but Scala Native does not support pass by value so we pass a pointer to an Array of length 2 and have a small wrapper in C doing the conversion to call the native function. Currently Scala Native and JVM have no direct support for long double so these methods are not implemented.

Since the user must manage the memory, we pass a buffer passed to each function for storing the result and is also is returned from the function so functions can be chained together. This adds one additional parameter to the function compared to the C API.

Implicit classes are provided for convenience.

References: https://en.wikipedia.org/wiki/C_data_types C99 also added complex types: float _Complex, double _Complex, long double _Complex https://en.wikipedia.org/wiki/Long_double http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/complex.h.html

class Object
trait Matchable
class Any
complex.type

Type members

Inherited types

type CDoubleComplex = CStruct2[CDouble, CDouble]
Inherited from:
complex (hidden)
type CFloatComplex = CStruct2[CFloat, CFloat]
Inherited from:
complex (hidden)

Value members

Inherited methods

@name("scalanative_cabs")
def cabs(complex: Ptr[CDoubleComplex]): CDouble
Inherited from:
complex (hidden)
@name("scalanative_cabsf")
def cabsf(complex: Ptr[CFloatComplex]): CFloat
Inherited from:
complex (hidden)
@name("scalanative_cacos")
def cacos(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_cacosf")
def cacosf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_cacosh")
def cacosh(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_cacoshf")
def cacoshf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_carg")
def carg(complex: Ptr[CDoubleComplex]): CDouble
Inherited from:
complex (hidden)
@name("scalanative_cargf")
def cargf(complex: Ptr[CFloatComplex]): CFloat
Inherited from:
complex (hidden)
@name("scalanative_casin")
def casin(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_casinf")
def casinf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_casinh")
def casinh(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_casinhf")
def casinhf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_catan")
def catan(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_catanf")
def catanf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_catanh")
def catanh(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_catanhf")
def catanhf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_ccos")
def ccos(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_ccosf")
def ccosf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_ccosh")
def ccosh(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_ccoshf")
def ccoshf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_cexp")
def cexp(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_cexpf")
def cexpf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_cimag")
def cimag(complex: Ptr[CDoubleComplex]): CDouble
Inherited from:
complex (hidden)
@name("scalanative_cimagf")
def cimagf(complex: Ptr[CFloatComplex]): CFloat
Inherited from:
complex (hidden)
@name("scalanative_clog")
def clog(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_clogf")
def clogf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_conj")
def conj(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_conjf")
def conjf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_cpow")
def cpow(x: Ptr[CDoubleComplex], y: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_cpowf")
def cpowf(x: Ptr[CFloatComplex], y: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_cproj")
def cproj(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_cprojf")
def cprojf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_creal")
def creal(complex: Ptr[CDoubleComplex]): CDouble
Inherited from:
complex (hidden)
@name("scalanative_crealf")
def crealf(complex: Ptr[CFloatComplex]): CFloat
Inherited from:
complex (hidden)
@name("scalanative_csin")
def csin(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_csinf")
def csinf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_csinh")
def csinh(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_csinhf")
def csinhf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_csqrt")
def csqrt(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_csqrtf")
def csqrtf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_ctan")
def ctan(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_ctanf")
def ctanf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)
@name("scalanative_ctanh")
def ctanh(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
Inherited from:
complex (hidden)
@name("scalanative_ctanhf")
def ctanhf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
Inherited from:
complex (hidden)