Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect/ambiguous cd_values documentation #145

Open
lindstro opened this issue Oct 10, 2024 · 0 comments
Open

Incorrect/ambiguous cd_values documentation #145

lindstro opened this issue Oct 10, 2024 · 0 comments

Comments

@lindstro
Copy link
Member

The documentation of how H5Z-ZFP encodes cd_values suggests that double-precision values are type punned as two unsigned 32-bit integers in the "wrong" order. It says: "A/B are high/low 32-bit words of a double" with A stored before B. The way I read this, A would be the high 32 bits and B the low 32 bits. However, the double is simply stored in little-endian order, with the first word holding the low 32 bits, as is clear from using print_h5repack_farg:

print_h5repack_farg zfpmode=3 acc=1.0
...
h5repack -f argument...
    -f UD=32013,0,4,3,0,0,1072693248

Here 1072693248 = 0x3ff00000 is the high word with 0x3ff representing the exponent. I would propose correcting the order and also using L and H (or Lo, Hi) in place of A and B.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant