Function: math-to-simple-fraction

math-to-simple-fraction is an autoloaded and byte-compiled function defined in calc-alg.el.gz.

Signature

(math-to-simple-fraction F)

Source Code

;; Defined in /usr/src/emacs/lisp/calc/calc-alg.el.gz
(defun math-to-simple-fraction (f)
  (or (and (eq (car-safe f) 'float)
	   (or (and (>= (nth 2 f) 0)
		    (math-scale-int (nth 1 f) (nth 2 f)))
	       (and (integerp (nth 1 f))
		    (> (nth 1 f) -1000)
		    (< (nth 1 f) 1000)
		    (math-make-frac (nth 1 f)
				    (math-scale-int 1 (- (nth 2 f)))))))
      f))