Detailed Description
defines macros for basic operations in double-double arithmetic giving roughly twice the precision of a double
Definition in file dbldblarith.h.
#include "math.h"
Go to the source code of this file.
Macro Definition Documentation
◆ QUAD_EPSILON
#define QUAD_EPSILON 1e-12 |
Definition at line 42 of file dbldblarith.h.
◆ QUAD_HI
Definition at line 45 of file dbldblarith.h.
◆ QUAD_LO
Definition at line 46 of file dbldblarith.h.
◆ QUAD
◆ QUAD_MEMBER
◆ QUAD_TO_DBL
◆ QUAD_SCALE
Definition at line 50 of file dbldblarith.h.
◆ QUAD_ASSIGN
Definition at line 51 of file dbldblarith.h.
◆ QUAD_ASSIGN_Q
Definition at line 52 of file dbldblarith.h.
◆ QUAD_ARRAY_SIZE
#define QUAD_ARRAY_SIZE | ( | size | ) | ((size)*2) |
Definition at line 53 of file dbldblarith.h.
◆ QUAD_ARRAY_LOAD
#define QUAD_ARRAY_LOAD | ( | r, | |
a, | |||
idx | |||
) | do { QUAD_HI(r) = (a)[2*(idx)]; QUAD_LO(r) = (a)[2*(idx) + 1]; } while(0) |
Definition at line 54 of file dbldblarith.h.
◆ QUAD_ARRAY_STORE
#define QUAD_ARRAY_STORE | ( | a, | |
idx, | |||
x | |||
) | do { (a)[2*(idx)] = QUAD_HI(x); (a)[2*(idx) + 1] = QUAD_LO(x); } while(0) |
Definition at line 55 of file dbldblarith.h.
◆ SCIPquadprecProdDD
Definition at line 58 of file dbldblarith.h.
◆ SCIPquadprecSquareD
Definition at line 59 of file dbldblarith.h.
◆ SCIPquadprecSumDD
Definition at line 60 of file dbldblarith.h.
◆ SCIPquadprecDivDD
Definition at line 61 of file dbldblarith.h.
◆ SCIPquadprecSumQD
#define SCIPquadprecSumQD | ( | r, | |
a, | |||
b | |||
) | SCIPdbldblSum21(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), b) |
Definition at line 62 of file dbldblarith.h.
◆ SCIPquadprecProdQD
#define SCIPquadprecProdQD | ( | r, | |
a, | |||
b | |||
) | SCIPdbldblProd21(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), b) |
Definition at line 63 of file dbldblarith.h.
◆ SCIPquadprecDivDQ
#define SCIPquadprecDivDQ | ( | r, | |
a, | |||
b | |||
) | SCIPdbldblDiv12(QUAD_HI(r), QUAD_LO(r), a, QUAD_HI(b), QUAD_LO(b)) |
Definition at line 64 of file dbldblarith.h.
◆ SCIPquadprecDivQD
#define SCIPquadprecDivQD | ( | r, | |
a, | |||
b | |||
) | SCIPdbldblDiv21(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), b) |
Definition at line 65 of file dbldblarith.h.
◆ SCIPquadprecProdQQ
#define SCIPquadprecProdQQ | ( | r, | |
a, | |||
b | |||
) | SCIPdbldblProd22(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), QUAD_HI(b), QUAD_LO(b)) |
Definition at line 66 of file dbldblarith.h.
◆ SCIPquadprecSumQQ
#define SCIPquadprecSumQQ | ( | r, | |
a, | |||
b | |||
) | SCIPdbldblSum22(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), QUAD_HI(b), QUAD_LO(b)) |
Definition at line 67 of file dbldblarith.h.
◆ SCIPquadprecSquareQ
#define SCIPquadprecSquareQ | ( | r, | |
a | |||
) | SCIPdbldblSquare2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a)) |
Definition at line 68 of file dbldblarith.h.
◆ SCIPquadprecDivQQ
#define SCIPquadprecDivQQ | ( | r, | |
a, | |||
b | |||
) | SCIPdbldblDiv22(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), QUAD_HI(b), QUAD_LO(b)) |
Definition at line 69 of file dbldblarith.h.
◆ SCIPquadprecSqrtD
Definition at line 70 of file dbldblarith.h.
◆ SCIPquadprecSqrtQ
Definition at line 71 of file dbldblarith.h.
◆ SCIPquadprecAbsQ
Definition at line 72 of file dbldblarith.h.
◆ SCIPquadprecFloorQ
#define SCIPquadprecFloorQ | ( | r, | |
a | |||
) | SCIPdbldblFloor2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a)) |
Definition at line 73 of file dbldblarith.h.
◆ SCIPquadprecCeilQ
Definition at line 74 of file dbldblarith.h.
◆ SCIPquadprecEpsFloorQ
#define SCIPquadprecEpsFloorQ | ( | r, | |
a, | |||
eps | |||
) | SCIPdbldblEpsFloor2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), eps) |
Definition at line 75 of file dbldblarith.h.
◆ SCIPquadprecEpsCeilQ
#define SCIPquadprecEpsCeilQ | ( | r, | |
a, | |||
eps | |||
) | SCIPdbldblEpsCeil2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), eps) |
Definition at line 76 of file dbldblarith.h.
◆ SCIPdbldblProd
multiply two floating point numbers, both given by one double, and return the result as two doubles.
Definition at line 126 of file dbldblarith.h.
◆ SCIPdbldblSquare
#define SCIPdbldblSquare | ( | rhi, | |
rlo, | |||
a | |||
) |
square a floating point number given by one double and return the result as two doubles.
Definition at line 142 of file dbldblarith.h.
◆ SCIPdbldblSum
add two floating point numbers, both given by one double, and return the result as two doubles.
Definition at line 154 of file dbldblarith.h.
◆ SCIPdbldblDiv
divide two floating point numbers, both given by one double, and return the result as two doubles.
Definition at line 165 of file dbldblarith.h.
◆ SCIPdbldblSum21
#define SCIPdbldblSum21 | ( | rhi, | |
rlo, | |||
ahi, | |||
alo, | |||
b | |||
) |
add two floating point numbers, the first is given by two doubles, the second is given by one double, and return the result as two doubles.
Definition at line 180 of file dbldblarith.h.
◆ SCIPdbldblProd21
#define SCIPdbldblProd21 | ( | rhi, | |
rlo, | |||
ahi, | |||
alo, | |||
b | |||
) |
multiply two floating point numbers, the first is given by two doubles, the second is given by one double, and return the result as two doubles.
Definition at line 193 of file dbldblarith.h.
◆ SCIPdbldblDiv12
#define SCIPdbldblDiv12 | ( | rhi, | |
rlo, | |||
a, | |||
bhi, | |||
blo | |||
) |
divide two floating point numbers, the first is given by one double, the second is given by two doubles, and return the result as two doubles.
Definition at line 205 of file dbldblarith.h.
◆ SCIPdbldblDiv21
#define SCIPdbldblDiv21 | ( | rhi, | |
rlo, | |||
ahi, | |||
alo, | |||
b | |||
) |
divide two floating point numbers, the first is given by two doubles, the second is given by one double, and return the result as two doubles.
Definition at line 221 of file dbldblarith.h.
◆ SCIPdbldblProd22
#define SCIPdbldblProd22 | ( | rhi, | |
rlo, | |||
ahi, | |||
alo, | |||
bhi, | |||
blo | |||
) |
multiply two floating point numbers, both given by two doubles, and return the result as two doubles.
Definition at line 237 of file dbldblarith.h.
◆ SCIPdbldblSum22
#define SCIPdbldblSum22 | ( | rhi, | |
rlo, | |||
ahi, | |||
alo, | |||
bhi, | |||
blo | |||
) |
add two floating point numbers, both given by two doubles, and return the result as two doubles.
Definition at line 249 of file dbldblarith.h.
◆ SCIPdbldblSquare2
#define SCIPdbldblSquare2 | ( | rhi, | |
rlo, | |||
ahi, | |||
alo | |||
) |
square a floating point number given by two doubles and return the result as two doubles.
Definition at line 258 of file dbldblarith.h.
◆ SCIPdbldblDiv22
#define SCIPdbldblDiv22 | ( | rhi, | |
rlo, | |||
ahi, | |||
alo, | |||
bhi, | |||
blo | |||
) |
divide two floating point numbers, both given by two doubles, and return the result as two doubles.
Definition at line 267 of file dbldblarith.h.
◆ SCIPdbldblSqrt
#define SCIPdbldblSqrt | ( | rhi, | |
rlo, | |||
a | |||
) |
take the square root of a floating point number given by one double and return the result as two doubles.
Definition at line 285 of file dbldblarith.h.
◆ SCIPdbldblSqrt2
#define SCIPdbldblSqrt2 | ( | rhi, | |
rlo, | |||
ahi, | |||
alo | |||
) |
take the square root of a floating point number given by two doubles and return the result as two doubles.
Definition at line 304 of file dbldblarith.h.
◆ SCIPdbldblAbs2
#define SCIPdbldblAbs2 | ( | rhi, | |
rlo, | |||
ahi, | |||
alo | |||
) |
compute the absolute value of the floating point number given by two doubles
Definition at line 322 of file dbldblarith.h.
◆ SCIPdbldblFloor2
#define SCIPdbldblFloor2 | ( | rhi, | |
rlo, | |||
ahi, | |||
alo | |||
) |
compute the floored value of the floating point number given by two doubles
Definition at line 337 of file dbldblarith.h.
◆ SCIPdbldblCeil2
#define SCIPdbldblCeil2 | ( | rhi, | |
rlo, | |||
ahi, | |||
alo | |||
) |
compute the ceiled value of the floating point number given by two doubles
Definition at line 357 of file dbldblarith.h.
◆ SCIPdbldblEpsFloor2
#define SCIPdbldblEpsFloor2 | ( | rhi, | |
rlo, | |||
ahi, | |||
alo, | |||
eps | |||
) | SCIPdbldblFloor2(rhi, rlo, ahi, (alo) + (eps)) |
compute the floored value of the floating point number given by two doubles, add epsilon first for safety
Definition at line 377 of file dbldblarith.h.
◆ SCIPdbldblEpsCeil2
#define SCIPdbldblEpsCeil2 | ( | rhi, | |
rlo, | |||
ahi, | |||
alo, | |||
eps | |||
) | SCIPdbldblCeil2(rhi, rlo, ahi, (alo) - (eps)) |
compute the ceiled value of the floating point number given by two doubles, subtract epsilon first for safety
Definition at line 380 of file dbldblarith.h.