6.1.9FLOAT
The HDFql FLOAT data type stores values between -3.4E+38 and 3.4E+38 and occupies 4 bytes in memory. It represents the data type of an HDF5 H5T_NATIVE_FLOAT dataset/attribute or of a result set that stores elements of this type (which can be retrieved using the HDFQL_CURSOR_GET_FLOAT function when working with cursors). Depending on the programming language supported by HDFql, the FLOAT data type is represented by:
- In C, the “float” data type.
- In C++, the “float” data type.
- In Java, the “float” data type (or corresponding wrapper class “Float”).
- In Python, the “float32” NumPy data type.
- In C#, the “Single” data type (or corresponding alias “float”).
- In Fortran, the “REAL(KIND = 4)” or “REAL” data type.
- In R15, the “numeric” or “double” data type.
- In MATLAB, the “single” data type.
Notes
- 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). ↩