Cross-compiling pulseview on fresh install of Linux Mint 6.8.0-38-generic the tests integrated in make raise two errors at lines 220 and 221 of test/util.cpp.
the erroneous produced time representations were:
...:19:60 instead of ...:20:00 (line 220)
...:09:60 instead of ...:10:00 (line 221)
Checking the code it appears that it should work for these test lines if the type used to represent the numbers in the computation fulfills the following properties:
an integer value (in the used range) has a mathematically perfect representation in memory,
a division of 2 integer value which gives an integer result (mathematically speaking) will obtain the mathematically exact representation
a multiplication of 2 integer values will also give a mathematically exact result.
Usually integer and floats (with enough bit in mantis) are compliant. But the procedure works on Timestamp derived from boost::multiprecision::number. And apparently this type does not fulfill the property requirement. Though it increases the float representation precision, the integer representation are not mathematically perfect. The error is probably only 10^-24 of the target value but it is sufficient to trigger a decrement in floor function.
Cross-compiling pulseview on fresh install of Linux Mint 6.8.0-38-generic the tests integrated in make raise two errors at lines 220 and 221 of
test/util.cpp
. the erroneous produced time representations were: ...:19:60 instead of ...:20:00 (line 220) ...:09:60 instead of ...:10:00 (line 221)Checking the code it appears that it should work for these test lines if the type used to represent the numbers in the computation fulfills the following properties:
Usually integer and floats (with enough bit in mantis) are compliant. But the procedure works on Timestamp derived from boost::multiprecision::number. And apparently this type does not fulfill the property requirement. Though it increases the float representation precision, the integer representation are not mathematically perfect. The error is probably only 10^-24 of the target value but it is sufficient to trigger a decrement in floor function.