Cpow   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/contrib/gsl.xtm

Implementation

(bind-func Cpow
  (lambda (num1:gsl_complex* num2:gsl_complex*)
    (let ((num3:gsl_complex* (alloc))
    (cres (gsl_complex_pow (pref num1 0) (pref num2 0)))
          (res (tref cres 0)))
      (aset! (tref-ptr num3 0) 0 (aref res 0))
      (aset! (tref-ptr num3 0) 1 (aref res 1))
      num3)))


Back to Index

Similar Entries