1 | ### bessely =====================================================================
|
2 |
|
3 | Tags
|
4 | ----
|
5 | scripting, JS, internal, treenode, general concept
|
6 |
|
7 | Parameters
|
8 | ----------
|
9 | x,n
|
10 |
|
11 | General description
|
12 | -------------------
|
13 |
|
14 | Bessel function of second kind.
|
15 |
|
16 | ###
|
17 |
|
18 |
|
19 | Eval_bessely = ->
|
20 | push(cadr(p1))
|
21 | Eval()
|
22 | push(caddr(p1))
|
23 | Eval()
|
24 | bessely()
|
25 |
|
26 | bessely = ->
|
27 | save()
|
28 | yybessely()
|
29 | restore()
|
30 |
|
31 | #define X p1
|
32 | #define N p2
|
33 |
|
34 | yybessely = ->
|
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 |
|