pace-neutrons / Horace

Horace is a suite of programs for the visualization and analysis of large datasets from time-of-flight neutron inelastic scattering spectrometers.
https://pace-neutrons.github.io/Horace/stable/
GNU General Public License v3.0
7 stars 4 forks source link

Putting object hashes back into save/load requires special treatment #1636

Open cmarooney-stfc opened 5 months ago

cmarooney-stfc commented 5 months ago

Attempting to CI PR #1615 showed that before Matlab 2019b differences in numeric values of around 10^-15 caused large changes in hashing of objects, so that save/load preservation of hashes did not work.

This ticket seeks to solve the problem by truncating the mantissa of the numbers in question to approx. 6 significant figures during serialization before calculating the hash.