Function: calc-report-prime-test
calc-report-prime-test is an autoloaded and byte-compiled function
defined in calc-comb.el.gz.
Signature
(calc-report-prime-test RES)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-comb.el.gz
(defun calc-report-prime-test (res)
(cond ((eq (car res) t)
(calc-record-message "prim" "Prime (guaranteed)"))
((eq (car res) nil)
(if (cdr res)
(if (eq (nth 1 res) 'unknown)
(calc-record-message
"prim" "Non-prime (factors unknown)")
(calc-record-message
"prim" "Non-prime (%s is a factor)"
(math-format-number (nth 1 res))))
(calc-record-message "prim" "Non-prime")))
(t
(calc-record-message
"prim" "Probably prime (%d iters; %s%% chance of error)"
(nth 1 res)
(let ((calc-float-format '(fix 2)))
(math-format-number (nth 2 res)))))))