File indexing completed on 2026-05-19 08:08:32
0001
0002
0003 #ifndef _CL_REAL_H
0004 #define _CL_REAL_H
0005
0006 #include "cln/number.h"
0007 #include "cln/real_class.h"
0008 #include "cln/rational_class.h"
0009 #include "cln/integer_class.h"
0010 #include "cln/float.h"
0011 #include "cln/floatformat.h"
0012 #include "cln/random.h"
0013
0014 namespace cln {
0015
0016 CL_DEFINE_AS_CONVERSION(cl_R)
0017
0018
0019
0020 extern bool zerop (const cl_R& x);
0021
0022
0023 extern bool minusp (const cl_R& x);
0024
0025
0026 extern bool plusp (const cl_R& x);
0027
0028
0029
0030
0031 extern const cl_SF cl_R_to_SF (const cl_R& x);
0032
0033
0034
0035 extern const cl_FF cl_R_to_FF (const cl_R& x);
0036
0037
0038
0039 extern const cl_DF cl_R_to_DF (const cl_R& x);
0040
0041
0042
0043
0044 extern const cl_LF cl_R_to_LF (const cl_R& x, uintC len);
0045
0046
0047
0048
0049
0050
0051 extern const cl_F cl_float (const cl_R& x, const cl_F& y);
0052
0053
0054
0055
0056
0057
0058 extern const cl_F cl_float (const cl_R& x, float_format_t f);
0059
0060
0061
0062
0063
0064
0065 extern const cl_F cl_float (const cl_R& x);
0066
0067
0068
0069 extern const cl_R operator- (const cl_R& x);
0070
0071
0072 extern const cl_R operator+ (const cl_R& x, const cl_R& y);
0073
0074 inline const cl_F operator+ (const cl_R& x, const cl_F& y)
0075 { return The(cl_F)(x + The(cl_R)(y)); }
0076 inline const cl_F operator+ (const cl_F& x, const cl_R& y)
0077 { return The(cl_F)(The(cl_R)(x) + y); }
0078
0079 inline const cl_R operator+ (const int x, const cl_R& y)
0080 { return cl_I(x) + y; }
0081 inline const cl_R operator+ (const unsigned int x, const cl_R& y)
0082 { return cl_I(x) + y; }
0083 inline const cl_R operator+ (const long x, const cl_R& y)
0084 { return cl_I(x) + y; }
0085 inline const cl_R operator+ (const unsigned long x, const cl_R& y)
0086 { return cl_I(x) + y; }
0087 inline const cl_R operator+ (const long long x, const cl_R& y)
0088 { return cl_I(x) + y; }
0089 inline const cl_R operator+ (const unsigned long long x, const cl_R& y)
0090 { return cl_I(x) + y; }
0091 inline const cl_F operator+ (const float x, const cl_R& y)
0092 { return The(cl_F)(cl_R(x) + y); }
0093 inline const cl_F operator+ (const double x, const cl_R& y)
0094 { return The(cl_F)(cl_R(x) + y); }
0095 inline const cl_R operator+ (const cl_R& x, const int y)
0096 { return x + cl_I(y); }
0097 inline const cl_R operator+ (const cl_R& x, const unsigned int y)
0098 { return x + cl_I(y); }
0099 inline const cl_R operator+ (const cl_R& x, const long y)
0100 { return x + cl_I(y); }
0101 inline const cl_R operator+ (const cl_R& x, const unsigned long y)
0102 { return x + cl_I(y); }
0103 inline const cl_R operator+ (const cl_R& x, const long long y)
0104 { return x + cl_I(y); }
0105 inline const cl_R operator+ (const cl_R& x, const unsigned long long y)
0106 { return x + cl_I(y); }
0107 inline const cl_F operator+ (const cl_R& x, const float y)
0108 { return The(cl_F)(x + cl_R(y)); }
0109 inline const cl_F operator+ (const cl_R& x, const double y)
0110 { return The(cl_F)(x + cl_R(y)); }
0111
0112
0113 extern const cl_R operator- (const cl_R& x, const cl_R& y);
0114
0115 inline const cl_F operator- (const cl_R& x, const cl_F& y)
0116 { return The(cl_F)(x - The(cl_R)(y)); }
0117 inline const cl_F operator- (const cl_F& x, const cl_R& y)
0118 { return The(cl_F)(The(cl_R)(x) - y); }
0119
0120 inline const cl_R operator- (const int x, const cl_R& y)
0121 { return cl_I(x) - y; }
0122 inline const cl_R operator- (const unsigned int x, const cl_R& y)
0123 { return cl_I(x) - y; }
0124 inline const cl_R operator- (const long x, const cl_R& y)
0125 { return cl_I(x) - y; }
0126 inline const cl_R operator- (const unsigned long x, const cl_R& y)
0127 { return cl_I(x) - y; }
0128 inline const cl_R operator- (const long long x, const cl_R& y)
0129 { return cl_I(x) - y; }
0130 inline const cl_R operator- (const unsigned long long x, const cl_R& y)
0131 { return cl_I(x) - y; }
0132 inline const cl_F operator- (const float x, const cl_R& y)
0133 { return The(cl_F)(cl_R(x) - y); }
0134 inline const cl_F operator- (const double x, const cl_R& y)
0135 { return The(cl_F)(cl_R(x) - y); }
0136 inline const cl_R operator- (const cl_R& x, const int y)
0137 { return x - cl_I(y); }
0138 inline const cl_R operator- (const cl_R& x, const unsigned int y)
0139 { return x - cl_I(y); }
0140 inline const cl_R operator- (const cl_R& x, const long y)
0141 { return x - cl_I(y); }
0142 inline const cl_R operator- (const cl_R& x, const unsigned long y)
0143 { return x - cl_I(y); }
0144 inline const cl_R operator- (const cl_R& x, const long long y)
0145 { return x - cl_I(y); }
0146 inline const cl_R operator- (const cl_R& x, const unsigned long long y)
0147 { return x - cl_I(y); }
0148 inline const cl_F operator- (const cl_R& x, const float y)
0149 { return The(cl_F)(x - cl_R(y)); }
0150 inline const cl_F operator- (const cl_R& x, const double y)
0151 { return The(cl_F)(x - cl_R(y)); }
0152
0153
0154 extern const cl_R operator* (const cl_R& x, const cl_R& y);
0155
0156 inline const cl_R operator* (const int x, const cl_R& y)
0157 { return cl_I(x) * y; }
0158 inline const cl_R operator* (const unsigned int x, const cl_R& y)
0159 { return cl_I(x) * y; }
0160 inline const cl_R operator* (const long x, const cl_R& y)
0161 { return cl_I(x) * y; }
0162 inline const cl_R operator* (const unsigned long x, const cl_R& y)
0163 { return cl_I(x) * y; }
0164 inline const cl_R operator* (const long long x, const cl_R& y)
0165 { return cl_I(x) * y; }
0166 inline const cl_R operator* (const unsigned long long x, const cl_R& y)
0167 { return cl_I(x) * y; }
0168 inline const cl_R operator* (const float x, const cl_R& y)
0169 { return cl_R(x) * y; }
0170 inline const cl_R operator* (const double x, const cl_R& y)
0171 { return cl_R(x) * y; }
0172 inline const cl_R operator* (const cl_R& x, const int y)
0173 { return x * cl_I(y); }
0174 inline const cl_R operator* (const cl_R& x, const unsigned int y)
0175 { return x * cl_I(y); }
0176 inline const cl_R operator* (const cl_R& x, const long y)
0177 { return x * cl_I(y); }
0178 inline const cl_R operator* (const cl_R& x, const unsigned long y)
0179 { return x * cl_I(y); }
0180 inline const cl_R operator* (const cl_R& x, const long long y)
0181 { return x * cl_I(y); }
0182 inline const cl_R operator* (const cl_R& x, const unsigned long long y)
0183 { return x * cl_I(y); }
0184 inline const cl_R operator* (const cl_R& x, const float y)
0185 { return x * cl_R(y); }
0186 inline const cl_R operator* (const cl_R& x, const double y)
0187 { return x * cl_R(y); }
0188
0189
0190 extern const cl_R square (const cl_R& x);
0191
0192
0193 extern const cl_R operator/ (const cl_R& x, const cl_R& y);
0194
0195 inline const cl_F operator/ (const cl_F& x, const cl_R& y)
0196 { return The(cl_F)(The(cl_R)(x) / y); }
0197
0198 inline const cl_R operator/ (const int x, const cl_R& y)
0199 { return cl_I(x) / y; }
0200 inline const cl_R operator/ (const unsigned int x, const cl_R& y)
0201 { return cl_I(x) / y; }
0202 inline const cl_R operator/ (const long x, const cl_R& y)
0203 { return cl_I(x) / y; }
0204 inline const cl_R operator/ (const unsigned long x, const cl_R& y)
0205 { return cl_I(x) / y; }
0206 inline const cl_R operator/ (const long long x, const cl_R& y)
0207 { return cl_I(x) / y; }
0208 inline const cl_R operator/ (const unsigned long long x, const cl_R& y)
0209 { return cl_I(x) / y; }
0210 inline const cl_F operator/ (const float x, const cl_R& y)
0211 { return The(cl_F)(cl_R(x) / y); }
0212 inline const cl_F operator/ (const double x, const cl_R& y)
0213 { return The(cl_F)(cl_R(x) / y); }
0214 inline const cl_R operator/ (const cl_R& x, const int y)
0215 { return x / cl_I(y); }
0216 inline const cl_R operator/ (const cl_R& x, const unsigned int y)
0217 { return x / cl_I(y); }
0218 inline const cl_R operator/ (const cl_R& x, const long y)
0219 { return x / cl_I(y); }
0220 inline const cl_R operator/ (const cl_R& x, const unsigned long y)
0221 { return x / cl_I(y); }
0222 inline const cl_R operator/ (const cl_R& x, const long long y)
0223 { return x / cl_I(y); }
0224 inline const cl_R operator/ (const cl_R& x, const unsigned long long y)
0225 { return x / cl_I(y); }
0226 inline const cl_R operator/ (const cl_R& x, const float y)
0227 { return x / cl_R(y); }
0228 inline const cl_R operator/ (const cl_R& x, const double y)
0229 { return x / cl_R(y); }
0230
0231
0232 extern const cl_R abs (const cl_R& x);
0233
0234
0235 extern const cl_R recip (const cl_R& x);
0236
0237
0238 extern const cl_R plus1 (const cl_R& x);
0239
0240
0241 extern const cl_R minus1 (const cl_R& x);
0242
0243
0244
0245
0246 struct cl_R_div_t {
0247 cl_I quotient;
0248 cl_R remainder;
0249
0250 cl_R_div_t () {}
0251 cl_R_div_t (const cl_I& q, const cl_R& r) : quotient(q), remainder(r) {}
0252 cl_R_div_t (const struct cl_I_div_t &);
0253 cl_R_div_t (const struct cl_RA_div_t &);
0254 cl_R_div_t (const struct cl_F_div_t &);
0255 };
0256
0257
0258 extern const cl_R_div_t floor2 (const cl_R& x);
0259 extern const cl_I floor1 (const cl_R& x);
0260
0261
0262 extern const cl_R_div_t ceiling2 (const cl_R& x);
0263 extern const cl_I ceiling1 (const cl_R& x);
0264
0265
0266 extern const cl_R_div_t truncate2 (const cl_R& x);
0267 extern const cl_I truncate1 (const cl_R& x);
0268
0269
0270 extern const cl_R_div_t round2 (const cl_R& x);
0271 extern const cl_I round1 (const cl_R& x);
0272
0273
0274 extern const cl_R_div_t floor2 (const cl_R& x, const cl_R& y);
0275 extern const cl_I floor1 (const cl_R& x, const cl_R& y);
0276
0277
0278 extern const cl_R_div_t ceiling2 (const cl_R& x, const cl_R& y);
0279 extern const cl_I ceiling1 (const cl_R& x, const cl_R& y);
0280
0281
0282 extern const cl_R_div_t truncate2 (const cl_R& x, const cl_R& y);
0283 extern const cl_I truncate1 (const cl_R& x, const cl_R& y);
0284
0285
0286 extern const cl_R_div_t round2 (const cl_R& x, const cl_R& y);
0287 extern const cl_I round1 (const cl_R& x, const cl_R& y);
0288
0289
0290
0291
0292 struct cl_R_fdiv_t {
0293 cl_F quotient;
0294 cl_R remainder;
0295
0296 cl_R_fdiv_t () {}
0297 cl_R_fdiv_t (const cl_F& q, const cl_R& r) : quotient(q), remainder(r) {}
0298 cl_R_fdiv_t (const struct cl_F_fdiv_t &);
0299 };
0300
0301
0302 extern const cl_R_fdiv_t ffloor2 (const cl_R& x);
0303 extern const cl_F ffloor (const cl_R& x);
0304
0305
0306 extern const cl_R_fdiv_t fceiling2 (const cl_R& x);
0307 extern const cl_F fceiling (const cl_R& x);
0308
0309
0310 extern const cl_R_fdiv_t ftruncate2 (const cl_R& x);
0311 extern const cl_F ftruncate (const cl_R& x);
0312
0313
0314 extern const cl_R_fdiv_t fround2 (const cl_R& x);
0315 extern const cl_F fround (const cl_R& x);
0316
0317
0318 extern const cl_R_fdiv_t ffloor2 (const cl_R& x, const cl_R& y);
0319 extern const cl_F ffloor (const cl_R& x, const cl_R& y);
0320
0321
0322 extern const cl_R_fdiv_t fceiling2 (const cl_R& x, const cl_R& y);
0323 extern const cl_F fceiling (const cl_R& x, const cl_R& y);
0324
0325
0326 extern const cl_R_fdiv_t ftruncate2 (const cl_R& x, const cl_R& y);
0327 extern const cl_F ftruncate (const cl_R& x, const cl_R& y);
0328
0329
0330 extern const cl_R_fdiv_t fround2 (const cl_R& x, const cl_R& y);
0331 extern const cl_F fround (const cl_R& x, const cl_R& y);
0332
0333
0334
0335 extern const cl_R mod (const cl_R& x, const cl_R& y);
0336
0337
0338 extern const cl_R rem (const cl_R& x, const cl_R& y);
0339
0340
0341
0342 extern const cl_RA rational (const cl_R& x);
0343
0344 inline const cl_RA rational (const cl_RA& x) { return x; }
0345
0346
0347
0348 extern bool equal (const cl_R& x, const cl_R& y);
0349
0350 extern uint32 equal_hashcode (const cl_R& x);
0351
0352
0353
0354 extern cl_signean compare (const cl_R& x, const cl_R& y);
0355
0356 inline bool operator== (const cl_R& x, const cl_R& y)
0357 { return equal(x,y); }
0358 inline bool operator!= (const cl_R& x, const cl_R& y)
0359 { return !equal(x,y); }
0360 inline bool operator<= (const cl_R& x, const cl_R& y)
0361 { return compare(x,y)<=0; }
0362 inline bool operator< (const cl_R& x, const cl_R& y)
0363 { return compare(x,y)<0; }
0364 inline bool operator>= (const cl_R& x, const cl_R& y)
0365 { return compare(x,y)>=0; }
0366 inline bool operator> (const cl_R& x, const cl_R& y)
0367 { return compare(x,y)>0; }
0368
0369
0370 extern const cl_R max (const cl_R& x, const cl_R& y);
0371
0372
0373 extern const cl_R min (const cl_R& x, const cl_R& y);
0374
0375
0376 extern const cl_R signum (const cl_R& x);
0377
0378
0379 extern const cl_R sqrt (const cl_R& x);
0380
0381 extern const cl_R sqrt (const cl_RA& x);
0382
0383
0384 extern const cl_R expt (const cl_R& x, sintL y);
0385 extern const cl_R expt (const cl_R& x, const cl_I& y);
0386
0387
0388 extern const cl_RA rationalize (const cl_R& x);
0389
0390
0391
0392 extern float float_approx (const cl_R& x);
0393
0394
0395 extern double double_approx (const cl_R& x);
0396
0397
0398
0399
0400
0401
0402
0403 extern const cl_R atan (const cl_R& x, const cl_R& y);
0404
0405 inline const cl_F atan (const cl_R& x, const cl_F& y)
0406 { return The(cl_F)(atan(x,The(cl_R)(y))); }
0407
0408 inline const cl_R atan (const cl_R& x, const int y)
0409 { return atan(x,cl_I(y)); }
0410 inline const cl_R atan (const cl_R& x, const unsigned int y)
0411 { return atan(x,cl_I(y)); }
0412 inline const cl_R atan (const cl_R& x, const long y)
0413 { return atan(x,cl_I(y)); }
0414 inline const cl_R atan (const cl_R& x, const unsigned long y)
0415 { return atan(x,cl_I(y)); }
0416
0417
0418
0419 extern const cl_R atan (const cl_R& x);
0420
0421 inline const cl_F atan (const cl_F& x) { return The(cl_F)(atan(The(cl_R)(x))); }
0422
0423 inline const cl_R atan (const int x) { return atan(cl_I(x)); }
0424 inline const cl_R atan (const unsigned int x) { return atan(cl_I(x)); }
0425 inline const cl_R atan (const long x) { return atan(cl_I(x)); }
0426 inline const cl_R atan (const unsigned long x) { return atan(cl_I(x)); }
0427
0428
0429 extern const cl_R sin (const cl_R& x);
0430
0431 inline const cl_R sin (const int x) { return sin(cl_I(x)); }
0432 inline const cl_R sin (const unsigned int x) { return sin(cl_I(x)); }
0433 inline const cl_R sin (const long x) { return sin(cl_I(x)); }
0434 inline const cl_R sin (const unsigned long x) { return sin(cl_I(x)); }
0435
0436
0437 extern const cl_R cos (const cl_R& x);
0438
0439 inline const cl_R cos (const int x) { return cos(cl_I(x)); }
0440 inline const cl_R cos (const unsigned int x) { return cos(cl_I(x)); }
0441 inline const cl_R cos (const long x) { return cos(cl_I(x)); }
0442 inline const cl_R cos (const unsigned long x) { return cos(cl_I(x)); }
0443
0444
0445 extern const cos_sin_t cos_sin (const cl_R& x);
0446
0447
0448 extern const cl_R tan (const cl_R& x);
0449
0450 inline const cl_R tan (const int x) { return tan(cl_I(x)); }
0451 inline const cl_R tan (const unsigned int x) { return tan(cl_I(x)); }
0452 inline const cl_R tan (const long x) { return tan(cl_I(x)); }
0453 inline const cl_R tan (const unsigned long x) { return tan(cl_I(x)); }
0454
0455
0456 extern const cl_R ln (const cl_R& x);
0457
0458 inline const cl_R ln (const int x) { return ln(cl_I(x)); }
0459 inline const cl_R ln (const unsigned int x) { return ln(cl_I(x)); }
0460 inline const cl_R ln (const long x) { return ln(cl_I(x)); }
0461 inline const cl_R ln (const unsigned long x) { return ln(cl_I(x)); }
0462
0463
0464
0465
0466 extern const cl_R log (const cl_R& a, const cl_R& b);
0467
0468
0469 extern const cl_R exp (const cl_R& x);
0470
0471 inline const cl_R exp (const int x) { return exp(cl_I(x)); }
0472 inline const cl_R exp (const unsigned int x) { return exp(cl_I(x)); }
0473 inline const cl_R exp (const long x) { return exp(cl_I(x)); }
0474 inline const cl_R exp (const unsigned long x) { return exp(cl_I(x)); }
0475
0476
0477 extern const cl_R sinh (const cl_R& x);
0478
0479 inline const cl_R sinh (const int x) { return sinh(cl_I(x)); }
0480 inline const cl_R sinh (const unsigned int x) { return sinh(cl_I(x)); }
0481 inline const cl_R sinh (const long x) { return sinh(cl_I(x)); }
0482 inline const cl_R sinh (const unsigned long x) { return sinh(cl_I(x)); }
0483
0484
0485 extern const cl_R cosh (const cl_R& x);
0486
0487 inline const cl_R cosh (const int x) { return cosh(cl_I(x)); }
0488 inline const cl_R cosh (const unsigned int x) { return cosh(cl_I(x)); }
0489 inline const cl_R cosh (const long x) { return cosh(cl_I(x)); }
0490 inline const cl_R cosh (const unsigned long x) { return cosh(cl_I(x)); }
0491
0492
0493 extern const cosh_sinh_t cosh_sinh (const cl_R& x);
0494
0495
0496 extern const cl_R tanh (const cl_R& x);
0497
0498 inline const cl_R tanh (const int x) { return tanh(cl_I(x)); }
0499 inline const cl_R tanh (const unsigned int x) { return tanh(cl_I(x)); }
0500 inline const cl_R tanh (const long x) { return tanh(cl_I(x)); }
0501 inline const cl_R tanh (const unsigned long x) { return tanh(cl_I(x)); }
0502
0503
0504
0505
0506 extern const cl_R random_R (random_state& randomstate, const cl_R& n);
0507
0508 inline const cl_R random_R (const cl_R& n)
0509 { return random_R(default_random_state,n); }
0510
0511
0512
0513 inline cl_R& operator+= (cl_R& x, const cl_R& y) { return x = x + y; }
0514 inline cl_F& operator+= (cl_F& x, const cl_R& y) { return x = x + y; }
0515 inline cl_F& operator+= (cl_F& x, const cl_RA& y) { return x = x + y; }
0516 inline cl_F& operator+= (cl_F& x, const cl_I& y) { return x = x + y; }
0517 inline cl_R& operator+= (cl_R& x, const int y) { return x = x + y; }
0518 inline cl_R& operator+= (cl_R& x, const unsigned int y) { return x = x + y; }
0519 inline cl_R& operator+= (cl_R& x, const long y) { return x = x + y; }
0520 inline cl_R& operator+= (cl_R& x, const unsigned long y) { return x = x + y; }
0521 inline cl_R& operator+= (cl_R& x, const long long y) { return x = x + y; }
0522 inline cl_R& operator+= (cl_R& x, const unsigned long long y) { return x = x + y; }
0523 inline cl_F& operator+= (cl_R& x, const float y) { return static_cast<cl_F&>(x = x + y); }
0524 inline cl_F& operator+= (cl_R& x, const double y) { return static_cast<cl_F&>(x = x + y); }
0525 inline cl_F& operator+= (cl_F& x, const int y) { return x = x + y; }
0526 inline cl_F& operator+= (cl_F& x, const unsigned int y) { return x = x + y; }
0527 inline cl_F& operator+= (cl_F& x, const long y) { return x = x + y; }
0528 inline cl_F& operator+= (cl_F& x, const unsigned long y) { return x = x + y; }
0529 inline cl_F& operator+= (cl_F& x, const long long y) { return x = x + y; }
0530 inline cl_F& operator+= (cl_F& x, const unsigned long long y) { return x = x + y; }
0531 inline cl_R& operator++ (cl_R& x) { return x = plus1(x); }
0532 inline void operator++ (cl_R& x, int dummy) { (void)dummy; x = plus1(x); }
0533 inline cl_R& operator-= (cl_R& x, const cl_R& y) { return x = x - y; }
0534 inline cl_F& operator-= (cl_F& x, const cl_R& y) { return x = x - y; }
0535 inline cl_F& operator-= (cl_F& x, const cl_RA& y) { return x = x - y; }
0536 inline cl_F& operator-= (cl_F& x, const cl_I& y) { return x = x - y; }
0537 inline cl_R& operator-= (cl_R& x, const int y) { return x = x - y; }
0538 inline cl_R& operator-= (cl_R& x, const unsigned int y) { return x = x - y; }
0539 inline cl_R& operator-= (cl_R& x, const long y) { return x = x - y; }
0540 inline cl_R& operator-= (cl_R& x, const unsigned long y) { return x = x - y; }
0541 inline cl_R& operator-= (cl_R& x, const long long y) { return x = x - y; }
0542 inline cl_R& operator-= (cl_R& x, const unsigned long long y) { return x = x - y; }
0543 inline cl_F& operator-= (cl_R& x, const float y) { return static_cast<cl_F&>(x = x - y); }
0544 inline cl_F& operator-= (cl_R& x, const double y) { return static_cast<cl_F&>(x = x - y); }
0545 inline cl_F& operator-= (cl_F& x, const int y) { return x = x - y; }
0546 inline cl_F& operator-= (cl_F& x, const unsigned int y) { return x = x - y; }
0547 inline cl_F& operator-= (cl_F& x, const long y) { return x = x - y; }
0548 inline cl_F& operator-= (cl_F& x, const unsigned long y) { return x = x - y; }
0549 inline cl_F& operator-= (cl_F& x, const long long y) { return x = x - y; }
0550 inline cl_F& operator-= (cl_F& x, const unsigned long long y) { return x = x - y; }
0551 inline cl_R& operator-- (cl_R& x) { return x = minus1(x); }
0552 inline void operator-- (cl_R& x, int dummy) { (void)dummy; x = minus1(x); }
0553 inline cl_R& operator*= (cl_R& x, const cl_R& y) { return x = x * y; }
0554 inline cl_R& operator*= (cl_R& x, const int y) { return x = x * y; }
0555 inline cl_R& operator*= (cl_R& x, const unsigned int y) { return x = x * y; }
0556 inline cl_R& operator*= (cl_R& x, const long y) { return x = x * y; }
0557 inline cl_R& operator*= (cl_R& x, const unsigned long y) { return x = x * y; }
0558 inline cl_R& operator*= (cl_R& x, const long long y) { return x = x * y; }
0559 inline cl_R& operator*= (cl_R& x, const unsigned long long y) { return x = x * y; }
0560 inline cl_R& operator*= (cl_R& x, const float y) { return x = x * y; }
0561 inline cl_R& operator*= (cl_R& x, const double y) { return x = x * y; }
0562 inline cl_R& operator/= (cl_R& x, const cl_R& y) { return x = x / y; }
0563 inline cl_F& operator/= (cl_F& x, const cl_R& y) { return x = x / y; }
0564 inline cl_F& operator/= (cl_F& x, const cl_RA& y) { return x = x / y; }
0565 inline cl_F& operator/= (cl_F& x, const cl_I& y) { return x = x / y; }
0566 inline cl_R& operator/= (cl_R& x, const int y) { return x = x / y; }
0567 inline cl_R& operator/= (cl_R& x, const unsigned int y) { return x = x / y; }
0568 inline cl_R& operator/= (cl_R& x, const long y) { return x = x / y; }
0569 inline cl_R& operator/= (cl_R& x, const unsigned long y) { return x = x / y; }
0570 inline cl_R& operator/= (cl_R& x, const long long y) { return x = x / y; }
0571 inline cl_R& operator/= (cl_R& x, const unsigned long long y) { return x = x / y; }
0572 inline cl_R& operator/= (cl_R& x, const float y) { return x = x / y; }
0573 inline cl_R& operator/= (cl_R& x, const double y) { return x = x / y; }
0574 inline cl_F& operator/= (cl_F& x, const int y) { return x = x / y; }
0575 inline cl_F& operator/= (cl_F& x, const unsigned int y) { return x = x / y; }
0576 inline cl_F& operator/= (cl_F& x, const long y) { return x = x / y; }
0577 inline cl_F& operator/= (cl_F& x, const unsigned long y) { return x = x / y; }
0578 inline cl_F& operator/= (cl_F& x, const long long y) { return x = x / y; }
0579 inline cl_F& operator/= (cl_F& x, const unsigned long long y) { return x = x / y; }
0580
0581
0582
0583
0584 inline const cl_R realpart (const cl_R& x)
0585 {
0586 return x;
0587 }
0588 inline const cl_R imagpart (const cl_R& x)
0589 {
0590 (void)x;
0591 return 0;
0592 }
0593 inline const cl_R conjugate (const cl_R& x)
0594 {
0595 return x;
0596 }
0597
0598
0599
0600 #ifdef CL_DEBUG
0601 extern int cl_R_debug_module;
0602 CL_FORCE_LINK(cl_R_debug_dummy, cl_R_debug_module)
0603 #endif
0604
0605 }
0606
0607 #endif