ReactOS 0.4.15-dev-5669-g09dde2c
j0_y0.c
Go to the documentation of this file.
1#include <math.h>
2#include <float.h>
3#include "ieee754/ieee754.h"
4
5int *_errno(void);
6
7/*
8 * @unimplemented
9 */
10double _j0(double num)
11{
12 if (!_finite(num)) *_errno() = EDOM;
13 return __ieee754_j0(num);
14}
15
16/*
17 * @implemented
18 */
19double _y0(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_y0(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 EDOM
Definition: errno.h:39
GLuint GLuint num
Definition: glext.h:9618
double __ieee754_y0(double x)
Definition: j0_y0.c:179
double __ieee754_j0(double x)
Definition: j0_y0.c:102
_Check_return_ __MINGW_NOTHROW _CRTIMP int __cdecl _fpclass(_In_ double)
#define _FPCLASS_ND
Definition: float.h:76
#define _FPCLASS_NINF
Definition: float.h:74
#define _FPCLASS_NN
Definition: float.h:75
_Check_return_ __MINGW_NOTHROW _CRTIMP int __cdecl _finite(_In_ double)
#define _FPCLASS_NZ
Definition: float.h:77
int * _errno(void)
Definition: errno.c:19
double _j0(double num)
Definition: j0_y0.c:10
double _y0(double num)
Definition: j0_y0.c:19