[CSC 335] Sad Day...

Andrew J. Pounds pounds_aj at mercer.edu
Sat Sep 14 02:21:34 EDT 2013


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).

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...

REAL (KIND=16) :: quadvalue

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?

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.

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

REAL (KIND=10)

Here is a little something for you to try this weekend if you are 
bored.  Run the following fortran program
and see if you can tell me how many bits are in the mantissa and how 
many decimal places are accurate.

program quadtest

real (kind=10) :: quadvalue, onehalf

onehalf = 0.5Q0
quadvalue = 1.0

do i = 1, 100
    print *, i,  quadvalue
    quadvalue = quadvalue + onehalf**i
enddo

end program quadtest



-- 
Andrew J. Pounds, Ph.D.  (pounds_aj at mercer.edu)
Professor of Chemistry and Computer Science
Mercer University,  Macon, GA 31207   (478) 301-5627
http://faculty.mercer.edu/pounds_aj

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc335/attachments/20130914/2e23ca4b/attachment.html>


More information about the csc335 mailing list