Cmag   xtlang


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

Implementation

(bind-func Cmag
  (lambda (num:gsl_complex*)
    (let ((real (aref (tref num 0) 0))
    (imag (aref (tref num 0) 1)))
      (sqrt (+ (* real real) (* imag imag))))))


Back to Index