* [PATCH] Fix error in powf for (-1.0, NaN) input
@ 2020-03-02 14:42 Fabian Schriever
2020-03-02 15:46 ` Corinna Vinschen
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Schriever @ 2020-03-02 14:42 UTC (permalink / raw)
To: newlib; +Cc: Fabian Schriever
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix error in powf for (-1.0, NaN) input
2020-03-02 14:42 [PATCH] Fix error in powf for (-1.0, NaN) input Fabian Schriever
@ 2020-03-02 15:46 ` Corinna Vinschen
0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2020-03-02 15:46 UTC (permalink / raw)
To: Fabian Schriever; +Cc: newlib
[-- Attachment #1: Type: text/plain, Size: 893 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-02 15:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02 14:42 [PATCH] Fix error in powf for (-1.0, NaN) input Fabian Schriever
2020-03-02 15:46 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).