GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
i1mach.f
Go to the documentation of this file.
1 c Copyright (C) 1996-2021 The Octave Project Developers
2 c
3 c See the file COPYRIGHT.md in the top-level directory of this
4 c distribution or <https://octave.org/copyright/>.
5 c
6 c This file is part of Octave.
7 c
8 c Octave is free software: you can redistribute it and/or modify it
9 c under the terms of the GNU General Public License as published by
10 c the Free Software Foundation, either version 3 of the License, or
11 c (at your option) any later version.
12 c
13 c Octave is distributed in the hope that it will be useful, but
14 c WITHOUT ANY WARRANTY; without even the implied warranty of
15 c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 c GNU General Public License for more details.
17 c
18 c You should have received a copy of the GNU General Public License
19 c along with Octave; see the file COPYING. If not, see
20 c <https://www.gnu.org/licenses/>.
21 c
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