Implement journaling. Bug #17240.
[pspp-builds.git] / src / libpspp / float-format.c
index 7d65375ada731657a8ea50c221d843f8dacdb21e..79ba94469fc9fa085f2318d5f48d596f9c6b752f 100644 (file)
@@ -106,6 +106,16 @@ float_convert (enum float_format from, const void *src,
     }
 }
 
+/* Converts SRC from format FROM to a native double and returns
+   the double. */
+double
+float_get_double (enum float_format from, const void *src)
+{
+  double dst;
+  float_convert (from, src, FLOAT_NATIVE_DOUBLE, &dst);
+  return dst;
+}
+
 /* Returns the number of bytes in a number in the given
    FORMAT. */
 size_t