Function: math-sin-series

math-sin-series is a byte-compiled function defined in calc-math.el.gz.

Signature

(math-sin-series SUM NFAC N X XNEGSQR)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-math.el.gz
(defun math-sin-series (sum nfac n x xnegsqr)
  (math-working "sin" sum)
  (let* ((nextx (math-mul-float x xnegsqr))
	 (nextsum (math-add-float sum (math-div-float nextx
						      (math-float nfac)))))
    (if (math-nearly-equal-float sum nextsum)
	sum
      (math-sin-series nextsum (math-mul nfac (* n (1+ n)))
		       (+ n 2) nextx xnegsqr))))