f90: double precision constants

From: Gerhard Nolte <gnolte_at_gwdg.de>
Date: Thu, 11 Jun 1998 12:01:03 +0200

Dear Gurus,

on Digital Unix 4.0d the F90 compiler (DFABASE500) shows an unexpected
behaviour: assigning a constant to a double precision variable is
sensitive in respect to the d0-appendix (see small example
program). f77 has the expected behaviour. Is it a bug or a feature of
f90?

          8< ---------------- cut here -------------------- >8
      program Double_precision_test

C Gibt's einen Unterschied zwischen unter f90 zwischen den Konstanten
C mit und ohne d0 Appendix?

      double precision x, xd0

      x = 1.23456
      xd0 = 1.23456d0

      print*, ' x =', x
      print*, 'xd0 =', xd0

      print*, ' x-xd0 = ', x - xd0

      end
          8< ---------------- cut here -------------------- >8

TIA
Gerhard

-- 
Gerhard Nolte
Email: gnolte_at_gwdg.de   Voice: +49-551-5176-716  Fax: +49-551-5176-704
MPI fuer Stroemungsforschung, Bunsenstr. 10, 37073 Goettingen, Germany
Received on Thu Jun 11 1998 - 12:02:09 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT