summaryrefslogtreecommitdiff
path: root/sysdeps/m68k/fpu/k_tan.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/m68k/fpu/k_tan.c')
-rw-r--r--sysdeps/m68k/fpu/k_tan.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/sysdeps/m68k/fpu/k_tan.c b/sysdeps/m68k/fpu/k_tan.c
index b18c9afbd8..c8fa9b780e 100644
--- a/sysdeps/m68k/fpu/k_tan.c
+++ b/sysdeps/m68k/fpu/k_tan.c
@@ -19,11 +19,21 @@ Cambridge, MA 02139, USA. */
#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);
}