| 1 |
/* |
| 2 |
* src/qd_const.cc |
| 3 |
* |
| 4 |
* This work was supported by the Director, Office of Science, Division |
| 5 |
* of Mathematical, Information, and Computational Sciences of the |
| 6 |
* U.S. Department of Energy under contract number DE-AC03-76SF00098. |
| 7 |
* |
| 8 |
* Copyright (c) 2000-2001 |
| 9 |
* |
| 10 |
* Defines constants used in quad-double package. |
| 11 |
*/ |
| 12 |
#include "config.h" |
| 13 |
#include <qd/qd_real.h> |
| 14 |
|
| 15 |
/* Some useful constants. */ |
| 16 |
const qd_real qd_real::_2pi = qd_real(6.283185307179586232e+00, |
| 17 |
2.449293598294706414e-16, |
| 18 |
-5.989539619436679332e-33, |
| 19 |
2.224908441726730563e-49); |
| 20 |
const qd_real qd_real::_pi = qd_real(3.141592653589793116e+00, |
| 21 |
1.224646799147353207e-16, |
| 22 |
-2.994769809718339666e-33, |
| 23 |
1.112454220863365282e-49); |
| 24 |
const qd_real qd_real::_pi2 = qd_real(1.570796326794896558e+00, |
| 25 |
6.123233995736766036e-17, |
| 26 |
-1.497384904859169833e-33, |
| 27 |
5.562271104316826408e-50); |
| 28 |
const qd_real qd_real::_pi4 = qd_real(7.853981633974482790e-01, |
| 29 |
3.061616997868383018e-17, |
| 30 |
-7.486924524295849165e-34, |
| 31 |
2.781135552158413204e-50); |
| 32 |
const qd_real qd_real::_3pi4 = qd_real(2.356194490192344837e+00, |
| 33 |
9.1848509936051484375e-17, |
| 34 |
3.9168984647504003225e-33, |
| 35 |
-2.5867981632704860386e-49); |
| 36 |
const qd_real qd_real::_e = qd_real(2.718281828459045091e+00, |
| 37 |
1.445646891729250158e-16, |
| 38 |
-2.127717108038176765e-33, |
| 39 |
1.515630159841218954e-49); |
| 40 |
const qd_real qd_real::_log2 = qd_real(6.931471805599452862e-01, |
| 41 |
2.319046813846299558e-17, |
| 42 |
5.707708438416212066e-34, |
| 43 |
-3.582432210601811423e-50); |
| 44 |
const qd_real qd_real::_log10 = qd_real(2.302585092994045901e+00, |
| 45 |
-2.170756223382249351e-16, |
| 46 |
-9.984262454465776570e-33, |
| 47 |
-4.023357454450206379e-49); |
| 48 |
const qd_real qd_real::_nan = qd_real(qd::_d_nan, qd::_d_nan, |
| 49 |
qd::_d_nan, qd::_d_nan); |
| 50 |
const qd_real qd_real::_inf = qd_real(qd::_d_inf, qd::_d_inf, |
| 51 |
qd::_d_inf, qd::_d_inf); |
| 52 |
|
| 53 |
const double qd_real::_eps = 1.21543267145725e-63; // = 2^-209 |
| 54 |
const double qd_real::_min_normalized = 1.6259745436952323e-260; // = 2^(-1022 + 3*53) |
| 55 |
const qd_real qd_real::_max = qd_real( |
| 56 |
1.79769313486231570815e+308, 9.97920154767359795037e+291, |
| 57 |
5.53956966280111259858e+275, 3.07507889307840487279e+259); |
| 58 |
const qd_real qd_real::_safe_max = qd_real( |
| 59 |
1.7976931080746007281e+308, 9.97920154767359795037e+291, |
| 60 |
5.53956966280111259858e+275, 3.07507889307840487279e+259); |
| 61 |
const int qd_real::_ndigits = 62; |
| 62 |
|