[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [6050] fp: add floatXX_is_infinity(), floatXX_is_neg()
From: |
Aurélien Jarno |
Subject: |
Re: [Qemu-devel] [6050] fp: add floatXX_is_infinity(), floatXX_is_neg(), floatXX_is_zero() |
Date: |
Mon, 15 Dec 2008 23:07:46 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Mon, Dec 15, 2008 at 06:48:27PM +0100, Andreas Färber wrote:
> Hi,
>
> Am 15.12.2008 um 18:14 schrieb Aurelien Jarno:
>
>> Revision: 6050
>> http://svn.sv.gnu.org/viewvc/?
>> view=rev&root=qemu&revision=6050
>> Author: aurel32
>> Date: 2008-12-15 17:14:20 +0000 (Mon, 15 Dec 2008)
>>
>> Log Message:
>> -----------
>> fp: add floatXX_is_infinity(), floatXX_is_neg(), floatXX_is_zero()
>>
>> Signed-off-by: Aurelien Jarno <address@hidden>
>
> Doesn't IEEE 754 have both a positive and a negative zero?
>
>> +INLINE float32 float32_is_neg(float32 a)
>> +{
>> + return a < 0.0;
>> +}
>
> I would assume that 0.0 == -0.0 so this would not indicate a negative
> zero as negative. Is that intended?
>
This is true, however I doubt it will make a difference given the use
of this function (for sure it doesn't make any difference given the
current use). I have fixed it for the sake of correctness, but the
resulting code is now probably slower.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' address@hidden | address@hidden
`- people.debian.org/~aurel32 | www.aurel32.net
- [Qemu-devel] [6050] fp: add floatXX_is_infinity(), floatXX_is_neg(), floatXX_is_zero(), Aurelien Jarno, 2008/12/15
- Re: [Qemu-devel] [6050] fp: add floatXX_is_infinity(), floatXX_is_neg(), floatXX_is_zero(), Andreas Färber, 2008/12/15
- Re: [Qemu-devel] [6050] fp: add floatXX_is_infinity(), floatXX_is_neg(), floatXX_is_zero(),
Aurélien Jarno <=
- Re: [Qemu-devel] [6050] fp: add floatXX_is_infinity(), floatXX_is_neg(), floatXX_is_zero(), Laurent Desnogues, 2008/12/18