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: How to use "long double" real(kind=10) ?


Salut !

With a previous version of gfortran, I remember having used
  real(kind=10)
with no problem. But with a more recent version, I can't use
that any longer. How can I use the "long double" type?

First, it depends for what target you're compiling. On i686-linux, i686-cygwin, x86_64-linux for example, you can simply use the following:


  real(kind=10) :: x, y
  x = -1.0_10
  y = acos(x)
  write(*,"(G40.30)") y
  end

$ gfortran a.f90
$ ./a.out
     3.14159265358979323851280900000

If you're talking about i686-mingw32 (also called, on the gfortran wiki, "native windows"), then the support for real(kind=10) is not present anymore on the distributed binaries: I had to remove it because the Windows I/O system calls for long double are broken.

Finally, if you experience any trouble, please report the target and compiler version (that is, the output of "gfortran -v"), as well as the way you got the binaries (ou built them).

FX


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