This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: writing a double precission varibale with format f3.0 is not rounded


On Tue, Jan 16, 2007 at 03:12:39PM +0100, Hugo Mahr wrote:
> 
> fortran --version
> GNU Fortran 95 (GCC) 4.1.0 (SUSE Linux)

Upgrade to either 4.2 pre-release or trunk (aka 4.3).
It is probably easiest to download a binary from the
gfortran wiki.

PS:
laptop:kargl[202] cat > t.f90
       program f0999
       double precision rdum
       rdum = 9.99999D-1
       write(*,'(F3.0)') rdum
       write(*,'(d24.6)') rdum
       end
laptop:kargl[203] gfc4x -o z -fdump-tree-original t.f90
laptop:kargl[204] ./z
 1.
            0.999999D+00


-- 
Steve


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