public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/52413] New: Incorrect behavior of FRACTION when applied to a constant
@ 2012-02-28  9:39 frouet at enseeiht dot fr
  2012-02-28 16:13 ` [Bug libfortran/52413] " kargl at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: frouet at enseeiht dot fr @ 2012-02-28  9:39 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52413
           Summary: Incorrect behavior of FRACTION when applied to a
                    constant
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: frouet@enseeiht.fr


Hi,

I have a problem when applying "fraction" to a numerical constant, e.g.
fraction(-2.0); a minimal example says it all:

program test_frac

  real::x,y
  x=-2.0
  x=fraction(x)  
  write(*,*)x
  y=fraction(-2.0) 
  write(*,*)y

end program test_frac

The output is 
 -0.50000000    
  0.50000000

while one would expect
 -0.50000000    
 -0.50000000

I experienced this with gfortran 4.4, 4.5 and 4.6 on Ubuntu systems. On ifort
12, the result is correct.

Regards,

FHR


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

end of thread, other threads:[~2013-06-24  8:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-28  9:39 [Bug libfortran/52413] New: Incorrect behavior of FRACTION when applied to a constant frouet at enseeiht dot fr
2012-02-28 16:13 ` [Bug libfortran/52413] " kargl at gcc dot gnu.org
2012-02-28 20:50 ` anlauf at gmx dot de
2013-06-22 12:58 ` [Bug fortran/52413] " dominiq at lps dot ens.fr
2013-06-22 15:31 ` sgk at troutmask dot apl.washington.edu
2013-06-23 12:29 ` fxcoudert at gcc dot gnu.org
2013-06-23 12:30 ` fxcoudert at gcc dot gnu.org
2013-06-23 13:15 ` dominiq at lps dot ens.fr
2013-06-23 14:11 ` fxcoudert at gcc dot gnu.org
2013-06-23 15:35 ` dominiq at lps dot ens.fr
2013-06-23 15:36 ` dominiq at lps dot ens.fr
2013-06-23 15:43 ` fxcoudert at gcc dot gnu.org
2013-06-23 16:10 ` dominiq at lps dot ens.fr
2013-06-24  8:45 ` burnus at gcc dot gnu.org
2013-06-24  8:45 ` burnus 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).