summaryrefslogtreecommitdiff
path: root/libmath/dtoa.c
diff options
context:
space:
mode:
authorforsyth <forsyth@vitanuova.com>2012-03-05 20:04:49 +0000
committerforsyth <forsyth@vitanuova.com>2012-03-05 20:04:49 +0000
commit68c71d4caea0ad74b14fc837a1b3b595fcfdc1d7 (patch)
tree0a479d64fedfb11b609e897d66cf33dc0de0b695 /libmath/dtoa.c
parentad4c862fd80d3ad38a6464a9ea169a78354a77fc (diff)
20120305-2004
Diffstat (limited to 'libmath/dtoa.c')
-rw-r--r--libmath/dtoa.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libmath/dtoa.c b/libmath/dtoa.c
index 0a73ef5a..95cf2738 100644
--- a/libmath/dtoa.c
+++ b/libmath/dtoa.c
@@ -26,13 +26,18 @@
#define Sign_Extend(a,b) if (b < 0) a |= 0xffff0000;
+#ifdef USE_FPdbleword
+#define word0(x) ((unsigned long *)&x)->hi
+#define word1(x) ((unsigned long *)&x)->lo
+#else
#ifdef __LITTLE_ENDIAN
-#define word0(x) ((unsigned long *)&x)[1]
-#define word1(x) ((unsigned long *)&x)[0]
+#define word0(x) ((FPdbleword*)&x)[1]
+#define word1(x) ((FPdbleword*)&x)[0]
#else
#define word0(x) ((unsigned long *)&x)[0]
#define word1(x) ((unsigned long *)&x)[1]
#endif
+#endif
/* #define P DBL_MANT_DIG */
/* Ten_pmax = floor(P*log(2)/log(5)) */