Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oct
oct
Commits
235ac2e4
Commit
235ac2e4
authored
Apr 12, 2012
by
Raymond Toy
Browse files
Fix for complex args.
parent
0823acf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
qd-bessel.lisp
View file @
235ac2e4
...
...
@@ -183,18 +183,18 @@
(
defun
integer-bessel-j-exp-arc
(
v
z
)
(
let*
((
iz
(
*
#c
(
0
1
)
z
))
(
i+
(
exp-arc-i-2
iz
v
)))
(
cond
((
=
v
(
ftruncate
v
))
(
cond
(
(
and
(
=
v
(
ftruncate
v
))
(
realp
z
))
;; We can simplify the result
(
let
((
c
(
cis
(
*
v
(
float-pi
i+
)
-1/2
))))
(
let
((
c
(
exp
(
*
v
(
float-pi
i+
)
#c
(
0
-1/2
))))
)
(
/
(
+
(
*
c
i+
)
(
*
(
conjugate
c
)
(
conjugate
i+
)))
(
float-pi
i+
)
2
)))
(
t
(
let
((
i-
(
exp-arc-i-2
(
-
iz
)
v
)))
(
/
(
+
(
*
(
cis
(
*
v
(
float-pi
i+
)
-1/2
))
(
/
(
+
(
*
(
exp
(
*
v
(
float-pi
i+
)
#c
(
0
-1/2
))
)
i+
)
(
*
(
cis
(
*
v
(
float-pi
i+
)
1/2
))
(
*
(
exp
(
*
v
(
float-pi
i+
)
#c
(
0
1/2
))
)
i-
))
(
float-pi
i+
)
2
))))))
...
...
@@ -394,19 +394,21 @@
;; Clear the caches for now.
(
an-clrhash
)
(
%big-a-clrhash
)
(
cond
((
=
vv
v
)
;; v is an integer
(
cond
(
(
and
(
=
vv
v
)
(
realp
z
))
;; v is an integer
and z is real
(
integer-bessel-j-exp-arc
v
z
))
(
t
;; Need to fine-tune the value of big-n.
(
let
((
big-n
100
)
(
vpi
(
*
v
(
float-pi
(
realpart
z
)))))
(
+
(
integer-bessel-j-exp-arc
v
z
)
(
*
z
(
/
(
sin
vpi
)
vpi
)
(
+
(
/
-1
z
)
(
sum-ab
big-n
v
z
)
(
sum-big-ia
big-n
v
z
)))))))))
(
if
(
=
vv
v
)
0
(
*
z
(
/
(
sin
vpi
)
vpi
)
(
+
(
/
-1
z
)
(
sum-ab
big-n
v
z
)
(
sum-big-ia
big-n
v
z
))))))))))
;; Bessel Y
;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment