annotate liboctave/lo-mappers.h @ 8920:eb63fbe60fab

update copyright notices
author John W. Eaton <jwe@octave.org>
date Sat, 07 Mar 2009 10:41:27 -0500
parents 935be827eaf8
children a48fba01e4ac
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1967
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
1 /*
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
2
7017
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
3 Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
8920
eb63fbe60fab update copyright notices
John W. Eaton <jwe@octave.org>
parents: 7922
diff changeset
4 2006, 2007, 2008 John W. Eaton
1967
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
5
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
6 This file is part of Octave.
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
7
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
8 Octave is free software; you can redistribute it and/or modify it
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6108
diff changeset
10 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6108
diff changeset
11 option) any later version.
1967
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
12
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
13 Octave is distributed in the hope that it will be useful, but WITHOUT
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
16 for more details.
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
17
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6108
diff changeset
19 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6108
diff changeset
20 <http://www.gnu.org/licenses/>.
1967
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
21
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
22 */
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
23
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
24 #if !defined (octave_liboctave_mappers_h)
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
25 #define octave_liboctave_mappers_h 1
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
26
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
27 #include "oct-cmplx.h"
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
28
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
29 // Double Precision
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
30 extern OCTAVE_API double arg (double x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
31 extern OCTAVE_API double conj (double x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
32 extern OCTAVE_API double fix (double x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
33 extern OCTAVE_API double imag (double x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
34 extern OCTAVE_API double real (double x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
35 extern OCTAVE_API double xround (double x);
7636
99c410f7f0b0 implement mapper function for banker's rounding
Jaroslav Hajek <highegg@gmail.com>
parents: 7017
diff changeset
36 extern OCTAVE_API double xroundb (double x);
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
37 extern OCTAVE_API double signum (double x);
7636
99c410f7f0b0 implement mapper function for banker's rounding
Jaroslav Hajek <highegg@gmail.com>
parents: 7017
diff changeset
38 extern OCTAVE_API double xtrunc (double x);
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
39 extern OCTAVE_API double xlog2 (double x);
7740
39930366b709 implement builtin log2
Jaroslav Hajek <highegg@gmail.com>
parents: 7636
diff changeset
40 extern OCTAVE_API Complex xlog2 (const Complex& x);
39930366b709 implement builtin log2
Jaroslav Hajek <highegg@gmail.com>
parents: 7636
diff changeset
41 extern OCTAVE_API double xlog2 (double x, int& exp);
39930366b709 implement builtin log2
Jaroslav Hajek <highegg@gmail.com>
parents: 7636
diff changeset
42 extern OCTAVE_API Complex xlog2 (const Complex& x, int& exp);
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
43 extern OCTAVE_API double xexp2 (double x);
1967
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
44
7922
935be827eaf8 error for NaN values in & and | expressions
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
45 // These are used by the BOOL_OP macros in mx-op-defs.h.
935be827eaf8 error for NaN values in & and | expressions
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
46 inline bool xisnan (bool) { return false; }
935be827eaf8 error for NaN values in & and | expressions
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
47 inline bool xisnan (char) { return false; }
935be827eaf8 error for NaN values in & and | expressions
John W. Eaton <jwe@octave.org>
parents: 7789
diff changeset
48
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
49 extern OCTAVE_API bool xisnan (double x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
50 extern OCTAVE_API bool xfinite (double x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
51 extern OCTAVE_API bool xisinf (double x);
3248
68259f410026 [project @ 1999-07-13 03:34:54 by jwe]
jwe
parents: 3156
diff changeset
52
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
53 extern OCTAVE_API bool octave_is_NA (double x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
54 extern OCTAVE_API bool octave_is_NaN_or_NA (double x) GCC_ATTR_DEPRECATED;
4025
cfb762dc9259 [project @ 2002-08-09 06:32:15 by jwe]
jwe
parents: 3777
diff changeset
55
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
56 extern OCTAVE_API double xmin (double x, double y);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
57 extern OCTAVE_API double xmax (double x, double y);
1967
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
58
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
59 extern OCTAVE_API Complex acos (const Complex& x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
60 extern OCTAVE_API Complex acosh (const Complex& x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
61 extern OCTAVE_API Complex asin (const Complex& x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
62 extern OCTAVE_API Complex asinh (const Complex& x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
63 extern OCTAVE_API Complex atan (const Complex& x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
64 extern OCTAVE_API Complex atanh (const Complex& x);
3777
b4f260ddd748 [project @ 2001-02-06 15:57:23 by jwe]
jwe
parents: 3776
diff changeset
65
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
66 extern OCTAVE_API Complex ceil (const Complex& x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
67 extern OCTAVE_API Complex fix (const Complex& x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
68 extern OCTAVE_API Complex floor (const Complex& x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
69 extern OCTAVE_API Complex xround (const Complex& x);
7636
99c410f7f0b0 implement mapper function for banker's rounding
Jaroslav Hajek <highegg@gmail.com>
parents: 7017
diff changeset
70 extern OCTAVE_API Complex xroundb (const Complex& x);
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
71 extern OCTAVE_API Complex signum (const Complex& x);
3776
7ed917c1ca60 [project @ 2001-02-06 05:21:32 by jwe]
jwe
parents: 3775
diff changeset
72
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
73 extern OCTAVE_API bool xisnan (const Complex& x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
74 extern OCTAVE_API bool xfinite (const Complex& x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
75 extern OCTAVE_API bool xisinf (const Complex& x);
3248
68259f410026 [project @ 1999-07-13 03:34:54 by jwe]
jwe
parents: 3156
diff changeset
76
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
77 extern OCTAVE_API bool octave_is_NA (const Complex& x);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
78 extern OCTAVE_API bool octave_is_NaN_or_NA (const Complex& x);
4469
53ee020af847 [project @ 2003-07-26 03:45:10 by jwe]
jwe
parents: 4065
diff changeset
79
6108
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
80 extern OCTAVE_API Complex xmin (const Complex& x, const Complex& y);
143b556ce725 [project @ 2006-10-27 01:45:54 by jwe]
jwe
parents: 5904
diff changeset
81 extern OCTAVE_API Complex xmax (const Complex& x, const Complex& y);
3248
68259f410026 [project @ 1999-07-13 03:34:54 by jwe]
jwe
parents: 3156
diff changeset
82
7789
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
83 // Single Precision
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
84 extern OCTAVE_API float arg (float x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
85 extern OCTAVE_API float conj (float x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
86 extern OCTAVE_API float fix (float x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
87 extern OCTAVE_API float imag (float x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
88 extern OCTAVE_API float real (float x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
89 extern OCTAVE_API float xround (float x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
90 extern OCTAVE_API float xroundb (float x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
91 extern OCTAVE_API float signum (float x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
92 extern OCTAVE_API float xtrunc (float x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
93 extern OCTAVE_API float xlog2 (float x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
94 extern OCTAVE_API FloatComplex xlog2 (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
95 extern OCTAVE_API float xlog2 (float x, int& exp);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
96 extern OCTAVE_API FloatComplex xlog2 (const FloatComplex& x, int& exp);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
97 extern OCTAVE_API float xexp2 (float x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
98
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
99 extern OCTAVE_API bool xisnan (float x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
100 extern OCTAVE_API bool xfinite (float x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
101 extern OCTAVE_API bool xisinf (float x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
102
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
103 extern OCTAVE_API bool octave_is_NA (float x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
104 extern OCTAVE_API bool octave_is_NaN_or_NA (float x) GCC_ATTR_DEPRECATED;
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
105
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
106 extern OCTAVE_API float xmin (float x, float y);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
107 extern OCTAVE_API float xmax (float x, float y);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
108
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
109 extern OCTAVE_API FloatComplex acos (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
110 extern OCTAVE_API FloatComplex acosh (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
111 extern OCTAVE_API FloatComplex asin (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
112 extern OCTAVE_API FloatComplex asinh (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
113 extern OCTAVE_API FloatComplex atan (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
114 extern OCTAVE_API FloatComplex atanh (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
115
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
116 extern OCTAVE_API FloatComplex ceil (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
117 extern OCTAVE_API FloatComplex fix (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
118 extern OCTAVE_API FloatComplex floor (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
119 extern OCTAVE_API FloatComplex xround (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
120 extern OCTAVE_API FloatComplex xroundb (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
121 extern OCTAVE_API FloatComplex signum (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
122
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
123 extern OCTAVE_API bool xisnan (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
124 extern OCTAVE_API bool xfinite (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
125 extern OCTAVE_API bool xisinf (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
126
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
127 extern OCTAVE_API bool octave_is_NA (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
128 extern OCTAVE_API bool octave_is_NaN_or_NA (const FloatComplex& x);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
129
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
130 extern OCTAVE_API FloatComplex xmin (const FloatComplex& x, const FloatComplex& y);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
131 extern OCTAVE_API FloatComplex xmax (const FloatComplex& x, const FloatComplex& y);
82be108cc558 First attempt at single precision tyeps
David Bateman <dbateman@free.fr>
parents: 7740
diff changeset
132
1967
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
133 #endif
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
134
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
135 /*
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
136 ;;; Local Variables: ***
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
137 ;;; mode: C++ ***
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
138 ;;; End: ***
4cb6aaa0f2c7 [project @ 1996-02-17 02:54:24 by jwe]
jwe
parents:
diff changeset
139 */