Scippy

SCIP

Solving Constraint Integer Programs

dbldblarith.h File Reference

Detailed Description

defines macros for basic operations in double-double arithmetic giving roughly twice the precision of a double

Author
Leona Gottwald

Definition in file dbldblarith.h.

#include "math.h"

Go to the source code of this file.

Macros

#define QUAD_EPSILON   1e-12
 
#define QUAD_HI(x)   x ## hi
 
#define QUAD_LO(x)   x ## lo
 
#define QUAD(x)   QUAD_HI(x), QUAD_LO(x)
 
#define QUAD_MEMBER(x)   QUAD_HI(x); QUAD_LO(x)
 
#define QUAD_TO_DBL(x)   ( QUAD_HI(x) + QUAD_LO(x) )
 
#define QUAD_SCALE(x, a)   do { QUAD_HI(x) *= (a); QUAD_LO(x) *= (a); } while(0)
 
#define QUAD_ASSIGN(a, constant)   do { QUAD_HI(a) = (constant); QUAD_LO(a) = 0.0; } while(0)
 
#define QUAD_ASSIGN_Q(a, b)   do { QUAD_HI(a) = QUAD_HI(b); QUAD_LO(a) = QUAD_LO(b); } while(0)
 
#define QUAD_ARRAY_SIZE(size)   ((size)*2)
 
#define QUAD_ARRAY_LOAD(r, a, idx)   do { QUAD_HI(r) = (a)[2*(idx)]; QUAD_LO(r) = (a)[2*(idx) + 1]; } while(0)
 
#define QUAD_ARRAY_STORE(a, idx, x)   do { (a)[2*(idx)] = QUAD_HI(x); (a)[2*(idx) + 1] = QUAD_LO(x); } while(0)
 
#define SCIPquadprecProdDD(r, a, b)   SCIPdbldblProd(QUAD_HI(r), QUAD_LO(r), a, b)
 
#define SCIPquadprecSquareD(r, a)   SCIPdbldblSquare(QUAD_HI(r), QUAD_LO(r), a)
 
#define SCIPquadprecSumDD(r, a, b)   SCIPdbldblSum(QUAD_HI(r), QUAD_LO(r), a, b)
 
#define SCIPquadprecDivDD(r, a, b)   SCIPdbldblDiv(QUAD_HI(r), QUAD_LO(r), a, b)
 
#define SCIPquadprecSumQD(r, a, b)   SCIPdbldblSum21(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), b)
 
#define SCIPquadprecProdQD(r, a, b)   SCIPdbldblProd21(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), b)
 
#define SCIPquadprecDivDQ(r, a, b)   SCIPdbldblDiv12(QUAD_HI(r), QUAD_LO(r), a, QUAD_HI(b), QUAD_LO(b))
 
#define SCIPquadprecDivQD(r, a, b)   SCIPdbldblDiv21(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), b)
 
#define SCIPquadprecProdQQ(r, a, b)   SCIPdbldblProd22(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), QUAD_HI(b), QUAD_LO(b))
 
#define SCIPquadprecSumQQ(r, a, b)   SCIPdbldblSum22(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), QUAD_HI(b), QUAD_LO(b))
 
#define SCIPquadprecSquareQ(r, a)   SCIPdbldblSquare2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a))
 
#define SCIPquadprecDivQQ(r, a, b)   SCIPdbldblDiv22(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), QUAD_HI(b), QUAD_LO(b))
 
#define SCIPquadprecSqrtD(r, a)   SCIPdbldblSqrt(QUAD_HI(r), QUAD_LO(r), a)
 
#define SCIPquadprecSqrtQ(r, a)   SCIPdbldblSqrt2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a))
 
#define SCIPquadprecAbsQ(r, a)   SCIPdbldblAbs2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a))
 
#define SCIPquadprecFloorQ(r, a)   SCIPdbldblFloor2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a))
 
#define SCIPquadprecCeilQ(r, a)   SCIPdbldblCeil2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a))
 
#define SCIPquadprecEpsFloorQ(r, a, eps)   SCIPdbldblEpsFloor2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), eps)
 
#define SCIPquadprecEpsCeilQ(r, a, eps)   SCIPdbldblEpsCeil2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), eps)
 
#define SCIPdbldblProd(rhi, rlo, a, b)
 
#define SCIPdbldblSquare(rhi, rlo, a)
 
#define SCIPdbldblSum(rhi, rlo, a, b)
 
#define SCIPdbldblDiv(rhi, rlo, a, b)
 
#define SCIPdbldblSum21(rhi, rlo, ahi, alo, b)
 
#define SCIPdbldblProd21(rhi, rlo, ahi, alo, b)
 
#define SCIPdbldblDiv12(rhi, rlo, a, bhi, blo)
 
#define SCIPdbldblDiv21(rhi, rlo, ahi, alo, b)
 
#define SCIPdbldblProd22(rhi, rlo, ahi, alo, bhi, blo)
 
#define SCIPdbldblSum22(rhi, rlo, ahi, alo, bhi, blo)
 
#define SCIPdbldblSquare2(rhi, rlo, ahi, alo)
 
#define SCIPdbldblDiv22(rhi, rlo, ahi, alo, bhi, blo)
 
#define SCIPdbldblSqrt(rhi, rlo, a)
 
#define SCIPdbldblSqrt2(rhi, rlo, ahi, alo)
 
#define SCIPdbldblAbs2(rhi, rlo, ahi, alo)
 
#define SCIPdbldblFloor2(rhi, rlo, ahi, alo)
 
#define SCIPdbldblCeil2(rhi, rlo, ahi, alo)
 
#define SCIPdbldblEpsFloor2(rhi, rlo, ahi, alo, eps)   SCIPdbldblFloor2(rhi, rlo, ahi, (alo) + (eps))
 
#define SCIPdbldblEpsCeil2(rhi, rlo, ahi, alo, eps)   SCIPdbldblCeil2(rhi, rlo, ahi, (alo) - (eps))
 

Macro Definition Documentation

◆ QUAD_EPSILON

◆ QUAD_HI

◆ QUAD_LO

#define QUAD_LO (   x)    x ## lo

Definition at line 46 of file dbldblarith.h.

Referenced by SCIPcalcMIR(), SCIPcalcStrongCG(), and SCIPcutGenerationHeuristicCMIR().

◆ QUAD

#define QUAD (   x)    QUAD_HI(x), QUAD_LO(x)

◆ QUAD_MEMBER

#define QUAD_MEMBER (   x)    QUAD_HI(x); QUAD_LO(x)

Definition at line 48 of file dbldblarith.h.

◆ QUAD_TO_DBL

◆ QUAD_SCALE

#define QUAD_SCALE (   x,
  a 
)    do { QUAD_HI(x) *= (a); QUAD_LO(x) *= (a); } while(0)

◆ QUAD_ASSIGN

◆ QUAD_ASSIGN_Q

◆ QUAD_ARRAY_SIZE

#define QUAD_ARRAY_SIZE (   size)    ((size)*2)

◆ QUAD_ARRAY_LOAD

◆ QUAD_ARRAY_STORE

◆ SCIPquadprecProdDD

◆ SCIPquadprecSquareD

#define SCIPquadprecSquareD (   r,
  a 
)    SCIPdbldblSquare(QUAD_HI(r), QUAD_LO(r), a)

Definition at line 59 of file dbldblarith.h.

Referenced by evalPhiAtRay().

◆ SCIPquadprecSumDD

◆ SCIPquadprecDivDD

#define SCIPquadprecDivDD (   r,
  a,
  b 
)    SCIPdbldblDiv(QUAD_HI(r), QUAD_LO(r), a, b)

◆ SCIPquadprecSumQD

◆ SCIPquadprecProdQD

◆ SCIPquadprecDivDQ

#define SCIPquadprecDivDQ (   r,
  a,
  b 
)    SCIPdbldblDiv12(QUAD_HI(r), QUAD_LO(r), a, QUAD_HI(b), QUAD_LO(b))

◆ SCIPquadprecDivQD

#define SCIPquadprecDivQD (   r,
  a,
  b 
)    SCIPdbldblDiv21(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a), b)

◆ SCIPquadprecProdQQ

◆ SCIPquadprecSumQQ

◆ 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.

Referenced by computeBilinEnvelope2(), and SCIPcomputeBilinEnvelope1().

◆ 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.

Referenced by computeBilinEnvelope2(), and SCIPcomputeBilinEnvelope1().

◆ SCIPquadprecSqrtD

#define SCIPquadprecSqrtD (   r,
  a 
)    SCIPdbldblSqrt(QUAD_HI(r), QUAD_LO(r), a)

Definition at line 70 of file dbldblarith.h.

◆ SCIPquadprecSqrtQ

#define SCIPquadprecSqrtQ (   r,
  a 
)    SCIPdbldblSqrt2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a))

Definition at line 71 of file dbldblarith.h.

Referenced by computeBilinEnvelope2(), and evalPhiAtRay().

◆ SCIPquadprecAbsQ

#define SCIPquadprecAbsQ (   r,
  a 
)    SCIPdbldblAbs2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a))

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

#define SCIPquadprecCeilQ (   r,
  a 
)    SCIPdbldblCeil2(QUAD_HI(r), QUAD_LO(r), QUAD_HI(a), QUAD_LO(a))

Definition at line 74 of file dbldblarith.h.

◆ SCIPquadprecEpsFloorQ

◆ 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

#define SCIPdbldblProd (   rhi,
  rlo,
  a,
  b 
)
Value:
do { \
double __tmp_dbldbl_prod_ahi; \
double __tmp_dbldbl_prod_alo; \
double __tmp_dbldbl_prod_bhi; \
double __tmp_dbldbl_prod_blo; \
__SCIPdbldblSplit(__tmp_dbldbl_prod_ahi, __tmp_dbldbl_prod_alo, a); \
__SCIPdbldblSplit(__tmp_dbldbl_prod_bhi, __tmp_dbldbl_prod_blo, b); \
(rhi) = (a) * (b); \
(rlo) = __tmp_dbldbl_prod_alo * __tmp_dbldbl_prod_blo - \
((((rhi) - __tmp_dbldbl_prod_ahi * __tmp_dbldbl_prod_bhi) \
- __tmp_dbldbl_prod_alo * __tmp_dbldbl_prod_bhi) \
- __tmp_dbldbl_prod_ahi * __tmp_dbldbl_prod_blo); \
} while(0)
SCIP_VAR ** b
Definition: circlepacking.c:65
SCIP_VAR * a
Definition: circlepacking.c:66

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 
)
Value:
do { \
double __tmp_dbldbl_square_ahi; \
double __tmp_dbldbl_square_alo; \
__SCIPdbldblSplit(__tmp_dbldbl_square_ahi, __tmp_dbldbl_square_alo, a); \
(rhi) = (a) * (a); \
(rlo) = __tmp_dbldbl_square_alo * __tmp_dbldbl_square_alo - \
((((rhi) - __tmp_dbldbl_square_ahi * __tmp_dbldbl_square_ahi) \
- 2.0 * __tmp_dbldbl_square_alo * __tmp_dbldbl_square_ahi)); \
} while(0)
SCIP_VAR * a
Definition: circlepacking.c:66

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

#define SCIPdbldblSum (   rhi,
  rlo,
  a,
  b 
)
Value:
do { \
double __tmp1_dbldbl_sum; \
double __tmp2_dbldbl_sum; \
__tmp2_dbldbl_sum = (a) + (b); \
__tmp1_dbldbl_sum = __tmp2_dbldbl_sum - (a); \
(rlo) = ((a) - (__tmp2_dbldbl_sum - __tmp1_dbldbl_sum)) + ((b) - __tmp1_dbldbl_sum); \
(rhi) = __tmp2_dbldbl_sum; \
} while(0)
SCIP_VAR ** b
Definition: circlepacking.c:65
SCIP_VAR * a
Definition: circlepacking.c:66

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

#define SCIPdbldblDiv (   rhi,
  rlo,
  a,
  b 
)
Value:
do { \
double __tmp_dbldbl_div_hi; \
double __tmp_dbldbl_div_lo; \
double __estim_dbldbl_div = (a)/(b); \
SCIPdbldblProd(__tmp_dbldbl_div_hi, __tmp_dbldbl_div_lo, b, __estim_dbldbl_div); \
SCIPdbldblSum21(__tmp_dbldbl_div_hi, __tmp_dbldbl_div_lo, __tmp_dbldbl_div_hi, __tmp_dbldbl_div_lo, -(a)); \
__tmp_dbldbl_div_hi /= (b); \
__tmp_dbldbl_div_lo /= (b); \
SCIPdbldblSum21(rhi, rlo, -__tmp_dbldbl_div_hi, -__tmp_dbldbl_div_lo, __estim_dbldbl_div); \
} while(0)
SCIP_VAR ** b
Definition: circlepacking.c:65
SCIP_VAR * a
Definition: circlepacking.c:66

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 
)
Value:
do { \
double __tmp_dbldbl_sum21_hi; \
double __tmp_dbldbl_sum21_lo; \
SCIPdbldblSum(__tmp_dbldbl_sum21_hi, __tmp_dbldbl_sum21_lo, ahi, b); \
(rlo) = __tmp_dbldbl_sum21_lo + (alo); \
(rhi) = __tmp_dbldbl_sum21_hi; \
} while(0)
SCIP_VAR ** b
Definition: circlepacking.c:65

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 
)
Value:
do { \
double __tmp_dbldbl_prod21_hi; \
double __tmp_dbldbl_prod21_lo; \
SCIPdbldblProd(__tmp_dbldbl_prod21_hi, __tmp_dbldbl_prod21_lo, ahi, b); \
(rlo) = (alo) * (b) + __tmp_dbldbl_prod21_lo; \
(rhi) = __tmp_dbldbl_prod21_hi; \
} while(0)
SCIP_VAR ** b
Definition: circlepacking.c:65

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 
)
Value:
do { \
double __tmp_dbldbl_div12_hi; \
double __tmp_dbldbl_div12_lo; \
double __estim_dbldbl_div12 = (a)/(bhi); \
SCIPdbldblProd21(__tmp_dbldbl_div12_hi, __tmp_dbldbl_div12_lo, bhi, blo, __estim_dbldbl_div12); \
SCIPdbldblSum21(__tmp_dbldbl_div12_hi, __tmp_dbldbl_div12_lo, __tmp_dbldbl_div12_hi, __tmp_dbldbl_div12_lo, -(a)); \
__tmp_dbldbl_div12_hi /= (bhi); \
__tmp_dbldbl_div12_lo /= (bhi); \
SCIPdbldblSum21(rhi, rlo, -__tmp_dbldbl_div12_hi, -__tmp_dbldbl_div12_lo, __estim_dbldbl_div12); \
} while(0)
SCIP_VAR * a
Definition: circlepacking.c:66

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 
)
Value:
do { \
double __tmp_dbldbl_div21_hi; \
double __tmp_dbldbl_div21_lo; \
double __estim_dbldbl_div21_hi; \
double __estim_dbldbl_div21_lo; \
__estim_dbldbl_div21_hi = (ahi)/(b); \
__estim_dbldbl_div21_lo = (alo)/(b); \
SCIPdbldblProd21(__tmp_dbldbl_div21_hi, __tmp_dbldbl_div21_lo, __estim_dbldbl_div21_hi, __estim_dbldbl_div21_lo, b); \
SCIPdbldblSum22(__tmp_dbldbl_div21_hi, __tmp_dbldbl_div21_lo, __tmp_dbldbl_div21_hi, __tmp_dbldbl_div21_lo, -(ahi), -(alo)); \
__tmp_dbldbl_div21_hi /= (b); \
__tmp_dbldbl_div21_lo /= (b); \
SCIPdbldblSum22(rhi, rlo, __estim_dbldbl_div21_hi, __estim_dbldbl_div21_lo, -__tmp_dbldbl_div21_hi, -__tmp_dbldbl_div21_lo); \
} while(0)
SCIP_VAR ** b
Definition: circlepacking.c:65

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 
)
Value:
do { \
double __tmp_dbldbl_prod22_hi; \
double __tmp_dbldbl_prod22_lo; \
SCIPdbldblProd(__tmp_dbldbl_prod22_hi, __tmp_dbldbl_prod22_lo, ahi, bhi); \
SCIPdbldblSum21(__tmp_dbldbl_prod22_hi, __tmp_dbldbl_prod22_lo, \
__tmp_dbldbl_prod22_hi, __tmp_dbldbl_prod22_lo, (alo) * (bhi)); \
SCIPdbldblSum21(rhi, rlo, \
__tmp_dbldbl_prod22_hi, __tmp_dbldbl_prod22_lo, (ahi) * (blo)); \
} while(0)

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 
)
Value:
do { \
double __tmp_dbldbl_sum22_hi; \
double __tmp_dbldbl_sum22_lo; \
SCIPdbldblSum21(__tmp_dbldbl_sum22_hi, __tmp_dbldbl_sum22_lo, ahi, alo, bhi); \
SCIPdbldblSum21(rhi, rlo, __tmp_dbldbl_sum22_hi, __tmp_dbldbl_sum22_lo, blo); \
} while(0)

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 
)
Value:
do { \
double __tmp_dbldbl_square2_hi; \
double __tmp_dbldbl_square2_lo; \
SCIPdbldblSquare(__tmp_dbldbl_square2_hi, __tmp_dbldbl_square2_lo, (ahi)); \
SCIPdbldblSum21(rhi, rlo, __tmp_dbldbl_square2_hi, __tmp_dbldbl_square2_lo, 2 * (ahi) * (alo)); \
} while(0)

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 
)
Value:
do { \
double __tmp_dbldbl_div22_hi; \
double __tmp_dbldbl_div22_lo; \
double __estim_dbldbl_div22_hi = (ahi) / (bhi); \
double __estim_dbldbl_div22_lo = (alo) / (bhi); \
SCIPdbldblProd22(__tmp_dbldbl_div22_hi, __tmp_dbldbl_div22_lo, \
bhi, blo, __estim_dbldbl_div22_hi, __estim_dbldbl_div22_lo); \
SCIPdbldblSum22(__tmp_dbldbl_div22_hi, __tmp_dbldbl_div22_lo, \
__tmp_dbldbl_div22_hi, __tmp_dbldbl_div22_lo, -(ahi), -(alo)); \
__tmp_dbldbl_div22_hi /= (bhi); \
__tmp_dbldbl_div22_lo /= (bhi); \
SCIPdbldblSum22(rhi, rlo, __estim_dbldbl_div22_hi, __estim_dbldbl_div22_lo, \
-__tmp_dbldbl_div22_hi, -__tmp_dbldbl_div22_lo); \
} while(0)

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 
)
Value:
do { \
double __estim_dbldbl_sqrt = sqrt(a); \
if( __estim_dbldbl_sqrt != 0.0 ) \
{ \
SCIPdbldblDiv(rhi, rlo, a, __estim_dbldbl_sqrt); \
SCIPdbldblSum21(rhi, rlo, rhi, rlo, __estim_dbldbl_sqrt); \
(rhi) *= 0.5; \
(rlo) *= 0.5; \
} \
else \
{ \
(rhi) = 0.0; \
(rlo) = 0.0; \
} \
} while(0)
SCIP_VAR * a
Definition: circlepacking.c:66

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 
)
Value:
do { \
double __estim_dbldbl_sqrt2 = sqrt(ahi + alo); \
if( __estim_dbldbl_sqrt2 != 0.0 ) \
{ \
SCIPdbldblDiv21(rhi, rlo, ahi, alo, __estim_dbldbl_sqrt2); \
SCIPdbldblSum21(rhi, rlo, rhi, rlo, __estim_dbldbl_sqrt2); \
(rhi) *= 0.5; \
(rlo) *= 0.5; \
} \
else \
{ \
(rhi) = 0.0; \
(rlo) = 0.0; \
} \
} while(0)

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 
)
Value:
do { \
if( ahi < 0.0 ) \
{ \
(rhi) = -(ahi); \
(rlo) = -(alo); \
} \
else \
{ \
(rhi) = (ahi); \
(rlo) = (alo); \
} \
} while(0)

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 
)
Value:
do { \
double __tmp_dbldbl_floor; \
__tmp_dbldbl_floor = floor((ahi) + (alo)); \
SCIPdbldblSum21(rhi, rlo, ahi, alo, -__tmp_dbldbl_floor); \
if( ((rhi) - 1.0) + (rlo) < 0.0 && (rhi) + (rlo) >= 0.0 ) \
{ \
/* floor in double precision was fine */ \
(rhi) = __tmp_dbldbl_floor; \
(rlo) = 0.0; \
} \
else \
{ \
/* floor in double precision needs to be corrected */ \
double __tmp2_dbldbl_floor = floor((rhi) + (rlo)); \
SCIPdbldblSum(rhi, rlo, __tmp_dbldbl_floor, __tmp2_dbldbl_floor); \
} \
} while(0)

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 
)
Value:
do { \
double __tmp_dbldbl_ceil; \
__tmp_dbldbl_ceil = ceil((ahi) + (alo)); \
SCIPdbldblSum21(rhi, rlo, -(ahi), -(alo), __tmp_dbldbl_ceil); \
if( ((rhi) - 1.0) + (rlo) < 0.0 && (rhi) + (rlo) >= 0.0 ) \
{ \
/* ceil in double precision was fine */ \
(rhi) = __tmp_dbldbl_ceil; \
(rlo) = 0.0; \
} \
else \
{ \
/* ceil in double precision needs to be corrected */ \
double __tmp2_dbldbl_ceil = floor((rhi) + (rlo)); \
SCIPdbldblSum(rhi, rlo, __tmp_dbldbl_ceil, -__tmp2_dbldbl_ceil); \
} \
} while(0)

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.