Function: calc-FactorRules
calc-FactorRules is an autoloaded and byte-compiled function defined
in calc-rules.el.gz.
Signature
(calc-FactorRules)
Documentation
FactorRules
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-rules.el.gz
(defun calc-FactorRules ()
"FactorRules"
(calc-compile-rule-set
"FactorRules" "[
thecoefs(x, [z, a+b, c]) := thefactors(x, [d x + d a/c, (c/d) x + (b/d)])
:: z = a b/c :: let(d := pgcd(pcont(c), pcont(b))),
thecoefs(x, [z, a, c]) := thefactors(x, [(r x + a/(2 r))^2])
:: z = (a/2)^2/c :: let(r := esimplify(sqrt(c)))
:: !matches(r, sqrt(rr)),
thecoefs(x, [z, 0, c]) := thefactors(x, [rc x + rz, rc x - rz])
:: negative(z)
:: let(rz := esimplify(sqrt(-z))) :: !matches(rz, sqrt(rzz))
:: let(rc := esimplify(sqrt(c))) :: !matches(rc, sqrt(rcc)),
thecoefs(x, [z, 0, c]) := thefactors(x, [rz + rc x, rz - rc x])
:: negative(c)
:: let(rz := esimplify(sqrt(z))) :: !matches(rz, sqrt(rzz))
:: let(rc := esimplify(sqrt(-c))) :: !matches(rc, sqrt(rcc))
]"))