annotate main/fixed/src/fixedComplex.h @ 9481:d84d2fea3c90 octave-forge

Re-enable compilation of fixed package
author jordigh
date Wed, 22 Feb 2012 22:07:33 +0000
parents f8d77845533f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
1 /*
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
2
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
3 Copyright (C) 2003 Motorola Inc
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
4 Copyright (C) 2003 David Bateman
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
5
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
6 This program is free software; you can redistribute it and/or modify it
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
8 Free Software Foundation; either version 2, or (at your option) any
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
9 later version.
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
10
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
11 This program is distributed in the hope that it will be useful, but WITHOUT
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
14 for more details.
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
15
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
4404
2de537641f94 More copyright updates
adb014
parents: 3272
diff changeset
17 along with this program; see the file COPYING. If not, see
2de537641f94 More copyright updates
adb014
parents: 3272
diff changeset
18 <http://www.gnu.org/licenses/>.
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
19
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
20 In addition to the terms of the GPL, you are permitted to link
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
21 this program with any Open Source program, as defined by the
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
22 Open Source Initiative (www.opensource.org)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
23
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
24 */
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
25
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
26 #if !defined (__fixed_complex_h)
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
27 #define __fixed_complex_h 1
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
28
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
29 #include <complex>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
30 #include <octave/oct-cmplx.h>
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
31 #include "int/fixed.h"
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
32
3065
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
33 class OCTAVE_FIXED_API FixedPointComplex : public std::complex<FixedPoint>
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
34 {
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
35 public:
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
36
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
37 FixedPointComplex (void) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
38 std::complex<FixedPoint> (FixedPoint(), FixedPoint()) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
39
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
40 FixedPointComplex (const std::complex<FixedPoint> &c) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
41 std::complex<FixedPoint> (c) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
42
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
43 FixedPointComplex (const FixedPoint& f) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
44 std::complex<FixedPoint> (f, FixedPoint(f.getintsize(),f.getdecsize())) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
45
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
46 FixedPointComplex (const int x) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
47 std::complex<FixedPoint> (FixedPoint (x), FixedPoint ()) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
48
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
49 FixedPointComplex (const double x) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
50 std::complex<FixedPoint> (FixedPoint (x), FixedPoint ()) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
51
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
52 FixedPointComplex (const FixedPoint& r, const FixedPoint& i) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
53 std::complex<FixedPoint> (r, i) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
54
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
55 FixedPointComplex (const FixedPointComplex &c) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
56 std::complex<FixedPoint> (c) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
57
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
58 FixedPointComplex (const unsigned int& is, const unsigned int& ds,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
59 const FixedPoint& d) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
60 std::complex<FixedPoint> (FixedPoint(is,ds,d), FixedPoint(is,ds)) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
61
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
62 FixedPointComplex (const unsigned int& is, const unsigned int& ds) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
63 std::complex<FixedPoint> (FixedPoint(is,ds), FixedPoint(is,ds)) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
64
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
65 FixedPointComplex (const unsigned int& is, const unsigned int& ds,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
66 const FixedPoint& r, const FixedPoint& i) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
67 std::complex<FixedPoint> (FixedPoint(is,ds,r), FixedPoint(is,ds,i)) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
68
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
69 FixedPointComplex (const unsigned int& is, const unsigned int& ds,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
70 const FixedPointComplex& c) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
71 std::complex<FixedPoint> (FixedPoint(is,ds,c.real()),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
72 FixedPoint(is,ds,c.imag())) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
73
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
74 FixedPointComplex (const unsigned int& is, const unsigned int& ds,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
75 const double& d) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
76 std::complex<FixedPoint> (FixedPoint(is,ds,d), FixedPoint(is,ds)) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
77
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
78 FixedPointComplex (const unsigned int& is, const unsigned int& ds,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
79 const Complex& c) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
80 std::complex<FixedPoint> (FixedPoint(is,ds,c.real()),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
81 FixedPoint(is,ds,c.imag())) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
82
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
83 FixedPointComplex (const unsigned int& is, const unsigned int& ds,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
84 const Complex& a, const Complex& b) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
85 std::complex<FixedPoint> (FixedPoint(is, ds, (unsigned int)a.real(),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
86 (unsigned int)b.real()),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
87 FixedPoint(is, ds, (unsigned int)a.imag(),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
88 (unsigned int)b.imag())) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
89
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
90 FixedPointComplex (const unsigned int& is, const unsigned int& ds,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
91 const double& r, const double &i) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
92 std::complex<FixedPoint> (FixedPoint(is, ds, r), FixedPoint(is, ds, i)) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
93
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
94 FixedPointComplex (const Complex& is, const Complex& ds) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
95 std::complex<FixedPoint> (FixedPoint((int)is.real(), (int)ds.real()),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
96 FixedPoint((int)is.imag(), (int)ds.imag())) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
97
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
98 FixedPointComplex (const Complex& is, const Complex& ds, const double& d) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
99 std::complex<FixedPoint> (FixedPoint((int)is.real(), (int)ds.real(),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
100 d),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
101 FixedPoint((int)is.imag(), (int)ds.imag())) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
102
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
103 FixedPointComplex (const Complex& is, const Complex& ds, const Complex& c) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
104 std::complex<FixedPoint> (FixedPoint((int)is.real(), (int)ds.real(),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
105 c.real()),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
106 FixedPoint((int)is.imag(), (int)ds.imag(),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
107 c.imag())) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
108
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
109 FixedPointComplex (const Complex& is, const Complex& ds,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
110 const FixedPointComplex& c) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
111 std::complex<FixedPoint> (FixedPoint((int)is.real(), (int)ds.real(),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
112 c.real()),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
113 FixedPoint((int)is.imag(), (int)ds.imag(),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
114 c.imag())) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
115
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
116 FixedPointComplex (const Complex& is, const Complex& ds,
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
117 const Complex& a, const Complex& b) :
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
118 std::complex<FixedPoint> (FixedPoint((int)is.real(), (int)ds.real(),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
119 (unsigned int)a.real(),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
120 (unsigned int)b.real()),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
121 FixedPoint((int)is.imag(), (int)ds.imag(),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
122 (unsigned int)a.imag(),
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
123 (unsigned int)b.imag())) { }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
124
9481
d84d2fea3c90 Re-enable compilation of fixed package
jordigh
parents: 5248
diff changeset
125 operator bool () const { return fixedpoint() != 0.0; }
d84d2fea3c90 Re-enable compilation of fixed package
jordigh
parents: 5248
diff changeset
126
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
127 Complex sign (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
128 Complex getdecsize (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
129 Complex getintsize (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
130 Complex getnumber (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
131 Complex fixedpoint (void) const;
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
132 FixedPointComplex chdecsize (const Complex n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
133 FixedPointComplex chintsize (const Complex n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
134 FixedPointComplex incdecsize (const Complex n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
135 FixedPointComplex incdecsize ();
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
136 FixedPointComplex incintsize (const Complex n);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
137 FixedPointComplex incintsize ();
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
138
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
139 friend Complex fixedpoint (const FixedPointComplex &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
140 friend Complex sign (const FixedPointComplex &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
141 friend Complex getintsize (const FixedPointComplex &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
142 friend Complex getdecsize (const FixedPointComplex &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
143 friend Complex getnumber (const FixedPointComplex &x);
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
144
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
145 // FixedPointComplex operators
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
146
3065
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
147 friend OCTAVE_FIXED_API FixedPointComplex operator ! (const FixedPointComplex &x);
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
148
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
149 // FixedPointComplex mathematic functions
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
150
3065
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
151 friend OCTAVE_FIXED_API FixedPoint real (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
152 friend OCTAVE_FIXED_API FixedPoint imag (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
153 friend OCTAVE_FIXED_API FixedPointComplex conj (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
154 friend OCTAVE_FIXED_API FixedPoint abs (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
155 friend OCTAVE_FIXED_API FixedPoint norm (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
156 friend OCTAVE_FIXED_API FixedPoint arg (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
157 friend OCTAVE_FIXED_API FixedPointComplex polar (const FixedPoint &r, const FixedPoint &p);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
158 friend OCTAVE_FIXED_API FixedPointComplex cos (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
159 friend OCTAVE_FIXED_API FixedPointComplex cosh (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
160 friend OCTAVE_FIXED_API FixedPointComplex sin (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
161 friend OCTAVE_FIXED_API FixedPointComplex sinh (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
162 friend OCTAVE_FIXED_API FixedPointComplex tan (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
163 friend OCTAVE_FIXED_API FixedPointComplex tanh (const FixedPointComplex &x);
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
164
3065
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
165 friend OCTAVE_FIXED_API FixedPointComplex sqrt (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
166 friend OCTAVE_FIXED_API FixedPointComplex pow (const FixedPointComplex &w, const int y);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
167 friend OCTAVE_FIXED_API FixedPointComplex pow (const FixedPointComplex &x,
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
168 const FixedPoint& y);
3065
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
169 friend OCTAVE_FIXED_API FixedPointComplex pow (const FixedPoint &x,
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
170 const FixedPointComplex& y);
3065
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
171 friend OCTAVE_FIXED_API FixedPointComplex pow (const FixedPointComplex &x,
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
172 const FixedPointComplex &y);
3065
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
173 friend OCTAVE_FIXED_API FixedPointComplex exp (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
174 friend OCTAVE_FIXED_API FixedPointComplex log (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
175 friend OCTAVE_FIXED_API FixedPointComplex log10 (const FixedPointComplex &x);
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
176
3065
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
177 friend OCTAVE_FIXED_API FixedPointComplex round (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
178 friend OCTAVE_FIXED_API FixedPointComplex rint (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
179 friend OCTAVE_FIXED_API FixedPointComplex floor (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
180 friend OCTAVE_FIXED_API FixedPointComplex ceil (const FixedPointComplex &x);
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
181 };
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
182
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
183 inline Complex fixedpoint (const FixedPointComplex &x) {
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
184 return (x.fixedpoint());
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
185 }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
186
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
187 inline Complex sign (const FixedPointComplex &x) {
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
188 return (x.sign());
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
189 }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
190
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
191 inline Complex getintsize (const FixedPointComplex &x) {
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
192 return (x.getintsize());
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
193 }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
194
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
195 inline Complex getdecsize (const FixedPointComplex &x) {
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
196 return (x.getdecsize());
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
197 }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
198
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
199 inline Complex getnumber (const FixedPointComplex &x) {
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
200 return (x.getnumber());
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
201 }
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
202
5248
f8d77845533f Changes for compilation with 3.1.51+
adb014
parents: 4404
diff changeset
203 inline bool xisnan (const FixedPointComplex &x) {
f8d77845533f Changes for compilation with 3.1.51+
adb014
parents: 4404
diff changeset
204 return false;
f8d77845533f Changes for compilation with 3.1.51+
adb014
parents: 4404
diff changeset
205 }
f8d77845533f Changes for compilation with 3.1.51+
adb014
parents: 4404
diff changeset
206
3065
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
207 OCTAVE_FIXED_API FixedPointComplex operator ! (const FixedPointComplex &x);
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
208
3065
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
209 OCTAVE_FIXED_API FixedPoint real (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
210 OCTAVE_FIXED_API FixedPoint imag (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
211 OCTAVE_FIXED_API FixedPointComplex conj (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
212 OCTAVE_FIXED_API FixedPoint abs (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
213 OCTAVE_FIXED_API FixedPoint norm (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
214 OCTAVE_FIXED_API FixedPoint arg (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
215 OCTAVE_FIXED_API FixedPointComplex polar (const FixedPoint &r, const FixedPoint &p);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
216 OCTAVE_FIXED_API FixedPointComplex cos (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
217 OCTAVE_FIXED_API FixedPointComplex cosh (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
218 OCTAVE_FIXED_API FixedPointComplex sin (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
219 OCTAVE_FIXED_API FixedPointComplex sinh (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
220 OCTAVE_FIXED_API FixedPointComplex tan (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
221 OCTAVE_FIXED_API FixedPointComplex tanh (const FixedPointComplex &x);
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
222
3065
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
223 OCTAVE_FIXED_API FixedPointComplex sqrt (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
224 OCTAVE_FIXED_API FixedPointComplex pow (const FixedPointComplex &w, const int y);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
225 OCTAVE_FIXED_API FixedPointComplex pow (const FixedPointComplex &x, const FixedPoint& y);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
226 OCTAVE_FIXED_API FixedPointComplex pow (const FixedPoint &x, const FixedPointComplex& y);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
227 OCTAVE_FIXED_API FixedPointComplex pow (const FixedPointComplex &x, const FixedPointComplex &y);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
228 OCTAVE_FIXED_API FixedPointComplex exp (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
229 OCTAVE_FIXED_API FixedPointComplex log (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
230 OCTAVE_FIXED_API FixedPointComplex log10 (const FixedPointComplex &x);
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
231
3065
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
232 OCTAVE_FIXED_API FixedPointComplex round (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
233 OCTAVE_FIXED_API FixedPointComplex rint (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
234 OCTAVE_FIXED_API FixedPointComplex floor (const FixedPointComplex &x);
c9748be75a06 Implement symbol export mechanism similar to octave, for MSVC
goffioul
parents: 2394
diff changeset
235 OCTAVE_FIXED_API FixedPointComplex ceil (const FixedPointComplex &x);
2383
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
236
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
237 #endif
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
238
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
239 /*
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
240 ;;; Local Variables: ***
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
241 ;;; mode: C++ ***
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
242 ;;; End: ***
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
243 */
d1930f8af7ca Changed the directory structure of fixed to match the package system
hauberg
parents:
diff changeset
244