Commit 410c0dfaf8eea8efccb308511ddfb16021214225
1 parent
b930260397
Exists in
master
and in
3 other branches
git-svn-id: https://lxsd.femto-st.fr/svn/fvn@44 b657c933-2333-4658-acf2-d3c7c2708721
Showing 3 changed files with 4 additions and 81 deletions Side-by-side Diff
fvn_fnlib/Makefile
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 | fvn_fnlib.o gamic.o gami.o gamit.o \ |
46 | 46 | gamma.o gamr.o i1mach.o i8save.o \ |
47 | 47 | initds.o inits.o nerror.o poch1.o \ |
48 | -poch.o psi.o r1mach.o r9admp.o \ | |
48 | +poch.o psi.o r9admp.o \ | |
49 | 49 | r9aimp.o r9atn1.o r9chm.o r9chu.o \ |
50 | 50 | r9gaml.o r9gmic.o r9gmit.o r9knus.o \ |
51 | 51 | r9lgic.o r9lgit.o r9lgmc.o r9ln2r.o \ |
fvn_fnlib/r1mach.f90
1 | -!DECK R1MACH | |
2 | - REAL FUNCTION R1MACH (I) | |
3 | - IMPLICIT NONE | |
4 | - INTEGER :: I | |
5 | - REAL :: B, X | |
6 | -!***BEGIN PROLOGUE R1MACH | |
7 | -!***PURPOSE Return floating point machine dependent constants. | |
8 | -!***LIBRARY SLATEC | |
9 | -!***CATEGORY R1 | |
10 | -!***TYPE SINGLE PRECISION (R1MACH-S, D1MACH-D) | |
11 | -!***KEYWORDS MACHINE CONSTANTS | |
12 | -!***AUTHOR Fox, P. A., (Bell Labs) | |
13 | -! Hall, A. D., (Bell Labs) | |
14 | -! Schryer, N. L., (Bell Labs) | |
15 | -!***DESCRIPTION | |
16 | -! | |
17 | -! R1MACH can be used to obtain machine-dependent parameters for the | |
18 | -! local machine environment. It is a function subprogram with one | |
19 | -! (input) argument, and can be referenced as follows: | |
20 | -! | |
21 | -! A = R1MACH(I) | |
22 | -! | |
23 | -! where I=1,...,5. The (output) value of A above is determined by | |
24 | -! the (input) value of I. The results for various values of I are | |
25 | -! discussed below. | |
26 | -! | |
27 | -! R1MACH(1) = B**(EMIN-1), the smallest positive magnitude. | |
28 | -! R1MACH(2) = B**EMAX*(1 - B**(-T)), the largest magnitude. | |
29 | -! R1MACH(3) = B**(-T), the smallest relative spacing. | |
30 | -! R1MACH(4) = B**(1-T), the largest relative spacing. | |
31 | -! R1MACH(5) = LOG10(B) | |
32 | -! | |
33 | -! Assume single precision numbers are represented in the T-digit, | |
34 | -! base-B form | |
35 | -! | |
36 | -! sign (B**E)*( (X(1)/B) + ... + (X(T)/B**T) ) | |
37 | -! | |
38 | -! where 0 .LE. X(I) .LT. B for I=1,...,T, 0 .LT. X(1), and | |
39 | -! EMIN .LE. E .LE. EMAX. | |
40 | -! | |
41 | -! The values of B, T, EMIN and EMAX are provided in I1MACH as | |
42 | -! follows: | |
43 | -! I1MACH(10) = B, the base. | |
44 | -! I1MACH(11) = T, the number of base-B digits. | |
45 | -! I1MACH(12) = EMIN, the smallest exponent E. | |
46 | -! I1MACH(13) = EMAX, the largest exponent E. | |
47 | -! | |
48 | -! | |
49 | -!***REFERENCES P. A. Fox, A. D. Hall and N. L. Schryer, Framework for | |
50 | -! a portable library, ACM Transactions on Mathematical | |
51 | -! Software 4, 2 (June 1978), pp. 177-188. | |
52 | -!***ROUTINES CALLED XERMSG | |
53 | -!***REVISION HISTORY (YYMMDD) | |
54 | -! 790101 DATE WRITTEN | |
55 | -! 960329 Modified for Fortran 90 (BE after suggestions by EG) | |
56 | -!***END PROLOGUE R1MACH | |
57 | -! | |
58 | - X = 1.0 | |
59 | - B = RADIX(X) | |
60 | - SELECT CASE (I) | |
61 | - CASE (1) | |
62 | - R1MACH = B**(MINEXPONENT(X)-1) ! the smallest positive magnitude. | |
63 | - CASE (2) | |
64 | - R1MACH = HUGE(X) ! the largest magnitude. | |
65 | - CASE (3) | |
66 | - R1MACH = B**(-DIGITS(X)) ! the smallest relative spacing. | |
67 | - CASE (4) | |
68 | - R1MACH = B**(1-DIGITS(X)) ! the largest relative spacing. | |
69 | - CASE (5) | |
70 | - R1MACH = LOG10(B) | |
71 | - CASE DEFAULT | |
72 | - WRITE (*, FMT = 9000) | |
73 | - 9000 FORMAT ('1ERROR 1 IN R1MACH - I OUT OF BOUNDS') | |
74 | - STOP | |
75 | - END SELECT | |
76 | - RETURN | |
77 | - END |
fvn_sparse/Makefile