summaryrefslogtreecommitdiff
path: root/rnd_mode.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>1999-07-06 14:48:33 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>1999-07-06 14:48:33 +0000
commitb4d6ed4065d5d2883557f3df462aad35630d1b4c (patch)
tree42d1ce5217a88ea356ebc01459183717348c7eed /rnd_mode.c
parent02d22b99ca2058a6d234700f23cc5dd0d6eb8733 (diff)
downloadmpfr-b4d6ed4065d5d2883557f3df462aad35630d1b4c.tar.gz
merged machine rounding instructions for Sun and HP
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@329 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'rnd_mode.c')
-rw-r--r--rnd_mode.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/rnd_mode.c b/rnd_mode.c
index 11361566c..b4c59d9a0 100644
--- a/rnd_mode.c
+++ b/rnd_mode.c
@@ -13,8 +13,12 @@ extern int swapRM();
#define TOINFP swapRM(ROUND_TO_PLUS_INFINITY)
#define TONEAREST swapRM(ROUND_TO_NEAREST)
#define TOINFM swapRM(ROUND_TO_MINUS_INFINITY)
-#elif (defined (solaris) || defined (sun4))
+#elif (defined (solaris) || defined (sun4) || defined(hpux))
+#ifdef hpux
+#include <math.h>
+#else
#include <ieeefp.h>
+#endif
#define TOZERO fpsetround(FP_RZ)
#define TOINFP fpsetround(FP_RP)
#define TONEAREST fpsetround(FP_RN)
@@ -45,11 +49,6 @@ char *out;
#define TOINFP ieee_flags("set","direction","positive",&out)
#define TONEAREST ieee_flags("set","direction","nearest",&out)
#define TOINFM ieee_flags("set","direction","negative",&out)
-#elif hp700
-#define TOZERO fpsetround(FP_RZ)
-#define TOINFP fpsetround(FP_RP)
-#define TONEAREST fpsetround(FP_RN)
-#define TOINFM fpsetround(FP_RM)
#elif (defined (__i386__) || defined (__i486__) || defined (linux))
#include <fpu_control.h>
#ifdef LIBC211