Function: calcFunc-rot
calcFunc-rot is an autoloaded and byte-compiled function defined in
calc-bin.el.gz.
Signature
(calcFunc-rot A &optional N W)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-bin.el.gz
(defun calcFunc-rot (a &optional n w) ; [I I] [Public]
(setq a (math-trunc a)
n (if n (math-trunc n) 1))
(if (eq (car-safe a) 'mod)
(math-binary-modulo-args 'calcFunc-rot a n w)
(setq w (if w (math-trunc w) calc-word-size))
(when (zerop w)
(error "Rotation requires a nonzero word size"))
(or (integerp w)
(math-reject-arg w 'fixnump))
(or (Math-integerp a)
(math-reject-arg a 'integerp))
(or (Math-integerp n)
(math-reject-arg n 'integerp))
(if (< w 0)
(math-clip (calcFunc-rot a n (- w)) w)
(if (Math-integer-negp a)
(setq a (math-clip a w)))
(cond ((or (Math-integer-negp n)
(>= n w))
(calcFunc-rot a (math-mod n w) w))
(t
(math-add (calcFunc-lsh a (- n w) w)
(calcFunc-lsh a n w)))))))