summaryrefslogtreecommitdiffstats
path: root/gcc/real.c
diff options
context:
space:
mode:
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1993-10-11 22:30:48 +0000
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>1993-10-11 22:30:48 +0000
commit4d7e846940533e3c660d7df561f978aad9257459 (patch)
tree280fe37adfd0a8749585d574dfe23658d33609fb /gcc/real.c
parenta433411e437606f6f1d8a4c4955f2b4884f4912e (diff)
downloadppe42-gcc-4d7e846940533e3c660d7df561f978aad9257459.tar.gz
ppe42-gcc-4d7e846940533e3c660d7df561f978aad9257459.zip
(debug_real): New function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5742 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/real.c')
-rw-r--r--gcc/real.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/gcc/real.c b/gcc/real.c
index 5fa8ca9781e..3b1f1653a58 100644
--- a/gcc/real.c
+++ b/gcc/real.c
@@ -57,7 +57,7 @@ _Methods and Programs for Mathematical Functions_, Prentice-Hall
or Simon & Schuster Int'l, 1989. A library of XFmode elementary
transcendental functions can be obtained by ftp from
research.att.com: netlib/cephes/ldouble.shar.Z */
-
+
/* Type of computer arithmetic.
* Only one of DEC, IBM, MIEEE, IBMPC, or UNK should get defined.
*/
@@ -166,7 +166,7 @@ unknown arithmetic type
#define INFINITY
#endif
#endif
-
+
/* Find a host integer type that is at least 16 bits wide,
and another type at least twice whatever that size is. */
@@ -325,7 +325,7 @@ void mtherr (), make_nan ();
void enan ();
extern unsigned EMUSHORT ezero[], ehalf[], eone[], etwo[];
extern unsigned EMUSHORT elog2[], esqrt2[];
-
+
/* Pack output array with 32-bit numbers obtained from
array containing 16-bit numbers, swapping ends if required. */
void
@@ -883,6 +883,20 @@ real_value_truncate (mode, arg)
#endif /* REAL_ARITHMETIC defined */
+/* Used for debugging--print the value of R in human-readable format
+ on stderr. */
+
+void
+debug_real (r)
+ REAL_VALUE_TYPE r;
+{
+ char dstr[30];
+
+ REAL_VALUE_TO_DECIMAL (r, "%.20g", dstr);
+ fprintf (stderr, "%s", dstr);
+}
+
+
/* Target values are arrays of host longs. A long is guaranteed
to be at least 32 bits wide. */
@@ -970,7 +984,7 @@ ereal_isneg (x)
}
/* End of REAL_ARITHMETIC interface */
-
+
/* ieee.c
*
* Extended precision IEEE binary floating point arithmetic routines
OpenPOWER on IntegriCloud