You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Complex numbers are widely used in the physical sciences, and in some domains are very commonplace. C, C++, Fortran, Python, and Julia all have native complex numbers, all with the same representation in memory, that of an array of two numbers in the rectangular/Cartesian form. Currently, because there is no built-in datatype for HDF5 then library and application authors must create their own. A nice summary of the approaches different authors have taken is in this discussion on the CF-Conventions. Note that there are broadly speaking three approaches, but the one labelled 2a appears to be the most common.
Complex numbers have been discussed here previously, though still without real consensus:
The minimal implementation that is most useful to the most number of people would be a set of complex types for float and double base types equivalent to the compound type:
This would coincide with the choices made by h5py and HDF5.jl, for example.
The <base float> above would either be NATIVE_FLOAT/NATIVE_DOUBLE and/or the IEEE_F* types.
Describe alternatives you've considered
The existing solution is for each library and application to invent their own datatype. This has led to incompatible definitions for the type, reducing interoperability between tools and datasets. It also adds friction for developers and users in having to create the type or re-structure their data in comparison to other native types.
Additional context
Some commentators have called for this type to be flexible enough to work for higher order complex numbers such as quarternions. I'm not proposing that here as these types are generally not built-in types in the programming languages, at least not those used in the physical sciences. I believe that there may also be much more variety in the representations of quarternions so that it perhaps makes less sense to bless one particular form.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Complex numbers are widely used in the physical sciences, and in some domains are very commonplace. C, C++, Fortran, Python, and Julia all have native complex numbers, all with the same representation in memory, that of an array of two numbers in the rectangular/Cartesian form. Currently, because there is no built-in datatype for HDF5 then library and application authors must create their own. A nice summary of the approaches different authors have taken is in this discussion on the CF-Conventions. Note that there are broadly speaking three approaches, but the one labelled 2a appears to be the most common.
Complex numbers have been discussed here previously, though still without real consensus:
Describe the solution you'd like
The minimal implementation that is most useful to the most number of people would be a set of complex types for
float
anddouble
base types equivalent to the compound type:This would coincide with the choices made by h5py and HDF5.jl, for example.
The
<base float>
above would either beNATIVE_FLOAT
/NATIVE_DOUBLE
and/or theIEEE_F*
types.Describe alternatives you've considered
The existing solution is for each library and application to invent their own datatype. This has led to incompatible definitions for the type, reducing interoperability between tools and datasets. It also adds friction for developers and users in having to create the type or re-structure their data in comparison to other native types.
Additional context
Some commentators have called for this type to be flexible enough to work for higher order complex numbers such as quarternions. I'm not proposing that here as these types are generally not built-in types in the programming languages, at least not those used in the physical sciences. I believe that there may also be much more variety in the representations of quarternions so that it perhaps makes less sense to bless one particular form.
The text was updated successfully, but these errors were encountered: