ReactOS  0.4.14-dev-98-gb0d4763
j1_y1.c
Go to the documentation of this file.
1 #include <math.h>
2 #include <float.h>
3 #include "ieee754/ieee754.h"
4 
5 int *_errno(void);
6 
7 /*
8  * @unimplemented
9  */
10 double _j1(double num)
11 {
12  if (!_finite(num)) *_errno() = EDOM;
13  return __ieee754_j1(num);
14 }
15 
16 /*
17  * @implemented
18  */
19 double _y1(double num)
20 {
21  double retval;
22  int fpclass = _fpclass(num);
23 
24  if (!_finite(num) || fpclass == _FPCLASS_NN ||
25  fpclass == _FPCLASS_ND || fpclass == _FPCLASS_NZ)
26  *_errno() = EDOM;
27 
28  retval = __ieee754_y1(num);
29  if (_fpclass(retval) == _FPCLASS_NINF)
30  {
31  *_errno() = EDOM;
32  retval = sqrt(-1);
33  }
34  return retval;
35 }
_STLP_DECLSPEC complex< float > _STLP_CALL sqrt(const complex< float > &)
Definition: complex.cpp:188
#define _FPCLASS_NZ
Definition: float.h:73
#define _FPCLASS_NN
Definition: float.h:71
double __ieee754_y1(double x)
Definition: j1_y1.c:182
#define EDOM
Definition: errno.h:39
double __ieee754_j1(double x)
Definition: j1_y1.c:103
_Check_return_ __MINGW_NOTHROW _CRTIMP int __cdecl _finite(_In_ double)
GLuint GLuint num
Definition: glext.h:9618
#define _FPCLASS_ND
Definition: float.h:72
int * _errno(void)
Definition: errno.c:19
#define _FPCLASS_NINF
Definition: float.h:70
double _y1(double num)
Definition: j1_y1.c:19
double _j1(double num)
Definition: j1_y1.c:10
_Check_return_ __MINGW_NOTHROW _CRTIMP int __cdecl _fpclass(_In_ double)