msvcrt: fix _copysign(1., -0.) error

Zheng Chen chanchengcc at gmail.com
Tue Mar 24 05:18:11 CDT 2015


Hi Piotr,

Thank you very much for pointing out the problems.

And about

  float CDECL MSVCRT__copysignf( float num, float sign )
>>   {
>> -    /* FIXME: Behaviour for Nan/Inf? */
>> -    if (sign < 0.0)
>> -        return num < 0.0 ? num : -num;
>> -    return num < 0.0 ? -num : num;
>> +    /* FIXME: Behaviour for signbit(NAN) is different in Linux and
>> +     *        Windows, where Windows gives a zero for -NAN
>> +     */
>> +    if (signbit(sign))
>> +        return signbit(num) ? num : -num;
>> +    return signbit(num) ? -num : num;
>>
> It doesn't make sense to add this comment and remove it in next patch. I
> would also prefer if signbit fallback implementation is changed in this
> patch.
>

I removed the comments now because I thought this is already fixed... I've
combined the changes and sent two patches.

Thanks again :)

Regards,
Zheng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20150324/072768a4/attachment.html>


More information about the wine-devel mailing list