Re: [PATCH] Fix error in powf for (-1.0, NaN) input

Corinna Vinschen <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On Mar  2 15:40, Fabian Schriever wrote:
> Prevent confusion between -1.0 and 1.0 in powf. The corresponding
> similar error was previously fixed for pow (see commit bb25dd1b)
> ---
>  newlib/libm/math/ef_pow.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/newlib/libm/math/ef_pow.c b/newlib/libm/math/ef_pow.c
> index 524e3f9b0..d9e85a95e 100644
> --- a/newlib/libm/math/ef_pow.c
> +++ b/newlib/libm/math/ef_pow.c
> @@ -79,7 +79,7 @@ ivln2_l  =  7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
>      /* x|y==NaN return NaN unless x==1 then return 1 */
>  	if(FLT_UWORD_IS_NAN(ix) ||
>  	   FLT_UWORD_IS_NAN(iy)) {
> -	    if(ix==0x3f800000) return one;
> +	    if(hx==0x3f800000) return one;
>  	    else return nanf("");
>  	}
>  
> -- 
> 2.24.1.windows.2

Pushed.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl5dKlwACgkQ9TYGna5E
T6CTyg//aMrwtTwR87tTRlILGcvkXmBFvCuW+4cGao+qjX7MWxaYa8m1e2kwdolx
Q0cVfOgs4fNgCS7uUyXsYKcCOixAiHG1fp49b9O0HrXGUo7WcZ19BLimBIELsdc9
i05uJKKUSuUIzuU7l4N2ACUs3TTslbESrxZejij1TtABNEK23Y+3bf8GL5/boIWn
zVX0giU7cHQjxnbAiYM2jXyrLZiLstAIIBDfq/QVMxpo3x2jTNfVPQxLfClb9R40
AmCi509eIr6gIz64FB9MVCb6IGZE4xWXKB1iHAW4xyWCFV085NG4+592Mvvi6GjO
uXQPp1rPcAFHM9D58jD/0Mv8pd5eyQyD22pKKTipqJa16V0MNDAAm6M1QG2qF6FI
zEVjeWcWww1i4z06c/fW2GFTsAnCtZR5TDKaZXiX6kES0HtKOZ4zfVPhzad6pfef
ni631usvO493n+DDYGcgXY3zmWPME6jzrHRVpgnpMTZGcL+OFlTByzH2WZZl93p1
0lTcnsTRjIbmyfACoCHzjy/Y4vKXBCOi/oOpaIHy/lLU7ot1aYEEgnTZjxMOXovm
TGfovKZowJV8FEwLw2OLDn/UKa40XkHxiwYi/XjkXOWSHf/IC8Wfq8DkXTRFFHt/
vXOBE2palW3Kdhu7kccaRO6U/JeO//NBAySrfJwVYvUiuhkCObI=
=4uyW
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.