summaryrefslogtreecommitdiffstats
path: root/libjava/java/lang
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-24 17:43:25 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-24 17:43:25 +0000
commitc206f4b75bed94dbfd379399aa2267f773e886f3 (patch)
tree045dafa62902d8f450a9b2e98a251457c1fe0264 /libjava/java/lang
parentc6de66d145220b92ddc72e670f359d97b14b7246 (diff)
downloadppe42-gcc-c206f4b75bed94dbfd379399aa2267f773e886f3.tar.gz
ppe42-gcc-c206f4b75bed94dbfd379399aa2267f773e886f3.zip
* Makefile.in: Rebuilt.
* Makefile.am (c_source_files): Added sf_fabs.c. * java/lang/sf_fabs.c: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39238 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/lang')
-rw-r--r--libjava/java/lang/sf_fabs.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/libjava/java/lang/sf_fabs.c b/libjava/java/lang/sf_fabs.c
new file mode 100644
index 00000000000..2aaed326ab9
--- /dev/null
+++ b/libjava/java/lang/sf_fabs.c
@@ -0,0 +1,47 @@
+/* sf_fabs.c -- float version of s_fabs.c.
+ * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
+ */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * fabsf(x) returns the absolute value of x.
+ */
+
+#include "fdlibm.h"
+
+#ifdef __STDC__
+ float fabsf(float x)
+#else
+ float fabsf(x)
+ float x;
+#endif
+{
+ __uint32_t ix;
+ GET_FLOAT_WORD(ix,x);
+ SET_FLOAT_WORD(x,ix&0x7fffffff);
+ return x;
+}
+
+#ifdef _DOUBLE_IS_32BITS
+
+#ifdef __STDC__
+ double fabs(double x)
+#else
+ double fabs(x)
+ double x;
+#endif
+{
+ return (double) fabsf((float) x);
+}
+
+#endif /* defined(_DOUBLE_IS_32BITS) */
OpenPOWER on IntegriCloud