yv.c
Go to the documentation of this file.
1 /*
2  * Cephes Math Library Release 2.8: June, 2000
3  * Copyright 1984, 1987, 2000 by Stephen L. Moshier
4  */
5 
6 #include "mconf.h"
7 
8 extern double MACHEP;
9 
10 
11 /*
12  * Bessel function of noninteger order
13  */
14 double yv(double v, double x)
15 {
16  double y, t;
17  int n;
18 
19  n = v;
20  if (n == v) {
21  y = yn(n, x);
22  return (y);
23  }
24  else if (v == floor(v)) {
25  /* Zero in denominator. */
27  return NAN;
28  }
29 
30  t = M_PI * v;
31  y = (cos(t) * jv(v, x) - jv(-v, x)) / sin(t);
32 
33  if (cephes_isinf(y)) {
34  if (v > 0) {
36  return -INFINITY;
37  }
38  else if (v < -1e10) {
39  /* Whether it's +inf or -inf is numerically ill-defined. */
41  return NAN;
42  }
43  }
44 
45  return (y);
46 }
ceres::sin
Jet< T, N > sin(const Jet< T, N > &f)
Definition: jet.h:439
x
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Definition: gnuplot_common_settings.hh:12
SF_ERROR_OVERFLOW
@ SF_ERROR_OVERFLOW
Definition: sf_error.h:12
cephes_isinf
#define cephes_isinf(x)
Definition: mconf.h:100
ceres::cos
Jet< T, N > cos(const Jet< T, N > &f)
Definition: jet.h:426
jv
double jv(double n, double x)
Definition: jv.c:69
n
int n
Definition: BiCGSTAB_simple.cpp:1
yv
double yv(double v, double x)
Definition: yv.c:14
MACHEP
double MACHEP
Definition: const.c:54
yn
double yn(int n, double x)
Definition: yn.c:57
y
Scalar * y
Definition: level1_cplx_impl.h:124
mconf.h
sf_error
void sf_error(const char *func_name, sf_error_t code, const char *fmt,...)
Definition: sf_error.c:41
v
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
NULL
#define NULL
Definition: ccolamd.c:609
M_PI
#define M_PI
Definition: mconf.h:117
align_3::t
Point2 t(10, 10)
SF_ERROR_DOMAIN
@ SF_ERROR_DOMAIN
Definition: sf_error.h:16
floor
const EIGEN_DEVICE_FUNC FloorReturnType floor() const
Definition: ArrayCwiseUnaryOps.h:481


gtsam
Author(s):
autogenerated on Thu Jun 13 2024 03:11:35