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
- Annotations
- @extern()
- Alphabetic
- By Inheritance
- complex
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cabs(complex: Ptr[CDoubleComplex]): CDouble
- Annotations
- @name("scalanative_cabs")
- def cabsf(complex: Ptr[CFloatComplex]): CFloat
- Annotations
- @name("scalanative_cabsf")
- def cacos(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_cacos")
- def cacosf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_cacosf")
- def cacosh(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_cacosh")
- def cacoshf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_cacoshf")
- def carg(complex: Ptr[CDoubleComplex]): CDouble
- Annotations
- @name("scalanative_carg")
- def cargf(complex: Ptr[CFloatComplex]): CFloat
- Annotations
- @name("scalanative_cargf")
- def casin(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_casin")
- def casinf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_casinf")
- def casinh(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_casinh")
- def casinhf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_casinhf")
- def catan(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_catan")
- def catanf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_catanf")
- def catanh(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_catanh")
- def catanhf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_catanhf")
- def ccos(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_ccos")
- def ccosf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_ccosf")
- def ccosh(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_ccosh")
- def ccoshf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_ccoshf")
- def cexp(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_cexp")
- def cexpf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_cexpf")
- def cimag(complex: Ptr[CDoubleComplex]): CDouble
- Annotations
- @name("scalanative_cimag")
- def cimagf(complex: Ptr[CFloatComplex]): CFloat
- Annotations
- @name("scalanative_cimagf")
- def clog(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_clog")
- def clogf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_clogf")
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def conj(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_conj")
- def conjf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_conjf")
- def cpow(x: Ptr[CDoubleComplex], y: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_cpow")
- def cpowf(x: Ptr[CFloatComplex], y: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_cpowf")
- def cproj(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_cproj")
- def cprojf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_cprojf")
- def creal(complex: Ptr[CDoubleComplex]): CDouble
- Annotations
- @name("scalanative_creal")
- def crealf(complex: Ptr[CFloatComplex]): CFloat
- Annotations
- @name("scalanative_crealf")
- def csin(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_csin")
- def csinf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_csinf")
- def csinh(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_csinh")
- def csinhf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_csinhf")
- def csqrt(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_csqrt")
- def csqrtf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_csqrtf")
- def ctan(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_ctan")
- def ctanf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_ctanf")
- def ctanh(complex: Ptr[CDoubleComplex], result: Ptr[CDoubleComplex]): Ptr[CDoubleComplex]
- Annotations
- @name("scalanative_ctanh")
- def ctanhf(complex: Ptr[CFloatComplex], result: Ptr[CFloatComplex]): Ptr[CFloatComplex]
- Annotations
- @name("scalanative_ctanhf")
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()