Browse Source

Add logarithmic expression copying

Samuel W. Flint 5 years ago
parent
commit
7e90e9abfe
1 changed files with 9 additions and 0 deletions
  1. 9 0
      larcs.org

+ 9 - 0
larcs.org

@@ -538,6 +538,11 @@ There are two primary forms of exponential -- the natural (~exp~) and the genera
              :initarg :log-of
              :type <expression>)))
 
+  (defmethod copy-expression ((expression <logarithmic>))
+    (make-instance '<logarithmic>
+                   :base (copy-expression (slot-value expression 'base))
+                   :log-of (copy-expression (slot-value expression 'log-of))))
+
   @export
   (defclass <nat-logarithmic> (<logarithmic>)
     ((log-of :reader log-of
@@ -554,6 +559,10 @@ There are two primary forms of exponential -- the natural (~exp~) and the genera
              (base expression-b))
        (eqal (log-of expression-a)
              (log-of expression-b))))
+
+  (defmethod copy-expression ((expression <nat-logarithmic>))
+    (make-instance '<nat-logarithmic>
+                   :log-of (copy-expression (slot-value expression 'log-of))))
 #+END_SRC
 
 *** WORKING Trigonometric