2007-03-14 20:24:57 +00:00
|
|
|
#include <math.h>
|
2011-07-23 18:03:11 +00:00
|
|
|
#include <float.h>
|
|
|
|
#include "ieee754/ieee754.h"
|
2007-03-14 20:24:57 +00:00
|
|
|
|
2009-05-03 14:57:56 +00:00
|
|
|
int *_errno(void);
|
2007-03-14 20:24:57 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2009-05-03 14:57:56 +00:00
|
|
|
double _j1(double num)
|
2007-03-14 20:24:57 +00:00
|
|
|
{
|
2011-11-30 22:04:54 +00:00
|
|
|
if (!_finite(num)) *_errno() = EDOM;
|
2011-07-23 18:03:11 +00:00
|
|
|
return __ieee754_j1(num);
|
2007-03-14 20:24:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2009-05-03 14:57:56 +00:00
|
|
|
* @implemented
|
2007-03-14 20:24:57 +00:00
|
|
|
*/
|
2009-05-03 14:57:56 +00:00
|
|
|
double _y1(double num)
|
2007-03-14 20:24:57 +00:00
|
|
|
{
|
2009-05-03 14:57:56 +00:00
|
|
|
double retval;
|
2011-11-30 22:04:54 +00:00
|
|
|
int fpclass = _fpclass(num);
|
|
|
|
|
|
|
|
if (!_finite(num) || fpclass == _FPCLASS_NN ||
|
|
|
|
fpclass == _FPCLASS_ND || fpclass == _FPCLASS_NZ)
|
|
|
|
*_errno() = EDOM;
|
|
|
|
|
2011-07-23 18:03:11 +00:00
|
|
|
retval = __ieee754_y1(num);
|
2009-05-03 14:57:56 +00:00
|
|
|
if (_fpclass(retval) == _FPCLASS_NINF)
|
|
|
|
{
|
|
|
|
*_errno() = EDOM;
|
|
|
|
retval = sqrt(-1);
|
|
|
|
}
|
|
|
|
return retval;
|
2007-03-14 20:24:57 +00:00
|
|
|
}
|