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

28 Aug
2007
28 Aug
'07
2:12 p.m.
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)))))
6388
Age (days ago)
6388
Last active (days ago)
0 comments
1 participants
participants (1)
-
rtoy