texworks icon indicating copy to clipboard operation
texworks copied to clipboard

test_UI fails because 112,38 != 112,39

Open jlaurens opened this issue 2 years ago • 1 comments

Bug description:

On macOS Ventura 13.3.1(a) this test sometimes fails. The first idea is to replace QCOMPARE with a less strict equality test.

I will post a pull request soon.

jlaurens avatar May 12 '23 06:05 jlaurens

According to the Qt docs, "When comparing floating-point types (float, double, and qfloat16), qFuzzyCompare() is used for finite values." So there is no strict equality for floating point numbers anyway. From a binary point of view, float (i.e. IEEE 754 binary32) has (slightly more than) 7 decimal digits of accuracy, so 112,28 is indeed significantly different from 112,39 from a numeric point of view (difference in the 5th digit). It would be helpful to know which particular test in test_UI actually fails, as I couldn't find either of the mentioned numbers as hard-coded values.

stloeffler avatar Oct 22 '23 10:10 stloeffler