[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h5md-user] increasing order of "time" dataset

From: Felix Höfling
Subject: Re: [h5md-user] increasing order of "time" dataset
Date: Fri, 09 May 2014 16:41:15 +0200
User-agent: Opera Mail/12.16 (Linux)

Am 09.05.2014, 15:43 Uhr, schrieb Peter Colberg <address@hidden>:

On Fri, May 09, 2014 at 09:57:44AM +0200, Felix Höfling wrote:
It does actually not break backwards compatibility as the difference is
relevant only for equality comparisons of floating-point numbers, which is strictly discouraged. Thus I think the slightly relaxed condition would make
H5MD a bit more flexible.

I noted that it breaks backwards compatibility to make you aware that
this seemingly minor change requires a bump of the major version number.
The values of a dataset can, e.g., be stored in a hash table with the
times as keys, since H5MD 1.0 ensures that the times are unique.


Uniqueness of floating-point numbers requires floating-point comparison. From your own experiences you may remember that such a thing should strictly be avoided.

Actually H5MD version 1.0.0 is flawed here: it assumes that floating-point numbers can be compared, which however depends on implementation-specific rounding modes etc. The truth is that a (sensible) software can not distinguish between increasing (= non-decreasing) and strictly increasing time datasets. It is not even guaranteed that two slightly different floating-point numbers end up as different values in the HDF5 file because of possible conversions going on.

I'm aware that the discussion has become a bit esoteric now ...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]