UNPKG

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