GNU Octave
9.1.0
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-2024 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
double precision
function
d1mach
(i)
23
integer
i
24
logical
init
25
double precision
dmach(5)
26
double precision
dlamch
27
external
dlamch
28
save
init, dmach
29
data
init /.false./
30
if
(.not. init)
then
31
dmach(1) = dlamch(
'u'
)
32
dmach(2) = dlamch(
'o'
)
33
dmach(3) = dlamch(
'e'
)
34
dmach(4) = dlamch(
'p'
)
35
dmach(5) = log10(dlamch(
'b'
))
36
init = .true.
37
endif
38
if
(i .lt. 1 .or. i .gt. 5)
goto
999
39
d1mach
= dmach(i)
40
return
41
999
write
(*, 1999) i
42
1999
format
(
' d1mach - i out of bounds'
, i10)
43
call
xstopx (
' '
)
44
d1mach
= 0
45
end
d1mach
double precision function d1mach(i)
Definition:
d1mach.f:23
liboctave
util
d1mach.f
Generated on Sun Mar 17 2024 22:36:52 for GNU Octave by
1.9.1