+\f
+static inline uint64_t
+double_to_ieee64le (double x)
+{
+ uint64_t y;
+
+#if FLOAT_NATIVE_DOUBLE == FLOAT_IEEE_DOUBLE_LE
+ memcpy (&y, &x, sizeof y);
+#elif FLOAT_NATIVE_DOUBLE == FLOAT_IEEE_DOUBLE_BE
+ memcpy (&y, &x, sizeof y);
+ y = bswap_64 (y);
+#else
+ float_convert (&x, FLOAT_NATIVE_DOUBLE, &y, FLOAT_IEEE_DOUBLE_LE);
+#endif
+
+ return y;
+}
+
+static inline double
+ieee64le_to_double (uint64_t x)
+{
+ double y;
+
+#if FLOAT_NATIVE_DOUBLE == FLOAT_IEEE_DOUBLE_LE
+ memcpy (&y, &x, sizeof y);
+#elif FLOAT_NATIVE_DOUBLE == FLOAT_IEEE_DOUBLE_BE
+ x = bswap_64 (x);
+ memcpy (&y, &x, sizeof y);
+#else
+ float_convert (&x, FLOAT_IEEE_DOUBLE_LE, &y, FLOAT_NATIVE_DOUBLE);
+#endif
+
+ return y;
+}