public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/53367] New: FMOD Standar C++ library
@ 2012-05-15 22:08 JoaquinMonleon at gmail dot com
  2012-05-15 22:14 ` [Bug libstdc++/53367] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: JoaquinMonleon at gmail dot com @ 2012-05-15 22:08 UTC (permalink / raw)
  To: gcc-bugs

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

}


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug libstdc++/53367] FMOD Standar C++ library
  2012-05-15 22:08 [Bug libstdc++/53367] New: FMOD Standar C++ library JoaquinMonleon at gmail dot com
@ 2012-05-15 22:14 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-05-15 22:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53367

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |MOVED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-05-15 22:07:22 UTC ---
This calls directly fmodl which is not part of either libstdc++ or GCC.  Please
report it to glibc since you are using glibc as your libc.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-15 22:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-15 22:08 [Bug libstdc++/53367] New: FMOD Standar C++ library JoaquinMonleon at gmail dot com
2012-05-15 22:14 ` [Bug libstdc++/53367] " pinskia at gcc dot gnu.org

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).