[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 6/6] qht: Fix threshold rate calculation
From: |
Richard Henderson |
Subject: |
Re: [PATCH v4 6/6] qht: Fix threshold rate calculation |
Date: |
Wed, 17 Jun 2020 13:58:22 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 |
On 6/17/20 1:13 PM, Richard Henderson wrote:
> - *threshold = rate * UINT64_MAX;
> + *threshold = (rate * 0xffff000000000000ull)
> + + (rate * 0x0000ffffffffffffull);
Well, while this does silence the warning, it produces the exact same results
as before, since the intermediate double result still only has 53 bits of
precision.
We're probably be better off with the nextafter(0x1p64, 0.0) form that we've
used elsewhere.
r~
- [PATCH v4 0/6] Vs clang-10 and gcc-9 warnings, Richard Henderson, 2020/06/17
- [PATCH v4 1/6] fpu/softfloat: Silence 'bitwise negation of boolean expression' warning, Richard Henderson, 2020/06/17
- [PATCH v4 2/6] migration: fix xbzrle encoding rate calculation, Richard Henderson, 2020/06/17
- [PATCH v4 3/6] configure: Clean up warning flag lists, Richard Henderson, 2020/06/17
- [PATCH v4 4/6] configure: Disable -Wtautological-type-limit-compare, Richard Henderson, 2020/06/17
- [PATCH v4 5/6] configure: Add -Wno-psabi, Richard Henderson, 2020/06/17
- [PATCH v4 6/6] qht: Fix threshold rate calculation, Richard Henderson, 2020/06/17
- Re: [PATCH v4 6/6] qht: Fix threshold rate calculation,
Richard Henderson <=
- Re: [PATCH v4 0/6] Vs clang-10 and gcc-9 warnings, Peter Maydell, 2020/06/18