ReactOS  0.4.14-dev-114-gc8cbd56
jn_yn.c
Go to the documentation of this file.
1 #include <math.h>
2 #include <float.h>
3 #include "ieee754/ieee754.h"
4 
5 typedef int fpclass_t;
6 fpclass_t _fpclass(double __d);
7 int *_errno(void);
8 
9 /*
10  * @unimplemented
11  */
12 double _jn(int n, double num)
13 {
14  /* FIXME: errno handling */
15  return __ieee754_jn(n, num);
16 }
17 
18 /*
19  * @implemented
20  */
21 double _yn(int order, double num)
22 {
23  double retval;
24  if (!_finite(num)) *_errno() = EDOM;
25  retval = __ieee754_yn(order,num);
26  if (_fpclass(retval) == _FPCLASS_NINF)
27  {
28  *_errno() = EDOM;
29  retval = sqrt(-1);
30  }
31  return retval;
32 }
double _yn(int order, double num)
Definition: jn_yn.c:21
_STLP_DECLSPEC complex< float > _STLP_CALL sqrt(const complex< float > &)
Definition: complex.cpp:188
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194
GLdouble n
Definition: glext.h:7729
double _jn(int n, double num)
Definition: jn_yn.c:12
double __ieee754_yn(int n, double x)
Definition: jn_yn.c:227
#define EDOM
Definition: errno.h:39
_Check_return_ __MINGW_NOTHROW _CRTIMP int __cdecl _finite(_In_ double)
GLuint GLuint num
Definition: glext.h:9618
fpclass_t _fpclass(double __d)
Definition: fpclass.c:17
#define _FPCLASS_NINF
Definition: float.h:70
double __ieee754_jn(int n, double x)
Definition: jn_yn.c:64
int * _errno(void)
Definition: errno.c:19
int fpclass_t
Definition: jn_yn.c:5