Skip to contentSkip to conversation

SNaN & QNaN on mips

DISCUSSION Zhang Fuxin 3 participants 3 messages Feb 4, 2002 MIPS

lore
Share & tools
lore
#0 lore raw

hi,

Gcc (2.96 20000731,H.J.LU's rh port for mips) think 0x7fc00000 is QNaN and optimize 0.0/0.0 as 0x7fc00000 for single precision ops,while for my cpu (maybe most mips cpu) is a SNaN. R4k user's manual and "See Mips Run" both
say so.And experiments confirm this.

Should we correct it?

Quoted 4 lines

Regards
Zhang Fuxin
[email protected]

Regards
Zhang Fuxin
[email protected]

#1 lore raw
Quoted 8 lines · Zhang Fuxin

hi,

Gcc (2.96 20000731,H.J.LU's rh port for mips) think 0x7fc00000 is QNaN and optimize 0.0/0.0 as 0x7fc00000 for single precision ops,while for my cpu (maybe most mips cpu) is a SNaN. R4k user's manual and "See Mips Run" both
say so.And experiments confirm this.

Should we correct it?

Yes. Do you have a patch?

Thanks.

H.J.

#2 lore raw
In reply to Zhang Fuxin
Quoted 6 lines · Zhang Fuxin

hi,

Gcc (2.96 20000731,H.J.LU's rh port for mips) think 0x7fc00000 is QNaN and optimize 0.0/0.0 as 0x7fc00000 for single precision ops,while for my cpu (maybe most mips cpu) is a SNaN. R4k user's manual and "See Mips Run" both
say so.And experiments confirm this.

MIPS interprets Signalling NaN's different than e.g. Intel. According to IEEE754 it _is_ a matter of interpretation. 0x7fc00000 is an SNaN while 0x7fbfffff is an QNaN. It would be great if you could fix it.

/Kjeld

Quoted 11 lines

Should we correct it?

Quoted 4 lines

Regards
Zhang Fuxin
[email protected]

Regards
Zhang Fuxin
[email protected]

Signature · 5 lines
_    _ ____  ___                       Mailto:[email protected]
|\  /|||___)(___    MIPS Denmark       Direct: +45 44 86 55 85
| \/ |||    ____)   Lautrupvang 4 B    Switch: +45 44 86 55 55
  TECHNOLOGIES      DK-2750 Ballerup   Fax...: +45 44 86 55 56
                    Denmark            http://www.mips.com/