瀏覽代碼

Cleaned up coefficient getter

Samuel W. Flint 8 年之前
父節點
當前提交
af77a89536
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      lisp-cas.org

+ 2 - 3
lisp-cas.org

@@ -825,10 +825,9 @@ As there are various forms of expressions, and to provide for simplification, th
   (defun coefficient (term)
     (when (classified-as-p term 'polynomial-term)
       (classification-case term
-                           (variable 1)
-                           (power 1)
+                           (numeric term)
                            (multiplicative (second term))
-                           (numeric term))))
+                           (* 1))))
 #+END_SRC
 
 *** TODO Get Term Variables