Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 617789 Details for
Bug 860853
glibc implementation of FMA seems to give incosistent signs
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
A reduced test case for the problem.
glibc-sign-issue.cpp (text/x-c++src), 1.11 KB, created by
Martin Brain
on 2012-09-26 21:12:29 UTC
(
hide
)
Description:
A reduced test case for the problem.
Filename:
MIME Type:
Creator:
Martin Brain
Created:
2012-09-26 21:12:29 UTC
Size:
1.11 KB
patch
obsolete
>/* >** g++ -frounding-math -fsignaling-nans -mfpmath=sse glibc-sign-issue.cpp -o glibc-sign-issue >*/ > >#include <assert.h> >#include <math.h> > >#include <iostream> > >// From math/s_fmaf.c >float >__fmaf (float x, float y, float z) >{ > return (x * y) + z; >} > >// From math/s_fma.c >double >__fma (double x, double y, double z) >{ > return (x * y) + z; >} > > >int main (void) { > float f1 = 0.0f; > float f2 = -1.0f; > float f3 = -0.0f; > > float fmafresult = fmaf(f1,f2,f3); > double fmaresult = fma(double(f1),double(f2),double(f3)); > float convert = double(fmaresult); > > std::cout << fmafresult << "==" << fmaresult << '\t'; > > if (signbit(fmafresult) == signbit(convert)) { > std::cout << "match"; > } else { > std::cout << "don't match"; > } > std::cout << std::endl; > > > float lfmafresult = __fmaf(f1,f2,f3); > double lfmaresult = __fma(double(f1),double(f2),double(f3)); > float lconvert = double(lfmaresult); > > std::cout << lfmafresult << "==" << lfmaresult << '\t'; > > if (signbit(lfmafresult) == signbit(lconvert)) { > std::cout << "match"; > } else { > std::cout << "don't match"; > } > std::cout << std::endl; > > > > > return 0; >}
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 Raw
Actions:
View
Attachments on
bug 860853
: 617789