Complex_division_bybuf   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/math.xtm

Implementation

(bind-func Complex_division_bybuf
  (lambda (a:Complexd* b:Complexd* c:Complexd* len)
    (let ((i 0) (j 0.0) (k 0.0) (l 0.0))
      (dotimes (i len)
        (set! j (+ (* (tref (pref-ptr a i) 0)
                      (tref (pref-ptr b i) 0))
                   (* (tref (pref-ptr a i) 1)
                      (tref (pref-ptr b i) 1))))
        (set! k (+ (* (tref (pref-ptr b i) 0)
                      (tref (pref-ptr b i) 0))
                   (* (tref (pref-ptr b i) 1)
                      (tref (pref-ptr b i) 1))))
        (set! l (- (* (tref (pref-ptr a i) 1)
                      (tref (pref-ptr b i) 0))
                   (* (tref (pref-ptr a i) 0)
                      (tref (pref-ptr b i) 1))))
        (tset! (pref-ptr c i) 0 (/ j k))
        (tset! (pref-ptr c i) 1 (/ l k)))
      void)))


Back to Index

Similar Entries

  • Complex_addition_bybuf    xtlang
  • Complex_addition_bybuf    xtlang
  • Complex_bufferize    xtlang
  • Complex_bufferize    xtlang
  • Complex_bufferize    xtlang
  • Complex_bufferize    xtlang
  • Complex_conj    xtlang
  • Complex_conj    xtlang
  • Complex_division_bybuf    xtlang
  • Complex_mag    xtlang
  • Complex_mag    xtlang
  • Complex_multiplication_bybuf    xtlang
  • Complex_multiplication_bybuf    xtlang
  • Complex_multiplication_polar    xtlang
  • Complex_phase    xtlang
  • Complex_phase    xtlang
  • Complex_phase2    xtlang
  • Complex_subtraction_bybuf    xtlang
  • Complex_subtraction_bybuf    xtlang
  • Complex_unbufferize    xtlang
  • Complex_unbufferize    xtlang
  • Complex_unbufferize    xtlang
  • Complex_unbufferize    xtlang
  • GSL_SET_COMPLEX    xtlang
  • complex?    scheme
  • impc:ir:complex-type?    scheme
  • impc:ti:complex-type?    scheme
  • impc:ti:complex-unify    scheme
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang
  • xtm_division    xtlang