Supercedes: 20210314234821.1954428-1-richard.henderson@linaro.org
("utils: Use fma in qemu_strtosz")
On second thoughts, using fma isn't the best workaround.
Let's just do some fixed-point arithmetic and compute the exact
result of the multiply. This makes overflow detection simple
and obvious.
Round up from 0.5, because. This fixes one testsuite failure
and causes another, so amend the testsuite.
r~
Richard Henderson (1):
utils: Use fixed-point arithmetic in qemu_strtosz
tests/unit/test-cutils.c | 2 +-
util/cutils.c | 50 ++++++++++++++++++++++++++++------------
2 files changed, 36 insertions(+), 16 deletions(-)
--
2.25.1