Newsgroups: comp.lang.fortran
From: Richard Maine <ma...@altair.dfrc.nasa.gov>
Date: 06 Sep 2000 14:07:30 -0700
Local: Wed, Sep 6 2000 5:07 pm
Subject: Re: ? How to have a FORTRAN function emulate flops for desired digits
Cheng Cosine <acos...@yahoo.com> writes: Whatever the machine offers. Some support the IEEE 80-bit and 128-bit > Would you give some examples about other precisions that some compilers > can offer other than the standard IEEE SP/DP? formats. Then there are the VAX formats. And the IBM mainframe ones. And the Cray ones. That's all among machines currently in fairly common use. No need to even bring up the old CDC 60-bit formats, and the 36- and 48-bit formats used on some other old machines - you aren't likely to find f90 compilers on those machines (you'd have a hard enough time finding the machines at all). The IEEE formats are certainly the most common on current machines, > From what I learned from some numerical analysis books, the Yes, those are two of the examples. > floating point system is machine dependent. Say there are other > system used in Cray and IBM mainframe that are other than the > IEEE SP/DP system. > > > Single precision has 6 significant digits Frankly not worth my trouble. See first para. The 64-bit systems like the > > > while double precision has 16. > > That depends on the compiler. These values are not correct for all compilers. > For Lahey FORTRAN, that seems to be. Can you give the values for other compilers? Crays are likely to have numbers more like the 16 for single precision and something bigger (I don't know what) for double. > I know that declaration [selected_real_kind], but that is not what I I'm not sure how significant digits effect flops (perhaps I need to > want. I'd like to show my student about how limited significant > digits can effect the flops. So I need exectly 3, 4, or 10, or > whatever digits that the hardware does not support though. take your course - I thought a flop was a floating point operation in whatever precision it was in), but in any case.. If the hardware doesn't support it, then the compiler isn't likely to > Can you give me a FORTRAN90 code as an example? No way. Its also a big job to do as a user. Perhaps someone might have already done such a thing that they are willing to share. That's possible. But there's no way I'm likely to try to do it as an answer to a usenet posting. You'd have to go through and define each operation (including extensions of any intrinsics that you wanted to use). As long as the precision you wanted was less than the max hardware-supported one, it would probably be easiest to use the hardware-supported operations and then truncate the results. You could look at Walt's big_integer (or however its spelled) module for -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||