Function: math-posp
math-posp is an autoloaded and byte-compiled function defined in
calc-misc.el.gz.
Signature
(math-posp A)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-misc.el.gz
;; True if A is real and positive. [P n] [Public]
;;;###autoload
(defun math-posp (a)
(if (consp a)
(cond ((memq (car a) '(float frac))
(Math-integer-posp (nth 1 a)))
((eq (car a) 'hms)
(if (math-zerop (nth 1 a))
(if (math-zerop (nth 2 a))
(math-posp (nth 3 a))
(math-posp (nth 2 a)))
(math-posp (nth 1 a))))
((eq (car a) 'date)
(math-posp (nth 1 a)))
((eq (car a) 'mod)
(not (math-zerop (nth 1 a))))
((eq (car a) 'intv)
(or (math-posp (nth 2 a))
(and (math-zerop (nth 2 a))
(memq (nth 1 a) '(0 1)))))
((equal a '(var inf var-inf)) t))
(> a 0)))