Re: [PATCH] utils: Use fma in qemu_strtosz

2021-03-15 Thread Richard Henderson
On 3/15/21 5:38 AM, Eric Blake wrote: On 3/14/21 6:48 PM, Richard Henderson wrote: Use fma to simulatneously scale and round up fraction. The libm function will always return a properly rounded double precision value, which will eliminate any extra precision the x87 co-processor may give us, wh

Re: [PATCH] utils: Use fma in qemu_strtosz

2021-03-15 Thread Richard Henderson
On 3/14/21 11:32 PM, Thomas Huth wrote: On 15/03/2021 00.48, Richard Henderson wrote: Use fma to simulatneously scale and round up fraction. The libm function will always return a properly rounded double precision value, which will eliminate any extra precision the x87 co-processor may give us,

Re: [PATCH] utils: Use fma in qemu_strtosz

2021-03-15 Thread Richard Henderson
On 3/15/21 3:10 AM, Philippe Mathieu-Daudé wrote: On 3/15/21 12:48 AM, Richard Henderson wrote: Use fma to simulatneously scale and round up fraction. "simultaneously" The libm function will always return a properly rounded double precision value, which will eliminate any extra precision the

Re: [PATCH] utils: Use fma in qemu_strtosz

2021-03-15 Thread Eric Blake
On 3/15/21 4:10 AM, Philippe Mathieu-Daudé wrote: > On 3/15/21 12:48 AM, Richard Henderson wrote: >> Use fma to simulatneously scale and round up fraction. > > "simultaneously" > >> The libm function will always return a properly rounded double precision >> value, which will eliminate any extra p

Re: [PATCH] utils: Use fma in qemu_strtosz

2021-03-15 Thread Eric Blake
On 3/14/21 6:48 PM, Richard Henderson wrote: > Use fma to simulatneously scale and round up fraction. > > The libm function will always return a properly rounded double precision > value, which will eliminate any extra precision the x87 co-processor may > give us, which will keep the output predic

Re: [PATCH] utils: Use fma in qemu_strtosz

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 12:48 AM, Richard Henderson wrote: > Use fma to simulatneously scale and round up fraction. "simultaneously" > The libm function will always return a properly rounded double precision > value, which will eliminate any extra precision the x87 co-processor may > give us, which will keep

Re: [PATCH] utils: Use fma in qemu_strtosz

2021-03-14 Thread Thomas Huth
On 15/03/2021 00.48, Richard Henderson wrote: Use fma to simulatneously scale and round up fraction. The libm function will always return a properly rounded double precision value, which will eliminate any extra precision the x87 co-processor may give us, which will keep the output predictable v

[PATCH] utils: Use fma in qemu_strtosz

2021-03-14 Thread Richard Henderson
Use fma to simulatneously scale and round up fraction. The libm function will always return a properly rounded double precision value, which will eliminate any extra precision the x87 co-processor may give us, which will keep the output predictable vs other hosts. Adding DBL_EPSILON while scaling