Changeset 535d2509c2974c113e6c1bfa27ece5d5b8f99bd1

Show
Ignore:
Timestamp:
03/06/11 18:30:15 (3 years ago)
Author:
Raymond Toy <toy.raymond@…>
Children:
c014c5f4e4b941aacf16a897a2cf689ed49b37ef
Parents:
258cd829289826458d6075caa279b253b8848749
git-committer:
Raymond Toy <toy.raymond@…> (03/06/11 18:30:15)
Message:

Add support for Jacobi elliptic functions

qd-elliptic.lisp:
o Implementation for Jacobi sn, cn, and dn functions.

qd-methods.lisp:
o Add EPSILON method to return the floating-point epsilon value for

the given float.

oct.asd:
o Build qd-elliptic.lisp.

Files:
1 added
2 modified

Legend:

Unmodified
Added
Removed
  • oct.asd

    r7310f8 r535d25  
    5959   (:file "qd-complex" 
    6060          :depends-on ("qd-methods")) 
     61   (:file "qd-elliptic" 
     62          :depends-on ("qd-methods")) 
    6163   )) 
    6264 
  • qd-methods.lisp

    r8ca031 r535d25  
    10901090;; %qd-real. 
    10911091(set-dispatch-macro-character #\# #\Q #'qd-class-reader) 
     1092 
     1093 
     1094(defmethod epsilon ((m cl:float)) 
     1095  (etypecase m 
     1096    (single-float single-float-epsilon) 
     1097    (double-float double-float-epsilon))) 
     1098 
     1099(defmethod epsilon ((m cl:complex)) 
     1100  (epsilon (realpart m))) 
     1101 
     1102(defmethod epsilon ((m qd-real)) 
     1103  ;; What is the epsilon value for a quad-double?  This is complicated 
     1104  ;; by the fact that things like (+ #q1 #q1q-100) is representable as 
     1105  ;; a quad-double.  For most purposes we want epsilon to be close to 
     1106  ;; the 212 bits of precision (4*53 bits) that we normally have with 
     1107  ;; a quad-double. 
     1108  (scale-float #q1 -212)) 
     1109 
     1110(defmethod epsilon ((m qd-complex)) 
     1111  (epsilon (realpart m)))