[PATCH v2] msvcrt: Make the cosh/sinh/tanh functions NAN preserving
Martin Storsjö
martin at martin.st
Mon Jul 26 16:43:35 CDT 2021
On Fri, 16 Jul 2021, Sven Baars wrote:
> On 16-07-2021 14:05, Martin Storsjo wrote:
>> @@ -4331,9 +4345,11 @@ double CDECL tanh( double x )
>> if (w > 0x3fe193ea) {
>> /* |x| > log(3)/2 ~= 0.5493 or nan */
>> if (w > 0x40340000) {
>> -#if _MSVCR_VER < 140
>> if (isnan(x))
>> +#if _MSVCR_VER < 140
>> return math_error(_DOMAIN, "tanh", x, 0, x);
>> +#else
>> + return x;
>> #endif
>> /* |x| > 20 or nan */
>> /* note: this branch avoids raising overflow */
>>
>
> There are many comments about a value possibly being nan, such as the
> above one, that should probably all be updated.
Thanks, will do!
// Martin
More information about the wine-devel
mailing list