Fortran How Do I Determine Single-Precision Machine Constants in Fortran?

AI Thread Summary
The discussion centers on determining the "Single-Precision Machine Constants" (R1MACH) for a program written in Fortran, specifically for a desktop computer with an Intel Pentium Dual Core processor running Windows Vista. The user seeks assistance in calculating R1MACH values from 1 to 5, which include the smallest positive magnitude, largest magnitude, smallest relative spacing, largest relative spacing, and the logarithm base 10 of the base (B). The code references a framework for a portable library and cites relevant literature for further context. Participants are encouraged to provide insights or calculations to help resolve the user's issue with these machine constants.
cslam
Messages
1
Reaction score
0
Help!
I know almost nothing about Fortran but need to use a program by others. I encountered a problem in determining the "Single-Precision Machine Constants" for my desktop computer (intel pentium dual core 5200 2mb l2 2.5ghz 800 fsb with Window Vista). Please take a look at following part or comment in the code. Could anyone help me to determne R1MACH(1 to 5)?

C Single-Precision Machine Constants r1mach27
C R1MACH(1) = B**(EMIN-1), the smallest positive magnitude. r1mach28
C R1MACH(2) = B**EMAX*(1 - B**(-T)), the largest magnitude. r1mach29
C R1MACH(3) = B**(-T), the smallest relative spacing. r1mach30
C R1MACH(4) = B**(1-T), the largest relative spacing. r1mach31
C R1MACH(5) = LOG10(B) r1mach32
C***REFERENCES FOX, P.A., HALL, A.D., SCHRYER, N.L, *FRAMEWORK FOR r1mach33
C A PORTABLE LIBRARY*, ACM TRANSACTIONS ON MATHE- r1mach34
C MATICAL SOFTWARE, VOL. 4, NO. 2, JUNE 1978, r1mach35
C PP. 177-188. r1mach36
 
Technology news on Phys.org
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...

Similar threads

Back
Top