<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="serif">So on Thursday of this week I recycled the first
computer I got from an externally funded grant. It was a Sun E250
server. Cost over $20K at the time. I turned it off two years
ago because it was just to slow for things I need to do now (it
was 13 years old).<br>
<br>
This evening, however, I ran into some old code that I wrote for
that system to test some work that required a great deal of
numerical precision. My fortran code had statements like this in
it...<br>
<br>
REAL (KIND=16) :: quadvalue<br>
<br>
Yep -- that's right -- quadruple precision. My heart sank - had I
just recycled the only machine that I had that would do quadruple
precision arithmetic (128 bit machine numbers) in hardware?<br>
<br>
While I have access to quad precision on the IBM systems at the
University of Miami, I was certain that I had just shot myself in
the foot because I knew that my "commercial grade" compiler from
the Portland group did not yet support quadruple precision. <br>
<br>
I did a little searching on the internet, and the newest versions
of gfortran do support quadprecision (although it may not be done
in hardware). We do not have a compiler available to us on the
CompSci machines that will do that. We do, however, have the
ability to use 80 bit machine numbers <br>
</font><br>
<font face="serif"><font face="serif">REAL (KIND=10)<br>
<br>
Here is a little something for you to try this weekend if you
are bored. Run the following fortran program<br>
and see if you can tell me how many bits are in the mantissa and
how many decimal places are accurate.<br>
<br>
</font></font><tt>program quadtest</tt><tt><br>
</tt><tt><br>
</tt><tt>real (kind=10) :: quadvalue, onehalf </tt><tt><br>
</tt><tt><br>
</tt><tt>onehalf = 0.5Q0 </tt><tt><br>
</tt><tt>quadvalue = 1.0 </tt><tt><br>
</tt><tt><br>
</tt><tt>do i = 1, </tt><tt>100</tt><tt><br>
</tt><tt> print *, i, quadvalue</tt><tt><br>
</tt><tt> quadvalue = quadvalue + onehalf**i</tt><tt><br>
</tt><tt>enddo </tt><tt><br>
</tt><tt><br>
</tt><tt>end program quadtest</tt><font face="serif"><font
face="serif"><br>
<br>
<br>
</font> <br>
</font>
<pre class="moz-signature" cols="72">--
Andrew J. Pounds, Ph.D. (<a class="moz-txt-link-abbreviated" href="mailto:pounds_aj@mercer.edu">pounds_aj@mercer.edu</a>)
Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
<a class="moz-txt-link-freetext" href="http://faculty.mercer.edu/pounds_aj">http://faculty.mercer.edu/pounds_aj</a>
</pre>
</body>
</html>