HDFql Reference Manual v2.6.0

6.1.20VARFLOAT

The HDFql VARFLOAT data type stores values between -3.4E+38 and 3.4E+38 and occupies 4 bytes in memory (per element). It represents the data type of an HDF5 (variable-length) H5T_NATIVE_FLOAT dataset/attribute or of a result set that stores variable-length elements of this type (which can be retrieved using the HDFQL_CURSOR_GET_FLOAT and HDFQL_SUBCURSOR_GET_FLOAT functions when working with cursors). Depending on the programming language supported by HDFql, the VARFLOAT data type is represented by:

  • In C, the “float” data type.
  • In C++, the “float” data type.
  • In Java, the “ArrayList<Float>” class.
  • In Python, the “float32” NumPy data type.
  • In C#, the “Single” data type (or corresponding alias “float”).
  • In Fortran, the “REAL(KIND = 4)” data type.
  • In R31, the “numeric” or “double” data type.
  • In MATLAB, the “single” data type.

Notes

  1. By design, R does not provide a data type that stores values between -3.4E+38 and 3.4E+38 using exactly 4 bytes of memory. As a substitute, the R “numeric” or “double” data type may be used, at the cost of increased memory usage (as it occupies 8 bytes of memory) and lower performance (as byte alignment must be performed by HDFql). ↩