This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem wirh real*8


antonio fazzolari wrote:
   x=0.123456789
   y=0.123456788

You have to tell the Fortran compiler that these are real*8 constants. Otherwise, they are parsed as real constants, truncated to 32-bit floats, and then extended to 64-bit doubles when stored into x and y.


One way to fix this is to change the two lines to
    x=0.123456789d0
    y=0.123456788d0

I am not a Fortran expert.  There may be other or better ways to fix tihs.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]