Cube root function.
More...
Go to the source code of this file.
|
static const unsigned | B1 = 715094163 |
|
static const unsigned | B2 = 696219795 |
|
static const double | C = 5.42857142857142815906e-01 |
|
static const double | D = -7.05306122448979611050e-01 |
|
static const double | E = 1.41428571428571436819e+00 |
|
static const double | F = 1.60714285714285720630e+00 |
|
static const double | G = 3.57142857142857150787e-01 |
|
Cube root function.
Definition in file cbrt.c.
◆ cbrt()
Cube root function.
Definition at line 62 of file cbrt.c.
References B1, B2, C, D, E, F, and G.
Referenced by RealNumber::CubeRoot().
65 double r, s, t = 0.0, w;
71 sign = hx & 0x80000000;
107 t *=
G +
F / (s +
E +
D / s);
118 r = (r - t) / (w + r);
#define GET_HIGH_WORD(i, d)
Get the more significant 32 bit int from a double.
#define GET_LOW_WORD(i, d)
Get the less significant 32 bit int from a double.
#define SET_LOW_WORD(d, v)
Set the less significant 32 bits of a double from an int.
#define SET_HIGH_WORD(d, v)
Set the more significant 32 bits of a double from an int.
◆ B1
const unsigned B1 = 715094163 |
|
static |
◆ B2
const unsigned B2 = 696219795 |
|
static |
const double C = 5.42857142857142815906e-01 |
|
static |
const double D = -7.05306122448979611050e-01 |
|
static |
const double E = 1.41428571428571436819e+00 |
|
static |
const double F = 1.60714285714285720630e+00 |
|
static |
const double G = 3.57142857142857150787e-01 |
|
static |