File indexing completed on 2026-05-19 08:08:30
0001
0002
0003 #ifndef _CL_FLOAT_H
0004 #define _CL_FLOAT_H
0005
0006 #include "cln/number.h"
0007 #include "cln/float_class.h"
0008 #include "cln/floatformat.h"
0009 #include "cln/random.h"
0010 #include "cln/integer_class.h"
0011 #include "cln/sfloat_class.h"
0012 #include "cln/ffloat_class.h"
0013 #include "cln/dfloat_class.h"
0014 #include "cln/lfloat_class.h"
0015 #include "cln/exception.h"
0016
0017 namespace cln {
0018
0019 CL_DEFINE_AS_CONVERSION(cl_F)
0020
0021
0022
0023 struct cl_idecoded_float {
0024 cl_I mantissa;
0025 cl_I exponent;
0026 cl_I sign;
0027
0028 cl_idecoded_float () {}
0029 cl_idecoded_float (const cl_I& m, const cl_I& e, const cl_I& s) : mantissa(m), exponent(e), sign(s) {}
0030 };
0031
0032
0033
0034 extern bool zerop (const cl_F& x);
0035
0036
0037 extern bool minusp (const cl_F& x);
0038
0039
0040 extern bool plusp (const cl_F& x);
0041
0042
0043
0044 extern const cl_SF cl_F_to_SF (const cl_F& x);
0045
0046
0047 extern const cl_FF cl_F_to_FF (const cl_F& x);
0048
0049
0050 extern const cl_DF cl_F_to_DF (const cl_F& x);
0051
0052
0053
0054
0055 extern const cl_LF cl_F_to_LF (const cl_F& x, uintC len);
0056
0057
0058
0059 extern float_format_t default_float_format;
0060
0061
0062
0063 extern float_format_t float_format (uintE n);
0064
0065
0066
0067
0068
0069 extern const cl_F cl_float (const cl_F& x, const cl_F& y);
0070
0071
0072
0073
0074
0075
0076 extern const cl_F cl_float (const cl_F& x, float_format_t f);
0077
0078
0079
0080
0081
0082
0083 inline const cl_F cl_float (const cl_F& x) { return x; }
0084
0085
0086
0087
0088
0089
0090 extern const cl_F cl_float (const cl_I& x, const cl_F& y);
0091
0092
0093
0094
0095
0096
0097 extern const cl_F cl_float (const cl_I& x, float_format_t f);
0098
0099
0100
0101
0102
0103 extern const cl_F cl_float (const cl_I& x);
0104
0105
0106
0107
0108
0109
0110 extern const cl_F cl_float (const cl_RA& x, const cl_F& y);
0111
0112
0113
0114
0115
0116
0117 extern const cl_F cl_float (const cl_RA& x, float_format_t f);
0118
0119
0120
0121
0122
0123 extern const cl_F cl_float (const cl_RA& x);
0124
0125
0126 inline const cl_F cl_float (int x, const cl_F& y)
0127 { return cl_float(cl_I(x),y); }
0128 inline const cl_F cl_float (unsigned int x, const cl_F& y)
0129 { return cl_float(cl_I(x),y); }
0130 inline const cl_F cl_float (int x, float_format_t y)
0131 { return cl_float(cl_I(x),y); }
0132 inline const cl_F cl_float (unsigned int x, float_format_t y)
0133 { return cl_float(cl_I(x),y); }
0134 inline const cl_F cl_float (int x)
0135 { return cl_float(cl_I(x)); }
0136 inline const cl_F cl_float (unsigned int x)
0137 { return cl_float(cl_I(x)); }
0138
0139 inline const cl_F cl_float (float x, const cl_F& y)
0140 { return cl_float(cl_FF(x),y); }
0141 inline const cl_F cl_float (double x, const cl_F& y)
0142 { return cl_float(cl_DF(x),y); }
0143 inline const cl_F cl_float (float x, float_format_t y)
0144 { return cl_float(cl_FF(x),y); }
0145 inline const cl_F cl_float (double x, float_format_t y)
0146 { return cl_float(cl_DF(x),y); }
0147 inline const cl_F cl_float (float x)
0148 { return cl_float(cl_FF(x)); }
0149 inline const cl_F cl_float (double x)
0150 { return cl_float(cl_DF(x)); }
0151
0152
0153
0154 extern const cl_F operator- (const cl_F& x);
0155
0156
0157 extern const cl_F operator+ (const cl_F& x, const cl_F& y);
0158
0159 inline const cl_F operator+ (const cl_RA& x, const cl_F& y)
0160 { return cl_float(x,y) + y; }
0161 inline const cl_F operator+ (const cl_I& x, const cl_F& y)
0162 { return cl_float(x,y) + y; }
0163 inline const cl_F operator+ (const cl_F& x, const cl_RA& y)
0164 { return x + cl_float(y,x); }
0165 inline const cl_F operator+ (const cl_F& x, const cl_I& y)
0166 { return x + cl_float(y,x); }
0167
0168 inline const cl_F operator+ (const int x, const cl_F& y)
0169 { return cl_I(x) + y; }
0170 inline const cl_F operator+ (const unsigned int x, const cl_F& y)
0171 { return cl_I(x) + y; }
0172 inline const cl_F operator+ (const long x, const cl_F& y)
0173 { return cl_I(x) + y; }
0174 inline const cl_F operator+ (const unsigned long x, const cl_F& y)
0175 { return cl_I(x) + y; }
0176 inline const cl_F operator+ (const long long x, const cl_F& y)
0177 { return cl_I(x) + y; }
0178 inline const cl_F operator+ (const unsigned long long x, const cl_F& y)
0179 { return cl_I(x) + y; }
0180 inline const cl_F operator+ (const float x, const cl_F& y)
0181 { return cl_F(x) + y; }
0182 inline const cl_F operator+ (const double x, const cl_F& y)
0183 { return cl_F(x) + y; }
0184 inline const cl_F operator+ (const cl_F& x, const int y)
0185 { return x + cl_I(y); }
0186 inline const cl_F operator+ (const cl_F& x, const unsigned int y)
0187 { return x + cl_I(y); }
0188 inline const cl_F operator+ (const cl_F& x, const long y)
0189 { return x + cl_I(y); }
0190 inline const cl_F operator+ (const cl_F& x, const unsigned long y)
0191 { return x + cl_I(y); }
0192 inline const cl_F operator+ (const cl_F& x, const long long y)
0193 { return x + cl_I(y); }
0194 inline const cl_F operator+ (const cl_F& x, const unsigned long long y)
0195 { return x + cl_I(y); }
0196 inline const cl_F operator+ (const cl_F& x, const float y)
0197 { return x + cl_F(y); }
0198 inline const cl_F operator+ (const cl_F& x, const double y)
0199 { return x + cl_F(y); }
0200
0201
0202 extern const cl_F operator- (const cl_F& x, const cl_F& y);
0203
0204 inline const cl_F operator- (const cl_RA& x, const cl_F& y)
0205 { return cl_float(x,y) - y; }
0206 inline const cl_F operator- (const cl_I& x, const cl_F& y)
0207 { return cl_float(x,y) - y; }
0208 inline const cl_F operator- (const cl_F& x, const cl_RA& y)
0209 { return x - cl_float(y,x); }
0210 inline const cl_F operator- (const cl_F& x, const cl_I& y)
0211 { return x - cl_float(y,x); }
0212
0213 inline const cl_F operator- (const int x, const cl_F& y)
0214 { return cl_I(x) - y; }
0215 inline const cl_F operator- (const unsigned int x, const cl_F& y)
0216 { return cl_I(x) - y; }
0217 inline const cl_F operator- (const long x, const cl_F& y)
0218 { return cl_I(x) - y; }
0219 inline const cl_F operator- (const unsigned long x, const cl_F& y)
0220 { return cl_I(x) - y; }
0221 inline const cl_F operator- (const long long x, const cl_F& y)
0222 { return cl_I(x) - y; }
0223 inline const cl_F operator- (const unsigned long long x, const cl_F& y)
0224 { return cl_I(x) - y; }
0225 inline const cl_F operator- (const float x, const cl_F& y)
0226 { return cl_F(x) - y; }
0227 inline const cl_F operator- (const double x, const cl_F& y)
0228 { return cl_F(x) - y; }
0229 inline const cl_F operator- (const cl_F& x, const int y)
0230 { return x - cl_I(y); }
0231 inline const cl_F operator- (const cl_F& x, const unsigned int y)
0232 { return x - cl_I(y); }
0233 inline const cl_F operator- (const cl_F& x, const long y)
0234 { return x - cl_I(y); }
0235 inline const cl_F operator- (const cl_F& x, const unsigned long y)
0236 { return x - cl_I(y); }
0237 inline const cl_F operator- (const cl_F& x, const long long y)
0238 { return x - cl_I(y); }
0239 inline const cl_F operator- (const cl_F& x, const unsigned long long y)
0240 { return x - cl_I(y); }
0241 inline const cl_F operator- (const cl_F& x, const float y)
0242 { return x - cl_F(y); }
0243 inline const cl_F operator- (const cl_F& x, const double y)
0244 { return x - cl_F(y); }
0245
0246
0247 extern const cl_F operator* (const cl_F& x, const cl_F& y);
0248
0249 inline const cl_R operator* (const cl_F& x, const cl_I& y)
0250 {
0251 extern const cl_R cl_F_I_mul (const cl_F&, const cl_I&);
0252 return cl_F_I_mul(x,y);
0253 }
0254 inline const cl_R operator* (const cl_I& x, const cl_F& y)
0255 {
0256 extern const cl_R cl_F_I_mul (const cl_F&, const cl_I&);
0257 return cl_F_I_mul(y,x);
0258 }
0259 inline const cl_R operator* (const cl_F& x, const cl_RA& y)
0260 {
0261 extern const cl_R cl_F_RA_mul (const cl_F&, const cl_RA&);
0262 return cl_F_RA_mul(x,y);
0263 }
0264 inline const cl_R operator* (const cl_RA& x, const cl_F& y)
0265 {
0266 extern const cl_R cl_F_RA_mul (const cl_F&, const cl_RA&);
0267 return cl_F_RA_mul(y,x);
0268 }
0269
0270 inline const cl_R operator* (const int x, const cl_F& y)
0271 { return cl_I(x) * y; }
0272 inline const cl_R operator* (const unsigned int x, const cl_F& y)
0273 { return cl_I(x) * y; }
0274 inline const cl_R operator* (const long x, const cl_F& y)
0275 { return cl_I(x) * y; }
0276 inline const cl_R operator* (const unsigned long x, const cl_F& y)
0277 { return cl_I(x) * y; }
0278 inline const cl_R operator* (const long long x, const cl_F& y)
0279 { return cl_I(x) * y; }
0280 inline const cl_R operator* (const unsigned long long x, const cl_F& y)
0281 { return cl_I(x) * y; }
0282 inline const cl_F operator* (const float x, const cl_F& y)
0283 { return cl_F(x) * y; }
0284 inline const cl_F operator* (const double x, const cl_F& y)
0285 { return cl_F(x) * y; }
0286 inline const cl_R operator* (const cl_F& x, const int y)
0287 { return x * cl_I(y); }
0288 inline const cl_R operator* (const cl_F& x, const unsigned int y)
0289 { return x * cl_I(y); }
0290 inline const cl_R operator* (const cl_F& x, const long y)
0291 { return x * cl_I(y); }
0292 inline const cl_R operator* (const cl_F& x, const unsigned long y)
0293 { return x * cl_I(y); }
0294 inline const cl_R operator* (const cl_F& x, const long long y)
0295 { return x * cl_I(y); }
0296 inline const cl_R operator* (const cl_F& x, const unsigned long long y)
0297 { return x * cl_I(y); }
0298 inline const cl_F operator* (const cl_F& x, const float y)
0299 { return x * cl_F(y); }
0300 inline const cl_F operator* (const cl_F& x, const double y)
0301 { return x * cl_F(y); }
0302
0303
0304 extern const cl_F square (const cl_F& x);
0305
0306
0307 extern const cl_F operator/ (const cl_F& x, const cl_F& y);
0308
0309 extern const cl_F operator/ (const cl_F& x, const cl_RA& y);
0310 extern const cl_F operator/ (const cl_F& x, const cl_I& y);
0311 extern const cl_R operator/ (const cl_RA& x, const cl_F& y);
0312 extern const cl_R operator/ (const cl_I& x, const cl_F& y);
0313
0314 inline const cl_F operator/ (const cl_F& x, const int y)
0315 { return x / cl_I(y); }
0316 inline const cl_F operator/ (const cl_F& x, const unsigned int y)
0317 { return x / cl_I(y); }
0318 inline const cl_F operator/ (const cl_F& x, const long y)
0319 { return x / cl_I(y); }
0320 inline const cl_F operator/ (const cl_F& x, const unsigned long y)
0321 { return x / cl_I(y); }
0322 inline const cl_F operator/ (const cl_F& x, const long long y)
0323 { return x / cl_I(y); }
0324 inline const cl_F operator/ (const cl_F& x, const unsigned long long y)
0325 { return x / cl_I(y); }
0326 inline const cl_F operator/ (const cl_F& x, const float y)
0327 { return x / cl_F(y); }
0328 inline const cl_F operator/ (const cl_F& x, const double y)
0329 { return x / cl_F(y); }
0330 inline const cl_R operator/ (const int x, const cl_F& y)
0331 { return cl_I(x) / y; }
0332 inline const cl_R operator/ (const unsigned int x, const cl_F& y)
0333 { return cl_I(x) / y; }
0334 inline const cl_R operator/ (const long x, const cl_F& y)
0335 { return cl_I(x) / y; }
0336 inline const cl_R operator/ (const unsigned long x, const cl_F& y)
0337 { return cl_I(x) / y; }
0338 inline const cl_R operator/ (const long long x, const cl_F& y)
0339 { return cl_I(x) / y; }
0340 inline const cl_R operator/ (const unsigned long long x, const cl_F& y)
0341 { return cl_I(x) / y; }
0342 inline const cl_F operator/ (const float x, const cl_F& y)
0343 { return cl_F(x) / y; }
0344 inline const cl_F operator/ (const double x, const cl_F& y)
0345 { return cl_F(x) / y; }
0346
0347
0348 extern const cl_F abs (const cl_F& x);
0349
0350
0351 extern const cl_F sqrt (const cl_F& x);
0352
0353
0354 extern const cl_F recip (const cl_F& x);
0355
0356
0357 inline const cl_F plus1 (const cl_F& x)
0358 {
0359 return x + cl_float(1,x);
0360 }
0361
0362
0363 inline const cl_F minus1 (const cl_F& x)
0364 {
0365 return x + cl_float(-1,x);
0366 }
0367
0368
0369
0370 extern cl_signean compare (const cl_F& x, const cl_F& y);
0371
0372
0373 extern uint32 equal_hashcode (const cl_F& x);
0374
0375 inline bool operator== (const cl_F& x, const cl_F& y)
0376 { return compare(x,y)==0; }
0377 inline bool operator!= (const cl_F& x, const cl_F& y)
0378 { return compare(x,y)!=0; }
0379 inline bool operator<= (const cl_F& x, const cl_F& y)
0380 { return compare(x,y)<=0; }
0381 inline bool operator< (const cl_F& x, const cl_F& y)
0382 { return compare(x,y)<0; }
0383 inline bool operator>= (const cl_F& x, const cl_F& y)
0384 { return compare(x,y)>=0; }
0385 inline bool operator> (const cl_F& x, const cl_F& y)
0386 { return compare(x,y)>0; }
0387
0388
0389
0390 extern const cl_F ffloor (const cl_F& x);
0391
0392
0393 extern const cl_F fceiling (const cl_F& x);
0394
0395
0396 extern const cl_F ftruncate (const cl_F& x);
0397
0398
0399 extern const cl_F fround (const cl_F& x);
0400
0401
0402
0403
0404 struct cl_F_fdiv_t {
0405 cl_F quotient;
0406 cl_F remainder;
0407
0408 cl_F_fdiv_t () {}
0409 cl_F_fdiv_t (const cl_F& q, const cl_F& r) : quotient(q), remainder(r) {}
0410 };
0411
0412
0413 extern const cl_F_fdiv_t ffloor2 (const cl_F& x);
0414
0415
0416 extern const cl_F_fdiv_t fceiling2 (const cl_F& x);
0417
0418
0419 extern const cl_F_fdiv_t ftruncate2 (const cl_F& x);
0420
0421
0422 extern const cl_F_fdiv_t fround2 (const cl_F& x);
0423
0424
0425
0426
0427 struct cl_F_div_t {
0428 cl_I quotient;
0429 cl_F remainder;
0430
0431 cl_F_div_t () {}
0432 cl_F_div_t (const cl_I& q, const cl_F& r) : quotient(q), remainder(r) {}
0433 };
0434
0435
0436 extern const cl_F_div_t floor2 (const cl_F& x);
0437 extern const cl_I floor1 (const cl_F& x);
0438
0439
0440 extern const cl_F_div_t ceiling2 (const cl_F& x);
0441 extern const cl_I ceiling1 (const cl_F& x);
0442
0443
0444 extern const cl_F_div_t truncate2 (const cl_F& x);
0445 extern const cl_I truncate1 (const cl_F& x);
0446
0447
0448 extern const cl_F_div_t round2 (const cl_F& x);
0449 extern const cl_I round1 (const cl_F& x);
0450
0451
0452 extern const cl_F_div_t floor2 (const cl_F& x, const cl_F& y);
0453 inline const cl_I floor1 (const cl_F& x, const cl_F& y) { return floor1(x/y); }
0454
0455
0456 extern const cl_F_div_t ceiling2 (const cl_F& x, const cl_F& y);
0457 inline const cl_I ceiling1 (const cl_F& x, const cl_F& y) { return ceiling1(x/y); }
0458
0459
0460 extern const cl_F_div_t truncate2 (const cl_F& x, const cl_F& y);
0461 inline const cl_I truncate1 (const cl_F& x, const cl_F& y) { return truncate1(x/y); }
0462
0463
0464 extern const cl_F_div_t round2 (const cl_F& x, const cl_F& y);
0465 inline const cl_I round1 (const cl_F& x, const cl_F& y) { return round1(x/y); }
0466
0467
0468
0469 struct decoded_float {
0470 cl_F mantissa;
0471 cl_I exponent;
0472 cl_F sign;
0473
0474 decoded_float () {}
0475 decoded_float (const cl_F& m, const cl_I& e, const cl_F& s) : mantissa(m), exponent(e), sign(s) {}
0476 };
0477
0478
0479
0480
0481 extern const decoded_float decode_float (const cl_F& x);
0482
0483
0484
0485
0486
0487 extern sintE float_exponent (const cl_F& x);
0488
0489
0490 inline sintL float_radix (const cl_F& x)
0491 {
0492 (void)x;
0493 return 2;
0494 }
0495
0496
0497 extern const cl_F float_sign (const cl_F& x);
0498
0499
0500 extern const cl_F float_sign (const cl_F& x, const cl_F& y);
0501
0502
0503
0504 extern uintC float_digits (const cl_F& x);
0505
0506
0507
0508 extern uintC float_precision (const cl_F& x);
0509
0510
0511 inline float_format_t float_format (const cl_F& x)
0512 { return (float_format_t) float_digits(x); }
0513
0514
0515
0516
0517
0518
0519 extern const cl_idecoded_float integer_decode_float (const cl_F& x);
0520
0521
0522
0523 extern const cl_RA rational (const cl_F& x);
0524
0525
0526
0527 extern const cl_F scale_float (const cl_F& x, sintC delta);
0528 extern const cl_F scale_float (const cl_F& x, const cl_I& delta);
0529
0530
0531
0532 extern const cl_F max (const cl_F& x, const cl_F& y);
0533
0534
0535 extern const cl_F min (const cl_F& x, const cl_F& y);
0536
0537
0538 extern const cl_F signum (const cl_F& x);
0539
0540
0541
0542 extern const cl_F most_positive_float (float_format_t f);
0543
0544
0545 extern const cl_F most_negative_float (float_format_t f);
0546
0547
0548
0549 extern const cl_F least_positive_float (float_format_t f);
0550
0551
0552
0553 extern const cl_F least_negative_float (float_format_t f);
0554
0555
0556 extern const cl_F float_epsilon (float_format_t f);
0557
0558
0559 extern const cl_F float_negative_epsilon (float_format_t f);
0560
0561
0562
0563 extern float float_approx (const cl_F& x);
0564
0565
0566 extern double double_approx (const cl_F& x);
0567
0568
0569
0570
0571
0572
0573
0574 extern const cl_F pi (const cl_F& y);
0575
0576
0577
0578 extern const cl_F pi (float_format_t f);
0579
0580
0581 extern const cl_F pi (void);
0582
0583
0584
0585 extern const cl_F sin (const cl_F& x);
0586
0587
0588 extern const cl_F cos (const cl_F& x);
0589
0590
0591 struct cos_sin_t {
0592 cl_R cos;
0593 cl_R sin;
0594
0595 cos_sin_t () {}
0596 cos_sin_t (const cl_R& u, const cl_R& v) : cos (u), sin (v) {}
0597 };
0598
0599
0600 extern const cos_sin_t cos_sin (const cl_F& x);
0601
0602
0603 extern const cl_F tan (const cl_F& x);
0604
0605
0606
0607
0608 extern const cl_F exp1 (const cl_F& y);
0609
0610
0611
0612 extern const cl_F exp1 (float_format_t f);
0613
0614
0615 extern const cl_F exp1 (void);
0616
0617
0618
0619 extern const cl_F ln (const cl_F& x);
0620
0621 inline const cl_LF ln (const cl_LF& x) { return The(cl_LF)(ln(The(cl_F)(x))); }
0622
0623
0624 extern const cl_F exp (const cl_F& x);
0625
0626
0627 extern const cl_F sinh (const cl_F& x);
0628
0629
0630 extern const cl_F cosh (const cl_F& x);
0631
0632
0633 struct cosh_sinh_t {
0634 cl_R cosh;
0635 cl_R sinh;
0636
0637 cosh_sinh_t () {}
0638 cosh_sinh_t (const cl_R& u, const cl_R& v) : cosh (u), sinh (v) {}
0639 };
0640
0641
0642 extern const cosh_sinh_t cosh_sinh (const cl_F& x);
0643
0644
0645 extern const cl_F tanh (const cl_F& x);
0646
0647
0648
0649
0650
0651 extern const cl_F eulerconst (const cl_F& y);
0652
0653
0654
0655 extern const cl_F eulerconst (float_format_t f);
0656
0657
0658 extern const cl_F eulerconst (void);
0659
0660
0661
0662
0663 extern const cl_F catalanconst (const cl_F& y);
0664
0665
0666
0667 extern const cl_F catalanconst (float_format_t f);
0668
0669
0670 extern const cl_F catalanconst (void);
0671
0672
0673 extern const cl_F zeta (int s, const cl_F& y);
0674 extern const cl_F zeta (int s, float_format_t f);
0675 extern const cl_F zeta (int s);
0676
0677
0678
0679
0680
0681 extern const cl_F random_F (random_state& randomstate, const cl_F& n);
0682
0683 inline const cl_F random_F (const cl_F& n)
0684 { return random_F(default_random_state,n); }
0685
0686
0687
0688 inline cl_F& operator+= (cl_F& x, const cl_F& y) { return x = x + y; }
0689 inline cl_F& operator+= (cl_F& x, const float y) { return x = x + y; }
0690 inline cl_F& operator+= (cl_F& x, const double y) { return x = x + y; }
0691 inline cl_F& operator++ (cl_F& x) { return x = plus1(x); }
0692 inline void operator++ (cl_F& x, int dummy) { (void)dummy; x = plus1(x); }
0693 inline cl_F& operator-= (cl_F& x, const cl_F& y) { return x = x - y; }
0694 inline cl_F& operator-= (cl_F& x, const float y) { return x = x - y; }
0695 inline cl_F& operator-= (cl_F& x, const double y) { return x = x - y; }
0696 inline cl_F& operator-- (cl_F& x) { return x = minus1(x); }
0697 inline void operator-- (cl_F& x, int dummy) { (void)dummy; x = minus1(x); }
0698 inline cl_F& operator*= (cl_F& x, const cl_F& y) { return x = x * y; }
0699 inline cl_F& operator*= (cl_F& x, const float y) { return x = x * y; }
0700 inline cl_F& operator*= (cl_F& x, const double y) { return x = x * y; }
0701 inline cl_F& operator/= (cl_F& x, const cl_F& y) { return x = x / y; }
0702 inline cl_F& operator/= (cl_F& x, const float y) { return x = x / y; }
0703 inline cl_F& operator/= (cl_F& x, const double y) { return x = x / y; }
0704
0705
0706 class floating_point_exception : public runtime_exception {
0707 public:
0708 explicit floating_point_exception(const std::string & what)
0709 : runtime_exception(what) {}
0710 };
0711
0712
0713 class floating_point_nan_exception : public floating_point_exception {
0714 public:
0715 floating_point_nan_exception();
0716 };
0717
0718
0719 class floating_point_overflow_exception : public floating_point_exception {
0720 public:
0721 floating_point_overflow_exception();
0722 };
0723
0724
0725 class floating_point_underflow_exception : public floating_point_exception {
0726 public:
0727 floating_point_underflow_exception();
0728 };
0729
0730
0731
0732
0733
0734 extern bool cl_inhibit_floating_point_underflow;
0735
0736 }
0737
0738 #endif