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

rtoy rtoy at common-lisp.net
Mon Aug 27 19:12:22 UTC 2007


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

Modified Files:
	qd-class.lisp 
Log Message:
o Fix typo in DESCRIBE-OBJECT for QD-REAL.
o Add DESCRIBE-OJBECT method for QD-COMPLEX.
o Add defgeneric's for COERCE and RANDOM.


--- /project/oct/cvsroot/oct/qd-class.lisp	2007/08/27 17:49:19	1.21
+++ /project/oct/cvsroot/oct/qd-class.lisp	2007/08/27 19:12:22	1.22
@@ -95,10 +95,17 @@
 (defmethod describe-object ((q qd-real) stream)
   (multiple-value-bind (q0 q1 q2 q3)
       (qd-parts (qd-value q))
-    (format stream "~&~S is a quad-double with components ~
+    (format stream "~&~S is a QD-REAL with components ~
                     ~%  ~A, ~A, ~A, ~A~%"
 	    q q0 q1 q2 q3)))
 
+(defmethod describe-object ((q qd-complex) stream)
+  (format stream "~&~S is a QD-COMPLEX" q)
+  (format stream "~&It has components~&REAL: ")
+  (describe (realpart q))
+  (format stream "~&IMAG: ")
+  (describe (imagpart q)))
+
 
 (defgeneric add1 (a)
   (:documentation "Add 1"))
@@ -240,3 +247,10 @@
 
 (defgeneric qphase (x)
   (:documentation "Phase of X"))
+
+(defgeneric coerce (x type)
+  (:documentation "COERCE"))
+
+(defgeneric random (x &optional state)
+  (:documentation "RANDOM"))
+  




More information about the oct-cvs mailing list