Mercurial > octave
annotate liboctave/util/d1mach.f @ 31191:bb9d776eafac stable
Fix wrong color in PDF printout of some latex strings (bug #62884)
* octave-svgconvert (draw): For "rect" elements only set brush color if
necessary and eventually restore to previous color.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Sun, 14 Aug 2022 18:24:07 +0200 |
parents | 796f54d4ddbf |
children | 597f3ee61a48 |
rev | line source |
---|---|
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
1 c Copyright (C) 1996-2022 The Octave Project Developers |
27918
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
2 c |
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
3 c See the file COPYRIGHT.md in the top-level directory of this |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 c distribution or <https://octave.org/copyright/>. |
24537
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
5 c |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
6 c This file is part of Octave. |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
7 c |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
8 c Octave is free software: you can redistribute it and/or modify it |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
9 c under the terms of the GNU General Public License as published by |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
10 c the Free Software Foundation, either version 3 of the License, or |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
11 c (at your option) any later version. |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
12 c |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
13 c Octave is distributed in the hope that it will be useful, but |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
14 c WITHOUT ANY WARRANTY; without even the implied warranty of |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
15 c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
16 c GNU General Public License for more details. |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
17 c |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
18 c You should have received a copy of the GNU General Public License |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
19 c along with Octave; see the file COPYING. If not, see |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
20 c <https://www.gnu.org/licenses/>. |
11729ca6eb81
Add GPL license header to more Octave source files.
Rik <rik@octave.org>
parents:
23426
diff
changeset
|
21 c |
2425 | 22 double precision function d1mach (i) |
23 integer i | |
24 logical init | |
25 double precision dmach(5) | |
9372
32b15d5c3147
implement d1mach, i1mach, and r1mach using slamch and dlamch from lapack
John W. Eaton <jwe@octave.org>
parents:
2621
diff
changeset
|
26 double precision dlamch |
32b15d5c3147
implement d1mach, i1mach, and r1mach using slamch and dlamch from lapack
John W. Eaton <jwe@octave.org>
parents:
2621
diff
changeset
|
27 external dlamch |
2621 | 28 save init, dmach |
2425 | 29 data init /.false./ |
30 if (.not. init) then | |
9372
32b15d5c3147
implement d1mach, i1mach, and r1mach using slamch and dlamch from lapack
John W. Eaton <jwe@octave.org>
parents:
2621
diff
changeset
|
31 dmach(1) = dlamch ('u') |
32b15d5c3147
implement d1mach, i1mach, and r1mach using slamch and dlamch from lapack
John W. Eaton <jwe@octave.org>
parents:
2621
diff
changeset
|
32 dmach(2) = dlamch ('o') |
32b15d5c3147
implement d1mach, i1mach, and r1mach using slamch and dlamch from lapack
John W. Eaton <jwe@octave.org>
parents:
2621
diff
changeset
|
33 dmach(3) = dlamch ('e') |
32b15d5c3147
implement d1mach, i1mach, and r1mach using slamch and dlamch from lapack
John W. Eaton <jwe@octave.org>
parents:
2621
diff
changeset
|
34 dmach(4) = dlamch ('p') |
32b15d5c3147
implement d1mach, i1mach, and r1mach using slamch and dlamch from lapack
John W. Eaton <jwe@octave.org>
parents:
2621
diff
changeset
|
35 dmach(5) = log10 (dlamch ('b')) |
2425 | 36 init = .true. |
37 endif | |
9372
32b15d5c3147
implement d1mach, i1mach, and r1mach using slamch and dlamch from lapack
John W. Eaton <jwe@octave.org>
parents:
2621
diff
changeset
|
38 if (i .lt. 1 .or. i .gt. 5) goto 999 |
2425 | 39 d1mach = dmach(i) |
40 return | |
9372
32b15d5c3147
implement d1mach, i1mach, and r1mach using slamch and dlamch from lapack
John W. Eaton <jwe@octave.org>
parents:
2621
diff
changeset
|
41 999 write (*, 1999) i |
32b15d5c3147
implement d1mach, i1mach, and r1mach using slamch and dlamch from lapack
John W. Eaton <jwe@octave.org>
parents:
2621
diff
changeset
|
42 1999 format (' d1mach - i out of bounds', i10) |
2425 | 43 call xstopx (' ') |
44 d1mach = 0 | |
45 end |