*To*: John David Anglin <dave@hiauly1.hia.nrc.ca>*Cc*: dave.anglin@nrc-cnrc.gc.ca, debian-hppa@lists.debian.org, libc-ports@sourceware.org*Subject*: Re: Test tstdiomisc fails when multiplication of NAN by -1 results in NAN*From*: "Carlos O'Donell" <carlos@systemhalted.org>*Date*: Mon, 24 May 2010 08:03:17 -0400*Message-id*: <[🔎] AANLkTikSasalUto5Ce-1Tf3lHtm27wIXbR2Ka-E314zm@mail.gmail.com>*In-reply-to*: <[🔎] 20100523163704.DEA294FA3@hiauly1.hia.nrc.ca>*References*: <[🔎] AANLkTim8TGx10-CZx_c0YIXgQKomyYJiUhyepB4LTfeq@mail.gmail.com> <[🔎] 20100523163704.DEA294FA3@hiauly1.hia.nrc.ca>

On Sun, May 23, 2010 at 12:37 PM, John David Anglin <dave@hiauly1.hia.nrc.ca> wrote: > Carlos, > > You have found a bug. The code should xor the sign bit when doing > negation. The existing code doesn't work for NANs. I'll try to > fix negdf2 and negsf2. Should I file a bug? >> Then it loads something which I assume *should* be -1, but isn't: >> >> .LC2: >> .word -1074790400 >> .word 0 >> >> What is this value, it's 0xbff0000000000000 e.g. -1.875. Should it be >> 0xbf80000000000000 e.g. -1.0 exactly, but it's not? Is this a mistake? > > I believe 0xbff0000000000000 is the correct double representation > for -1.0. 0xbf800000 is the float representation for -1.0. You are correct, I've checked for 64-bit, and this is correct. I was accidentally using the 32-bit float formats. However, there is a bug in gdb then, which shows the NaN value as a 32-bit value and interprets only the top 32-bits of the 64-bit double -1.0 and displays -1.875 as if it were a 32-bit float. Cheers, Carlos.

**Follow-Ups**:**Re: Test tstdiomisc fails when multiplication of NAN by -1 results in NAN***From:*John David Anglin <dave@hiauly1.hia.nrc.ca>

**References**:**Test tstdiomisc fails when multiplication of NAN by -1 results in NAN again.***From:*"Carlos O'Donell" <carlos@systemhalted.org>

**Re: Test tstdiomisc fails when multiplication of NAN by -1 results in NAN***From:*"John David Anglin" <dave@hiauly1.hia.nrc.ca>

- Prev by Date:
**Re: Test tstdiomisc fails when multiplication of NAN by -1 results in NAN** - Next by Date:
**Re: Regressions when building glibc for HPPA.** - Previous by thread:
**Re: Test tstdiomisc fails when multiplication of NAN by -1 results in NAN** - Next by thread:
**Re: Test tstdiomisc fails when multiplication of NAN by -1 results in NAN** - Index(es):