Changeset 535d2509c2974c113e6c1bfa27ece5d5b8f99bd1
- Timestamp:
- 03/06/11 18:30:15 (2 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r7310f8
|
r535d25
|
|
| 59 | 59 | (:file "qd-complex" |
| 60 | 60 | :depends-on ("qd-methods")) |
| | 61 | (:file "qd-elliptic" |
| | 62 | :depends-on ("qd-methods")) |
| 61 | 63 | )) |
| 62 | 64 | |
-
|
r8ca031
|
r535d25
|
|
| 1090 | 1090 | ;; %qd-real. |
| 1091 | 1091 | (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))) |