GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
i1mach.f
Go to the documentation of this file.
1c Copyright (C) 1996-2025 The Octave Project Developers
2c
3c See the file COPYRIGHT.md in the top-level directory of this
4c distribution or <https://octave.org/copyright/>.
5c
6c This file is part of Octave.
7c
8c Octave is free software: you can redistribute it and/or modify it
9c under the terms of the GNU General Public License as published by
10c the Free Software Foundation, either version 3 of the License, or
11c (at your option) any later version.
12c
13c Octave is distributed in the hope that it will be useful, but
14c WITHOUT ANY WARRANTY; without even the implied warranty of
15c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16c GNU General Public License for more details.
17c
18c You should have received a copy of the GNU General Public License
19c along with Octave; see the file COPYING. If not, see
20c <https://www.gnu.org/licenses/>.
21c
22 integer function i1mach (i)
23 integer i, imach(16)
24 logical init
25 double precision dlamch
26 real slamch
27 external dlamch, slamch
28 save imach, init
29 data imach / 5, 6, 0, 6, 32, 4, 2, 31, 2147483647,
30 $ 2, 0, 0, 0, 0, 0, 0 /
31 data init /.false./
32 if (.not. init) then
33 imach(11) = slamch('n')
34 imach(12) = slamch('m')
35 imach(13) = slamch('l')
36 imach(14) = dlamch('n')
37 imach(15) = dlamch('m')
38 imach(16) = dlamch('l')
39 init = .true.
40 endif
41 if (i .lt. 1 .or. i .gt. 16) goto 999
42 i1mach = imach(i)
43 return
44 999 write (*, 1999) i
45 1999 format (' i1mach - i out of bounds', i10)
46 call xstopx (' ')
47 i1mach = 0
48 end
integer function i1mach(i)
Definition i1mach.f:23