Function: calcFunc-sin
calcFunc-sin is an autoloaded and byte-compiled function defined in
calc-math.el.gz.
Signature
(calcFunc-sin X)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-math.el.gz
;;; Sine, cosine, and tangent.
(defun calcFunc-sin (x) ; [N N] [Public]
(cond ((and (integerp x)
(if (eq calc-angle-mode 'deg)
(= (% x 90) 0)
(= x 0)))
(aref [0 1 0 -1] (math-mod (/ x 90) 4)))
((Math-scalarp x)
(math-with-extra-prec 2
(math-sin-raw (math-to-radians (math-float x)))))
((eq (car x) 'sdev)
(if (math-constp x)
(math-with-extra-prec 2
(let* ((xx (math-to-radians (math-float (nth 1 x))))
(xs (math-to-radians (math-float (nth 2 x))))
(sc (math-sin-cos-raw xx)))
(math-make-sdev (car sc) (math-mul xs (cdr sc)))))
(math-make-sdev (calcFunc-sin (nth 1 x))
(math-mul (nth 2 x) (calcFunc-cos (nth 1 x))))))
((and (eq (car x) 'intv) (math-intv-constp x))
(calcFunc-cos (math-sub x (math-quarter-circle nil))))
((equal x '(var nan var-nan))
x)
(t (calc-record-why 'scalarp x)
(list 'calcFunc-sin x))))