On Thu, 11 Mar 2021 at 19:21, Eric Blake <ebl...@redhat.com> wrote: > > On 3/11/21 1:02 PM, Peter Maydell wrote: > > ERROR:../tests/test-cutils.c:2290:test_qemu_strtosz_metric: assertion > > failed (res == 12345000): (12344999 == 12345000) > > Sounds like a floating point rounding error: the string was 12.345M, but > 0.345 is not an exactly-representable double (the closest 32-bit IEEE > 754 float is 0.3449999988079071044921875, while nextafter() gives > 0.34500002861). Multiplying that value by 1000000.0 can then round down > in some situations instead of producing the desired 345000.0. The > rounding is less obvious with 64-bit doubles. I'm not sure why > cross-i386-user seems to be prone to the rounding errors while other > builds are not.
My guess would be x87 FPU vs SSE... -- PMM