-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathbessely.coffee
More file actions
66 lines (50 loc) · 783 Bytes
/
bessely.coffee
File metadata and controls
66 lines (50 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
### bessely =====================================================================
Tags
----
scripting, JS, internal, treenode, general concept
Parameters
----------
x,n
General description
-------------------
Bessel function of second kind.
###
Eval_bessely = ->
push(cadr(p1))
Eval()
push(caddr(p1))
Eval()
bessely()
bessely = ->
save()
yybessely()
restore()
#define X p1
#define N p2
yybessely = ->
d = 0.0
n = 0
p2 = pop()
p1 = pop()
push(p2)
n = pop_integer()
if (isdouble(p1) && !isNaN(n))
d = yn(n, p1.d)
push_double(d)
return
if (isnegativeterm(p2))
push_integer(-1)
push(p2)
power()
push_symbol(BESSELY)
push(p1)
push(p2)
negate()
list(3)
multiply()
return
push_symbol(BESSELY)
push(p1)
push(p2)
list(3)
return