qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Aurélien Jarno" <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <20081215220746.GD8523@volta.aurel32.net> (raw)
In-Reply-To: <B215479C-5218-4E50-A372-A69524097000@web.de>

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 <aurelien@aurel32.net>
>
> 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
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

  reply	other threads:[~2008-12-15 22:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 17:14 [Qemu-devel] [6050] fp: add floatXX_is_infinity(), floatXX_is_neg(), floatXX_is_zero() Aurelien Jarno
2008-12-15 17:48 ` Andreas Färber
2008-12-15 22:07   ` Aurélien Jarno [this message]
2008-12-18 15:15 ` Laurent Desnogues
2008-12-18 22:54   ` Aurelien Jarno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081215220746.GD8523@volta.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).