Newsgroups: comp.lang.fortran From: Lurkos Subject: Re: example of KIND to replace DOUBLE PRECISION References: User-Agent: XPN/1.2.6 (Street Spirit ; Linux) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID: <20090510185053.9738.57828.XPN@L622132.user.x-privat.org> X-face: )^2%d:dly4s;phd)XP2{vaO3Gj68Kba?;/NjbPGyqUu'N)ow;>>#2i0@ X-OpenPGP-Key-ID: 135E4D8D X-OpenPGP-Key-Fprint: 1B57EB95F6191D6C1056B6D3BFCA1BDA135E4D8D NNTP-Posting-Host: $$5lonjgdxpi7t8.extreme.x-privat.org Date: 10 May 2009 20:50:42 +0100 Organization: X-Privat.Org NNTP Server - http://www.x-privat.org Lines: 21 X-Authenticated-User: $$e0ys_5xxdmkbkyzv$y09 X-Complaints-To: abuse@x-privat.org Path: g2news2.google.com!news4.google.com!feeder.news-service.com!weretis.net!feeder2.news.weretis.net!news.swapon.de!x-privat.org!not-for-mail *Luka Djigas* wrote: > INTEGER, PARAMETER :: idp = KIND(1.0D) According to Chapman, it would be better to specify the numer of digits that you need instead of using "1.0D0" or "1.0E0", since the concept of single/double precision is different among compilers. This is an example: INTEGER, PARAMETER :: sp = SELECTED_REAL_KIND(p=6) INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(p=15) INTEGER, PARAMETER :: ep = SELECTED_REAL_KIND(p=18) INTEGER, PARAMETER :: qp = SELECTED_REAL_KIND(p=33) sp -> single precision, 32 bit dp -> double precision, 64 bit ep -> extended precision, 80 bit (only for x86) qp -> quadruple precision, 128 bit -- Lurkos