#ifndef FUNC
#define FUNC __ieee754_acos
#endif
+#ifndef float_type
+#define float_type double
+#endif
-double
-DEFUN(FUNC, (x), double x)
+float_type
+DEFUN(FUNC, (x), float_type x)
{
return __m81_u(FUNC)(x);
}
#ifndef FUNC
#define FUNC __ieee754_fmod
#endif
+#ifndef float_type
+#define float_type double
+#endif
-double
-DEFUN(FUNC, (x, y), double x AND double y)
+float_type
+DEFUN(FUNC, (x, y), float_type x AND float_type y)
{
return __m81_u(FUNC)(x, y);
}
#include <ansidecl.h>
#include <math.h>
-double
-DEFUN(__kernel_cos, (x, y), double x AND double y)
+#ifndef FUNC
+#define FUNC cos
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+DEFUN(__CONCATX(__kernel_,FUNC), (x, y), float_type x AND float_type y)
{
- return __cos (x + y);
+ return __CONCATX(__,FUNC) (x + y);
}
#include <ansidecl.h>
#include <math.h>
-double
-DEFUN(__kernel_sin, (x, y, iy), double x AND double y AND int iy)
+#ifndef FUNC
+#define FUNC sin
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+DEFUN(__CONCATX(__kernel_,FUNC), (x, y, iy),
+ float_type x AND float_type y AND int iy)
{
- return __sin (x + y);
+ return __CONCATX(__,FUNC) (x + y);
}
#include <ansidecl.h>
#include <math.h>
-double
-DEFUN(__kernel_tan, (x, y, iy), double x AND double y AND int iy)
+#ifndef FUNC
+#define FUNC tan
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+DEFUN(__CONCATX(__kernel_,FUNC), (x, y, iy),
+ float_type x AND float_type y AND int iy)
{
if (iy == 1)
- return __tan (x + y);
+ return __CONCATX(__,FUNC) (x + y);
else
- return -1.0 / __tan (x + y);
+ return ((float_type) -1.0) / __CONCATX(__,FUNC) (x + y);
}
#ifndef FUNC
#define FUNC atan
#endif
+#ifndef float_type
+#define float_type double
+#endif
#define __CONCATX(a,b) __CONCAT(a,b)
-double
-DEFUN(__CONCATX(__,FUNC), (x), double x)
+float_type
+DEFUN(__CONCATX(__,FUNC), (x), float_type x)
{
return __m81_u(__CONCATX(__,FUNC))(x);
}
#include <ansidecl.h>
#include <math.h>
-double
-DEFUN(__frexp, (value, expptr), double value AND int *expptr)
+#ifndef FUNC
+#define FUNC frexp
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+DEFUN(__CONCATX(__,FUNC), (value, expptr), float_type value AND int *expptr)
{
- return __m81_u(__frexp)(value, expptr);
+ return __m81_u(__CONCATX(__,FUNC))(value, expptr);
}
-weak_alias (__frexp, frexp)
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (__CONCATX(__,FUNC), FUNC)
#include <ansidecl.h>
#include <math.h>
+#ifndef FUNC
+#define FUNC ilogb
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
int
-DEFUN(__ilogb, (x), double x)
+DEFUN(__CONCATX(__,FUNC), (x), float_type x)
{
- return __m81_u(__ilogb)(x);
+ return __m81_u(__CONCATX(__,FUNC))(x);
}
-weak_alias (__ilogb, ilogb)
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx (__CONCATX(__,FUNC), FUNC)
#ifndef FUNC
#define FUNC isinf
#endif
+#ifndef float_type
+#define float_type double
+#endif
#define __CONCATX(a,b) __CONCAT(a,b)
int
-DEFUN(__CONCATX(__,FUNC), (x), double x)
+DEFUN(__CONCATX(__,FUNC), (x), float_type x)
{
return __m81_u(__CONCATX(__,FUNC))(x);
}
#ifndef FUNC
#define FUNC ldexp
#endif
+#ifndef float_type
+#define float_type double
+#endif
#define __CONCATX(a,b) __CONCAT(a,b)
-double
-DEFUN(__CONCATX(__,FUNC), (x, exp), double x AND int exp)
+float_type
+DEFUN(__CONCATX(__,FUNC), (x, exp), float_type x AND int exp)
{
return __m81_u(__CONCATX(__,FUNC))(x, exp);
}
#include <ansidecl.h>
#include <math.h>
-double
-DEFUN(__modf, (x, exp), double x AND double *iptr)
+#ifndef FUNC
+#define FUNC modf
+#endif
+#ifndef float_type
+#define float_type double
+#endif
+
+#define __CONCATX(a,b) __CONCAT(a,b)
+
+float_type
+DEFUN(__CONCATX(__,FUNC), (x, iptr), float_type x AND float_type *iptr)
{
- return __m81_u(__modf)(x, iptr);
+ return __m81_u(__CONCATX(__,FUNC))(x, iptr);
}
-weak_alias(__modf, modf)
+#define weak_aliasx(a,b) weak_alias(a,b)
+weak_aliasx(__CONCATX(__,FUNC), FUNC)