[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 2/5] Support human unit formats in strtobytes, e
From: |
Jes Sorensen |
Subject: |
[Qemu-devel] Re: [PATCH 2/5] Support human unit formats in strtobytes, eg. 1.0G |
Date: |
Thu, 16 Sep 2010 12:14:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Lightning/1.0b3pre Thunderbird/3.1.3 |
On 09/16/10 09:19, Paolo Bonzini wrote:
> On 09/15/2010 09:31 PM, Jes Sorensen wrote:
>> Floating point is just plain wrong. If someone wants to do something
>> like in your example they really ask for an error.
>
> An error, not an overflow.
>
> Adding overflow checking on top of your patch is also fine. Another
> possibility is to look ahead for the multiplier so that you correctly
> base the divider and do everything in 64.64 fixed point. But it seems
> overkill compared to floating-point, whose 53-bit mantissa precision
> will almost always lead to exact results (large numbers usually have a
> lot of zeros at the end, both in binary and in decimal).
I think it would be quite reasonable not to accept anything more than
say 3-4 decimal points, since there are the t/g/m/k options as well.
Cheers,
Jes
- [Qemu-devel] [PATCH 4/5] Switch migrate_set_speed() to take an 'o' argument rather than a float., (continued)
- [Qemu-devel] [PATCH 4/5] Switch migrate_set_speed() to take an 'o' argument rather than a float., Jes . Sorensen, 2010/09/15
- [Qemu-devel] [PATCH 3/5] Add support for 'o' octet (bytes) format as monitor parameter., Jes . Sorensen, 2010/09/15
- [Qemu-devel] [PATCH 5/5] Remove obsolete 'f' double parameter type, Jes . Sorensen, 2010/09/15
- [Qemu-devel] [PATCH 2/5] Support human unit formats in strtobytes, eg. 1.0G, Jes . Sorensen, 2010/09/15
- [Qemu-devel] Re: [PATCH 2/5] Support human unit formats in strtobytes, eg. 1.0G, Juan Quintela, 2010/09/15
- [Qemu-devel] Re: [PATCH 2/5] Support human unit formats in strtobytes, eg. 1.0G, Paolo Bonzini, 2010/09/15
- Re: [Qemu-devel] Re: [PATCH 2/5] Support human unit formats in strtobytes, eg. 1.0G, Anthony Liguori, 2010/09/15
- [Qemu-devel] Re: [PATCH 2/5] Support human unit formats in strtobytes, eg. 1.0G, Jes Sorensen, 2010/09/15
- [Qemu-devel] Re: [PATCH 2/5] Support human unit formats in strtobytes, eg. 1.0G, Paolo Bonzini, 2010/09/16
- [Qemu-devel] Re: [PATCH 2/5] Support human unit formats in strtobytes, eg. 1.0G,
Jes Sorensen <=
- Re: [Qemu-devel] Re: [PATCH 2/5] Support human unit formats in strtobytes, eg. 1.0G, Avi Kivity, 2010/09/16
- Re: [Qemu-devel] Re: [PATCH 2/5] Support human unit formats in strtobytes, eg. 1.0G, Jes Sorensen, 2010/09/16
- Re: [Qemu-devel] Re: [PATCH 2/5] Support human unit formats in strtobytes, eg. 1.0G, Avi Kivity, 2010/09/16
- [Qemu-devel] Re: [PATCH 2/5] Support human unit formats in strtobytes, eg. 1.0G, Paolo Bonzini, 2010/09/16