GNU Octave
4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
d1mach.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
double precision
function
d1mach
(i)
20
integer
i
21
logical
init
22
double precision
dmach(5)
23
double precision
dlamch
24
external
dlamch
25
save
init, dmach
26
data
init /.false./
27
if
(.not. init)
then
28
dmach(1) = dlamch(
'u'
)
29
dmach(2) = dlamch(
'o'
)
30
dmach(3) = dlamch(
'e'
)
31
dmach(4) = dlamch(
'p'
)
32
dmach(5) = log10(dlamch(
'b'
))
33
init = .true.
34
endif
35
if
(i .lt. 1 .or. i .gt. 5)
goto
999
36
d1mach
= dmach(i)
37
return
38
999
write
(*, 1999) i
39
1999
format
(
' d1mach - i out of bounds'
, i10)
40
call
xstopx (
' '
)
41
d1mach
= 0
42
end
d1mach
double precision function d1mach(i)
Definition:
d1mach.f:20
liboctave
util
d1mach.f
Generated on Sat Sep 1 2018 14:01:46 for GNU Octave by
1.8.14