[PATCH v2] msvcrt: Make the cosh/sinh/tanh functions NAN preserving

Sven Baars sven.wine at gmail.com
Fri Jul 16 12:52:46 CDT 2021


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.



More information about the wine-devel mailing list