FreeBSD Bugzilla – Attachment 123178 Details for
Bug 166463
remquo[f] may return wrong sign in quo part and incorrect rem part on denormals
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.42 KB, created by
Ilya Burylov
on 2012-03-28 13:40:09 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Ilya Burylov
Created:
2012-03-28 13:40:09 UTC
Size:
1.42 KB
patch
obsolete
>Index: src/s_remquof.c >=================================================================== >--- src/s_remquof.c (revision 233542) >+++ src/s_remquof.c (working copy) >@@ -46,7 +46,7 @@ > q = 0; > goto fixup; /* |x|<|y| return x or x-y */ > } else if(hx==hy) { >- *quo = 1; >+ *quo = (sxy ? -1 : 1); > return Zero[(u_int32_t)sx>>31]; /* |x|=|y| return x*0*/ > } > >@@ -88,6 +88,7 @@ > > /* convert back to floating value and restore the sign */ > if(hx==0) { /* return sign(x)*0 */ >+ q &= 0x7fffffff; > *quo = (sxy ? -q : q); > return Zero[(u_int32_t)sx>>31]; > } >Index: src/s_remquo.c >=================================================================== >--- src/s_remquo.c (revision 233542) >+++ src/s_remquo.c (working copy) >@@ -51,7 +51,7 @@ > goto fixup; /* |x|<|y| return x or x-y */ > } > if(lx==ly) { >- *quo = 1; >+ *quo = (sxy ? -1 : 1); > return Zero[(u_int32_t)sx>>31]; /* |x|=|y| return x*0*/ > } > } >@@ -114,6 +114,7 @@ > > /* convert back to floating value and restore the sign */ > if((hx|lx)==0) { /* return sign(x)*0 */ >+ q &= 0x7fffffff; > *quo = (sxy ? -q : q); > return Zero[(u_int32_t)sx>>31]; > } >@@ -129,9 +130,9 @@ > lx = (lx>>n)|((u_int32_t)hx<<(32-n)); > hx >>= n; > } else if (n<=31) { >- lx = (hx<<(32-n))|(lx>>n); hx = sx; >+ lx = (hx<<(32-n))|(lx>>n); hx = 0; > } else { >- lx = hx>>(n-32); hx = sx; >+ lx = hx>>(n-32); hx = 0; > } > } > fixup:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 166463
: 123178