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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
pub mod diagamma {
use std::mem::zeroed;
use enums;
use ffi;
pub fn psi_int(n: i32) -> f64 {
unsafe { ffi::gsl_sf_psi_int(n) }
}
pub fn psi_int_e(n: i32) -> (enums::Value, ::types::Result) {
let mut result = unsafe { zeroed::<ffi::gsl_sf_result>() };
let ret = unsafe { ffi::gsl_sf_psi_int_e(n, &mut result) };
(ret, ::types::Result{val: result.val, err: result.err})
}
pub fn psi(x: f64) -> f64 {
unsafe { ffi::gsl_sf_psi(x) }
}
pub fn psi_e(x: f64) -> (enums::Value, ::types::Result) {
let mut result = unsafe { zeroed::<ffi::gsl_sf_result>() };
let ret = unsafe { ffi::gsl_sf_psi_e(x, &mut result) };
(ret, ::types::Result{val: result.val, err: result.err})
}
pub fn psi_1piy(x: f64) -> f64 {
unsafe { ffi::gsl_sf_psi_1piy(x) }
}
pub fn psi_1piy_e(x: f64) -> (enums::Value, ::types::Result) {
let mut result = unsafe { zeroed::<ffi::gsl_sf_result>() };
let ret = unsafe { ffi::gsl_sf_psi_1piy_e(x, &mut result) };
(ret, ::types::Result{val: result.val, err: result.err})
}
}
pub mod trigamma {
use std::mem::zeroed;
use enums;
use ffi;
pub fn psi_1_int(n: i32) -> f64 {
unsafe { ffi::gsl_sf_psi_1_int(n) }
}
pub fn psi_1_int_e(n: i32) -> (enums::Value, ::types::Result) {
let mut result = unsafe { zeroed::<ffi::gsl_sf_result>() };
let ret = unsafe { ffi::gsl_sf_psi_1_int_e(n, &mut result) };
(ret, ::types::Result{val: result.val, err: result.err})
}
pub fn psi_1(x: f64) -> f64 {
unsafe { ffi::gsl_sf_psi_1(x) }
}
pub fn psi_1_e(x: f64) -> (enums::Value, ::types::Result) {
let mut result = unsafe { zeroed::<ffi::gsl_sf_result>() };
let ret = unsafe { ffi::gsl_sf_psi_1_e(x, &mut result) };
(ret, ::types::Result{val: result.val, err: result.err})
}
}
pub mod polygamma {
use std::mem::zeroed;
use enums;
use ffi;
pub fn psi_n(n: i32, x: f64) -> f64 {
unsafe { ffi::gsl_sf_psi_n(n, x) }
}
pub fn psi_n_e(n: i32, x: f64) -> (enums::Value, ::types::Result) {
let mut result = unsafe { zeroed::<ffi::gsl_sf_result>() };
let ret = unsafe { ffi::gsl_sf_psi_n_e(n, x, &mut result) };
(ret, ::types::Result{val: result.val, err: result.err})
}
}