summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/prc/PRCdouble.h
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-06-08 13:46:05 +0000
committerKarl Berry <karl@freefriends.org>2010-06-08 13:46:05 +0000
commita960e44eb527236f39aec81babc0474911a86078 (patch)
tree9950eca71791d90820a80a521a7cc252c0955db5 /Build/source/utils/asymptote/prc/PRCdouble.h
parent6443467452320c296faa1f43f0606a9457bd4463 (diff)
asy 1.96
git-svn-id: svn://tug.org/texlive/trunk@18817 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/prc/PRCdouble.h')
-rw-r--r--Build/source/utils/asymptote/prc/PRCdouble.h29
1 files changed, 27 insertions, 2 deletions
diff --git a/Build/source/utils/asymptote/prc/PRCdouble.h b/Build/source/utils/asymptote/prc/PRCdouble.h
index c21d33e5dc9..ae4e8fedb8c 100644
--- a/Build/source/utils/asymptote/prc/PRCdouble.h
+++ b/Build/source/utils/asymptote/prc/PRCdouble.h
@@ -8,6 +8,17 @@
#include "config.h"
#endif
+#ifdef BYTE_ORDER
+# undef WORDS_BIG_ENDIAN
+# undef WORDS_LITTLE_ENDIAN
+# if BYTE_ORDER == BIG_ENDIAN
+# define WORDS_BIG_ENDIAN 1
+# endif
+# if BYTE_ORDER == LITTLE_ENDIAN
+# define WORDS_LITTLE_ENDIAN 1
+# endif
+#endif
+
// from Adobe's documentation
union ieee754_double
@@ -32,8 +43,22 @@ union ieee754_double
} ieee;
};
-
-
+union ieee754_float
+{
+ float f;
+ /* This is the IEEE 754 float-precision format. */
+ struct {
+#ifdef WORDS_BIGENDIAN
+ unsigned int negative:1;
+ unsigned int exponent:8;
+ unsigned int mantissa:23;
+#else
+ unsigned int mantissa:23;
+ unsigned int exponent:8;
+ unsigned int negative:1;
+#endif
+ } ieee;
+};
enum ValueType {VT_double,VT_exponent};