[oct-cvs] Oct commit: oct qd-complex.lisp

rtoy rtoy at common-lisp.net
Tue Aug 28 14:12:53 UTC 2007


Update of /project/oct/cvsroot/oct
In directory clnet:/tmp/cvs-serv3944

Modified Files:
	qd-complex.lisp 
Log Message:
Add ADD1 method for QD-COMPLEX.


--- /project/oct/cvsroot/oct/qd-complex.lisp	2007/08/28 00:56:18	1.30
+++ /project/oct/cvsroot/oct/qd-complex.lisp	2007/08/28 14:12:53	1.31
@@ -28,6 +28,11 @@
 
 (in-package #:qd)
 
+(defmethod add1 ((a qd-complex))
+  (make-instance 'qd-complex
+		 :real (qd-value (add1 (realpart a)))
+		 :imag (qd-value (imagpart a))))
+		 
 (defmethod two-arg-/ ((a qd-real) (b rational))
   (make-instance 'qd-real :value (div-qd (qd-value a)
 					 (qd-value (float b #q0)))))




More information about the oct-cvs mailing list