qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 00/17] NBD patches through 2021-03-09


From: Peter Maydell
Subject: Re: [PULL 00/17] NBD patches through 2021-03-09
Date: Thu, 11 Mar 2021 20:40:59 +0000

On Thu, 11 Mar 2021 at 19:21, Eric Blake <eblake@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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]