Function: math-scale-rounding

math-scale-rounding is a byte-compiled function defined in calc.el.gz.

Signature

(math-scale-rounding A N)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc.el.gz
;;; Multiply (with rounding) the integer A by 10^N.   [I i S]
(defun math-scale-rounding (a n)
  (cond ((>= n 0)
	 (math-scale-left a n))
	(t
	 (if (< a 0)
	     (- (math-scale-rounding (- a) n))
	   (if (= n -1)
	       (/ (+ a 5) 10)
	     (/ (+ (math-scale-right a (- -1 n)) 5) 10))))))