Hi, All !

As far as I understand the comparison of 0.0 and -0.0 should give the equal
answer,
but the current implementation does not do so. Here is the corrected __cmpsf
source:

int __cmpsf2(long a1, long a2)
{

 if(a1 == a2) return 0;

 if(a1<0 && a2<0)
 {
  a1 ^= 0x80000000;
  a2 ^= 0x80000000;
  if(a1<a2)
   return 1;
  return -1;
 }

 if((a1|a2)==0x80000000)return 0; //Special case for -0.0==0.0

 if(a1>a2) return 1;
 return -1;
}

I have added only one line (one with the comment).

All the best !
Oleg


Reply via email to