]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
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 34dfc82cff1db47ea61a415e3613482582bc6777..ae77dabf9835c4fd4b93b537394702ec98ffb2b9 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 578fa3ce535161ccae822c7065775e1e785e007c..0b2468c06d805911bda1fb8f4e2af0da714c61a5 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 1f508b4f4057899942d924cf3925708d5c1f4456..28406e8cbafc613ad3bf981a625f2d25bb857a84 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 10cfbb4400ce4d396c47b6babeacd077b6ca4091..8c6dfef7209e5de25c3c36ea2bca30e8b20151ae 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 b18c9afbd8269eb0ab04fc8a61e802963e6b0f75..c8fa9b780e4aefc834b2ecc55cbbc0c44d10348d 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 51916e12ffd9d2f8afb2f558f025f85642930099..29717d43950e2dff99f54f922a2e94ff908253a9 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 45c054016d363c14f7ccc297ee31ecf39fabc52c..16f30394b23038aa09a23717660fd574056bf24e 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 4119df968ae279ae8d0b184a4c547de07f532de2..c80a28894957fce5640ca061ba083fed15776b17 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 eec07c7d3a5e192d37d3ff89e5e8fae1289c062c..570a7ba7bb064c0a1ac1a83165e12c6e84192801 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 67513d4875efc2b35169a0c20e83965d0b208c0d..ea8bfbab88ecf4b9a2750f4c0c335daa8df895c3 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 ce70be8168bb2171212dd16b586bf498a51b6dec..f704260e216f9626307494651622d3fa196c719a 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)