Tue Jun 4 22:03:02 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
authorRoland McGrath <roland@gnu.org>
Thu, 6 Jun 1996 05:22:44 +0000 (05:22 +0000)
committerRoland McGrath <roland@gnu.org>
Thu, 6 Jun 1996 05:22:44 +0000 (05:22 +0000)
* sysdeps/m68k/fpu/e_acos.c, sysdeps/m68k/fpu/e_fmod.c,
  sysdeps/m68k/fpu/k_cos.c, sysdeps/m68k/fpu/k_sin.c,
  sysdeps/m68k/fpu/k_tan.c, sysdeps/m68k/fpu/s_atan.c,
  sysdeps/m68k/fpu/s_frexp.c, sysdeps/m68k/fpu/s_ilogb.c,
  sysdeps/m68k/fpu/s_isinf.c, sysdeps/m68k/fpu/s_ldexp.c,
  sysdeps/m68k/fpu/s_modf.c: Define generic functions using FUNC and
  float_type with appropriate defaults.

sysdeps/m68k/fpu/e_acos.c
sysdeps/m68k/fpu/e_fmod.c
sysdeps/m68k/fpu/k_cos.c
sysdeps/m68k/fpu/k_sin.c
sysdeps/m68k/fpu/k_tan.c
sysdeps/m68k/fpu/s_atan.c
sysdeps/m68k/fpu/s_frexp.c
sysdeps/m68k/fpu/s_ilogb.c
sysdeps/m68k/fpu/s_isinf.c
sysdeps/m68k/fpu/s_ldexp.c
sysdeps/m68k/fpu/s_modf.c

index 34dfc82..ae77dab 100644 (file)
@@ -22,9 +22,12 @@ Cambridge, MA 02139, USA.  */
 #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);
 }
index 578fa3c..0b2468c 100644 (file)
@@ -22,9 +22,12 @@ Cambridge, MA 02139, USA.  */
 #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);
 }
index 1f508b4..28406e8 100644 (file)
@@ -19,8 +19,17 @@ Cambridge, MA 02139, USA.  */
 #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);
 }
index 10cfbb4..8c6dfef 100644 (file)
@@ -19,8 +19,18 @@ Cambridge, MA 02139, USA.  */
 #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);
 }
index b18c9af..c8fa9b7 100644 (file)
@@ -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);
 }
index 51916e1..29717d4 100644 (file)
@@ -22,11 +22,14 @@ Cambridge, MA 02139, USA.  */
 #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);
 }
index 45c0540..16f3039 100644 (file)
@@ -19,9 +19,19 @@ Cambridge, MA 02139, USA.  */
 #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)
index 4119df9..c80a288 100644 (file)
@@ -19,10 +19,20 @@ Cambridge, MA 02139, USA.  */
 #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)
index eec07c7..570a7ba 100644 (file)
@@ -22,11 +22,14 @@ Cambridge, MA 02139, USA.  */
 #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);
 }
index 67513d4..ea8bfba 100644 (file)
@@ -22,11 +22,14 @@ Cambridge, MA 02139, USA.  */
 #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);
 }
index ce70be8..f704260 100644 (file)
@@ -19,9 +19,19 @@ Cambridge, MA 02139, USA.  */
 #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)