GNU Octave
4.4.1
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-2018 John W. Eaton
2
c
3
c This file is part of Octave.
4
c
5
c Octave is free software: you can redistribute it and/or modify it
6
c under the terms of the GNU General Public License as published by
7
c the Free Software Foundation, either version 3 of the License, or
8
c (at your option) any later version.
9
c
10
c Octave is distributed in the hope that it will be useful, but
11
c WITHOUT ANY WARRANTY; without even the implied warranty of
12
c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
c GNU General Public License for more details.
14
c
15
c You should have received a copy of the GNU General Public License
16
c along with Octave; see the file COPYING. If not, see
17
c <https://www.gnu.org/licenses/>.
18
c
19
integer
function
i1mach
(i)
20
integer
i, imach(16)
21
logical
init
22
double precision
dlamch
23
real
slamch
24
external
dlamch, slamch
25
save
imach, init
26
data
imach / 5, 6, 0, 6, 32, 4, 2, 31, 2147483647,
27
$ 2, 0, 0, 0, 0, 0, 0 /
28
data
init /.false./
29
if
(.not. init)
then
30
imach(11) = slamch(
'n'
)
31
imach(12) = slamch(
'm'
)
32
imach(13) = slamch(
'l'
)
33
imach(14) = dlamch(
'n'
)
34
imach(15) = dlamch(
'm'
)
35
imach(16) = dlamch(
'l'
)
36
init = .true.
37
endif
38
if
(i .lt. 1 .or. i .gt. 16)
goto
999
39
i1mach
= imach(i)
40
return
41
999
write
(*, 1999) i
42
1999
format
(
' i1mach - i out of bounds'
, i10)
43
call
xstopx (
' '
)
44
i1mach
= 0
45
end
i1mach
integer function i1mach(i)
Definition:
i1mach.f:20
liboctave
util
i1mach.f
Generated on Sat Sep 1 2018 14:01:46 for GNU Octave by
1.8.14