Function: org--plot/prime-factors

org--plot/prime-factors is a byte-compiled function defined in org-plot.el.gz.

Signature

(org--plot/prime-factors VALUE)

Documentation

Return the prime decomposition of VALUE, e.g. for 12, (3 2 2).

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-plot.el.gz
(defun org--plot/prime-factors (value)
  "Return the prime decomposition of VALUE, e.g. for 12, (3 2 2)."
  (let ((factors '(1)) (i 1))
    (while (/= 1 value)
      (setq i (1+ i))
      (when (eq 0 (% value i))
	(push i factors)
	(setq value (/ value i))
	(setq i (1- i))
	))
    (cl-subseq factors 0 -1)))