<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — switch for 'quad precision']]></title>
	<link rel="self" href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=346&amp;type=atom" />
	<updated>2015-04-01T23:19:53Z</updated>
	<generator>PunBB</generator>
	<id>http://forums.approximatrix.com/viewtopic.php?id=346</id>
		<entry>
			<title type="html"><![CDATA[Re: switch for 'quad precision']]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=1995#p1995" />
			<content type="html"><![CDATA[<p>Thanks guys. I am still learning about the latest from FORTRAN. I&nbsp; was introduced to FORTRAN 66 (I think it was), so some of this stuff is different from what I learned and old habits die hard.&nbsp; I will definitely have to make some changes based on these comments. I will also experiment with quad precision and test what the impact is.</p><p>Rod</p>]]></content>
			<author>
				<name><![CDATA[grogley]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3372</uri>
			</author>
			<updated>2015-04-01T23:19:53Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=1995#p1995</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: switch for 'quad precision']]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=1993#p1993" />
			<content type="html"><![CDATA[<p>I would second what Jeff is saying here. The function SQRT is a generic function and the compiler should automatically do the correct thing when a quad precision argument is passed. Similarly you should use generic versions of the other &quot;maths&quot; functions.</p><p>This works with LF95 too if you still want to use it as well.</p>]]></content>
			<author>
				<name><![CDATA[davidb]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3463</uri>
			</author>
			<updated>2015-04-01T17:04:53Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=1993#p1993</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: switch for 'quad precision']]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=1988#p1988" />
			<content type="html"><![CDATA[<p>Rod,</p><p>Generally speaking, I would suggest using the <em>SQRT</em> function rather than specifically calling <em>DSQRT</em> or similar.&nbsp; The Fortran runtime should detect the input type as quad precision when using <em>SQRT</em> and route it to the appropriate routine.&nbsp; As the documentation of <em>SQRT</em> says:</p><div class="quotebox"><blockquote><p>The return value is of type REAL or COMPLEX. The kind type parameter is the same as X.</p></blockquote></div><p>As for speed, I would expect a possible decrease in speed when using quad precision, but I really can&#039;t predict how much the effect would be.&nbsp; I would suggest trying a few simple example to get an idea.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2015-04-01T11:37:30Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=1988#p1988</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: switch for 'quad precision']]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=1986#p1986" />
			<content type="html"><![CDATA[<p>Sorry for dredging up this topic but I too am curious about quad precision. </p><p>If I run those compiler options, what about intrinsic functions used in the code like DSQRT, are there quad equivalent calls for these functions that. I don&#039;t see quad equivalents explicitly mentioned in the GNU documentation. Also, if using the compiler options like &quot;-freal-8-real-16&quot;, will the real*8 intrinsic functions automatically be converted to real*16 (assuming they exist)?</p><p>Finally, what performance differences will be observed between double and quad precision can I expect for 32 and 64 bit applications?</p><p>Thanks!<br />Rod</p>]]></content>
			<author>
				<name><![CDATA[grogley]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3372</uri>
			</author>
			<updated>2015-04-01T09:53:10Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=1986#p1986</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: switch for 'quad precision']]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=1411#p1411" />
			<content type="html"><![CDATA[<p>I think adding the option could make sense.&nbsp; In the meantime, you can manually add flags to take similar steps.&nbsp; In the Project Options window, you can open the Compiler Flags tab.&nbsp; In the Fortran Compiler box, you can enter any of the following flags:</p><div class="codebox"><pre><code>-freal-4-real-8
-freal-4-real-16
-freal-8-real-4
-freal-8-real-16</code></pre></div><p>The above flags would, respectively:</p><p>1. Promote single precision (KIND=4) reals to double precision (KIND=8)<br />2. Promote single precision (KIND=4) reals to quad precision (KIND=16)<br />3. Demote double precision (KIND=8) reals to single precision (KIND=4)<br />4. Promote double precision (KIND=8) reals to quad precision (KIND=16)</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2014-05-27T17:48:46Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=1411#p1411</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[switch for 'quad precision']]></title>
			<link rel="alternate" href="http://forums.approximatrix.com/viewtopic.php?pid=1410#p1410" />
			<content type="html"><![CDATA[<p>Before SF, I used lahey Fortran 95 v5.6 (LF95) extensively. With LF95, one can through a switch &#039;-quad&#039;, cause a&nbsp; &#039;double precision&#039;&nbsp; program to be compiled as a &#039;quad precision&#039; program. So therefore one can eventually see how the results would change if the computations are done in &#039;quad precision&#039;.</p><p>I think that an option to do this should be eventually included in SF.</p>]]></content>
			<author>
				<name><![CDATA[jbarbaste]]></name>
				<uri>http://forums.approximatrix.com/profile.php?id=3427</uri>
			</author>
			<updated>2014-05-27T14:52:21Z</updated>
			<id>http://forums.approximatrix.com/viewtopic.php?pid=1410#p1410</id>
		</entry>
</feed>
