silx-kit / h5web

React components for data visualization and exploration
https://h5web.panosc.eu/
MIT License
161 stars 17 forks source link

64-bit integers not shown correctly in h5web display #1679

Open gapost opened 1 week ago

gapost commented 1 week ago

Describe the bug

64-bit signed and unsigned integers are not always displayed correctly in the h5web display window.

To Reproduce

  1. Go to https://h5web.panosc.eu/h5grove?file=sample.h5
  2. Select the int64_scalar dataset
  3. Select Display view on the right panel
  4. Value shown is: -9223372036854776000

Expected behaviour

The value returned by h5dump -d int64_scalar sample.h5 is: -9223372036854775808

Similar happens with uint64: uint64_scalar datatype as shown on h5web window: 18446744073709552000 while h5dump reports: 18446744073709551615

Context

axelboc commented 1 week ago

Indeed, big integers (int/uint64) numbers are not currently supported. They get converted to primitive JS numbers (float64) to avoid errors, which is why you're seeing inaccurate values.

We would definitely like to improve support for big integers, though, so we'll use this issue to report any progress. Thanks!