Changeset 535d25


Ignore:
Timestamp:
03/07/11 02:30:15 (4 years ago)
Author:
Raymond Toy <toy.raymond@…>
Branches:
master, cvs-ids
Children:
c014c5
Parents:
258cd8
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 edited

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  
    10951095;; %qd-real.
    10961096(set-dispatch-macro-character #\# #\Q #'qd-class-reader)
     1097
     1098
     1099(defmethod epsilon ((m cl:float))
     1100  (etypecase m
     1101    (single-float single-float-epsilon)
     1102    (double-float double-float-epsilon)))
     1103
     1104(defmethod epsilon ((m cl:complex))
     1105  (epsilon (realpart m)))
     1106
     1107(defmethod epsilon ((m qd-real))
     1108  ;; What is the epsilon value for a quad-double?  This is complicated
     1109  ;; by the fact that things like (+ #q1 #q1q-100) is representable as
     1110  ;; a quad-double.  For most purposes we want epsilon to be close to
     1111  ;; the 212 bits of precision (4*53 bits) that we normally have with
     1112  ;; a quad-double.
     1113  (scale-float #q1 -212))
     1114
     1115(defmethod epsilon ((m qd-complex))
     1116  (epsilon (realpart m)))
Note: See TracChangeset for help on using the changeset viewer.