Mercurial > octave-nkf
annotate libcruft/misc/d1mach.f @ 5103:e2ed74b9bfa0 after-gnuplot-split
[project @ 2004-12-28 02:43:01 by jwe]
author | jwe |
---|---|
date | Tue, 28 Dec 2004 02:43:01 +0000 |
parents | 337a09dd1c06 |
children | 32b15d5c3147 |
rev | line source |
---|---|
2425 | 1 double precision function d1mach (i) |
2 integer i | |
3 logical init | |
4 double precision dmach(5) | |
2621 | 5 save init, dmach |
2425 | 6 data init /.false./ |
7 if (.not. init) then | |
8 call machar (dmach(1), dmach(2), dmach(3), dmach(4), dmach(5)) | |
9 init = .true. | |
10 endif | |
11 if (i .lt. 1 .or. i .gt. 5) goto 999 | |
12 d1mach = dmach(i) | |
13 return | |
14 999 write(*,1999) i | |
15 1999 format(' d1mach - i out of bounds', i10) | |
16 call xstopx (' ') | |
17 d1mach = 0 | |
18 end |