public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "JoaquinMonleon at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/53367] New: FMOD Standar C++ library Date: Tue, 15 May 2012 22:08:00 -0000 [thread overview] Message-ID: <bug-53367-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53367 Bug #: 53367 Summary: FMOD Standar C++ library Classification: Unclassified Product: gcc Version: 4.4.3 Status: UNCONFIRMED Severity: major Priority: P3 Component: libstdc++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: JoaquinMonleon@gmail.com Created attachment 27411 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27411 the preprocessed file (*.i*) that triggers the bug??? /* Exact version of GCC: gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) System Type: 32BITS --target=i486-linux-gnu. Options given when GCC was configured/build: The complete command line that triggers the bug: "g++ -lm fmod.cpp -o fmod" The compiler output (error messages, warnings, etc.): None. the preprocessed file (*.i*) that triggers the bug, generated by adding -save-temps to the complete compilation command: As attachment http://en.tiraecol.net/modules/comic/cache/images/tiraecol_en-5.png */ #include <cmath> #include <iostream> using namespace std; const long double _1PI2 = 1.5707963267948966193L; // PI/2 const long double _3PI2 = 4.712388980384689858L; // 3*PI/2 long double my_fmod(long double numerator, long double denominator){ return numerator-((int)(numerator/denominator))*denominator; } int main(){ // GCC Standard Library fmod cout << fmod(_3PI2,_1PI2) << endl; // RETURNS 1.0842e-19 !!!!!!!!!!!!!!!!!!BUG BUG BUG!!!!!!!!!!!!!! // my_fmod cout << my_fmod(_3PI2,_1PI2) << endl; // RETURNS 0 }
next reply other threads:[~2012-05-15 21:22 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-05-15 22:08 JoaquinMonleon at gmail dot com [this message] 2012-05-15 22:14 ` [Bug libstdc++/53367] " pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-53367-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).