File: sf_psi.c

package info (click to toggle)
ruby-gsl 2.1.0.3%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,604 kB
  • sloc: ansic: 62,050; ruby: 15,845; sh: 19; makefile: 10
file content (89 lines) | stat: -rw-r--r-- 2,564 bytes parent folder | download | duplicates (5)
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
/*
  sf_psi.c
  Ruby/GSL: Ruby extension library for GSL (GNU Scientific Library)
    (C) Copyright 2001-2006 by Yoshiki Tsunesada

  Ruby/GSL is free software: you can redistribute it and/or modify it
  under the terms of the GNU General Public License.
  This library is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY.
*/

#include "include/rb_gsl_sf.h"

static VALUE rb_gsl_sf_psi_int(VALUE obj, VALUE n)
{
  return rb_gsl_sf_eval1_int(gsl_sf_psi_int, n);
}

static VALUE rb_gsl_sf_psi_int_e(VALUE obj, VALUE n)
{
  return rb_gsl_sf_eval_e_int(gsl_sf_psi_int_e, n);
}

static VALUE rb_gsl_sf_psi(VALUE obj, VALUE x)
{
  return rb_gsl_sf_eval1(gsl_sf_psi, x);
}

static VALUE rb_gsl_sf_psi_e(VALUE obj, VALUE x)
{
  return rb_gsl_sf_eval_e(gsl_sf_psi_e, x);
}

static VALUE rb_gsl_sf_psi_1(VALUE obj, VALUE x)
{
  return rb_gsl_sf_eval1(gsl_sf_psi_1, x);
}

static VALUE rb_gsl_sf_psi_1_e(VALUE obj, VALUE x)
{
  return rb_gsl_sf_eval_e(gsl_sf_psi_1_e, x);
}

static VALUE rb_gsl_sf_psi_1piy(VALUE obj, VALUE x)
{
  return rb_gsl_sf_eval1(gsl_sf_psi_1piy, x);
}

static VALUE rb_gsl_sf_psi_1piy_e(VALUE obj, VALUE x)
{
  return rb_gsl_sf_eval_e(gsl_sf_psi_1piy_e, x);
}

static VALUE rb_gsl_sf_psi_1_int(VALUE obj, VALUE n)
{
  return rb_gsl_sf_eval1_int(gsl_sf_psi_1_int, n);
}

static VALUE rb_gsl_sf_psi_1_int_e(VALUE obj, VALUE n)
{
  return rb_gsl_sf_eval_e_int(gsl_sf_psi_1_int_e, n);
}

static VALUE rb_gsl_sf_psi_n(VALUE obj, VALUE m, VALUE x)
{
  return rb_gsl_sf_eval_int_double(gsl_sf_psi_n, m, x);
}

static VALUE rb_gsl_sf_psi_n_e(VALUE obj, VALUE m, VALUE x)
{
  return rb_gsl_sf_eval_e_int_double(gsl_sf_psi_n_e, m, x);
}

void Init_gsl_sf_psi(VALUE module)
{
  rb_define_module_function(module, "psi_int",  rb_gsl_sf_psi_int, 1);
  rb_define_module_function(module, "psi_int_e",  rb_gsl_sf_psi_int_e, 1);
  rb_define_module_function(module, "psi_1piy",  rb_gsl_sf_psi_1piy, 1);
  rb_define_module_function(module, "psi_1piy_e",  rb_gsl_sf_psi_1piy_e, 1);
  rb_define_module_function(module, "psi_1_int",  rb_gsl_sf_psi_1_int, 1);
  rb_define_module_function(module, "psi_1_int_e",  rb_gsl_sf_psi_1_int_e, 1);
  rb_define_module_function(module, "psi_n",  rb_gsl_sf_psi_n, 2);
  rb_define_module_function(module, "psi_n_e",  rb_gsl_sf_psi_n_e, 2);

  rb_define_module_function(module, "psi",  rb_gsl_sf_psi, 1);
  rb_define_module_function(module, "psi_e",  rb_gsl_sf_psi_e, 1);
  rb_define_module_function(module, "psi_1",  rb_gsl_sf_psi_1, 1);
  rb_define_module_function(module, "psi_1_e",  rb_gsl_sf_psi_1_e, 1);
}