Detailed Description
interval arithmetics for provable bounds
Definition in file intervalarith.c.
#include <stdlib.h>
#include <assert.h>
#include <math.h>
#include "scip/def.h"
#include "scip/intervalarith.h"
#include "scip/pub_message.h"
#include "scip/misc.h"
Go to the source code of this file.
Macros | |
#define | SCIP_ROUND_DOWNWARDS 0 |
#define | SCIP_ROUND_UPWARDS 1 |
#define | SCIP_ROUND_NEAREST 2 |
#define | SCIP_ROUND_ZERO 3 |
#define | CALCB(y) ((bx + axy * (y)) / (2.0 * sqrtax)) |
#define | CALCR(c, y) (rcoef_const + (c) + (rcoef_y + rcoef_yy * (y)) * (y)) |
Variables | |
static const double | pi_d_l = (3373259426.0 + 273688.0 / (1<<21)) / (1<<30) |
static const double | pi_d_u = (3373259426.0 + 273689.0 / (1<<21)) / (1<<30) |
Macro Definition Documentation
◆ SCIP_ROUND_DOWNWARDS
#define SCIP_ROUND_DOWNWARDS 0 |
round always down
Definition at line 221 of file intervalarith.c.
Referenced by SCIPintervalAdd(), SCIPintervalAddInf(), SCIPintervalAddScalar(), SCIPintervalAddVectors(), SCIPintervalDiv(), SCIPintervalDivScalar(), SCIPintervalMul(), SCIPintervalMulInf(), SCIPintervalMulScalar(), SCIPintervalMulScalarInf(), SCIPintervalPowerScalarIntegerInf(), SCIPintervalReciprocal(), SCIPintervalScalprod(), SCIPintervalScalprodScalars(), SCIPintervalScalprodScalarsInf(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSignPowerScalar(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), SCIPintervalSquare(), and SCIPintervalSub().
◆ SCIP_ROUND_UPWARDS
#define SCIP_ROUND_UPWARDS 1 |
round always up
Definition at line 222 of file intervalarith.c.
Referenced by SCIPintervalAdd(), SCIPintervalAddScalar(), SCIPintervalAddSup(), SCIPintervalAddVectors(), SCIPintervalDiv(), SCIPintervalDivScalar(), SCIPintervalMul(), SCIPintervalMulScalar(), SCIPintervalMulScalarSup(), SCIPintervalMulSup(), SCIPintervalPowerScalarInteger(), SCIPintervalPowerScalarIntegerSup(), SCIPintervalQuadUpperBound(), SCIPintervalReciprocal(), SCIPintervalScalprod(), SCIPintervalScalprodScalars(), SCIPintervalScalprodScalarsSup(), SCIPintervalSetRoundingModeUpwards(), SCIPintervalSignPowerScalar(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), SCIPintervalSquare(), and SCIPintervalSub().
◆ SCIP_ROUND_NEAREST
#define SCIP_ROUND_NEAREST 2 |
round always to nearest
Definition at line 223 of file intervalarith.c.
Referenced by intervalGetRoundingMode(), SCIPintervalCos(), SCIPintervalEntropy(), SCIPintervalExp(), SCIPintervalLog(), SCIPintervalPowerScalar(), SCIPintervalPowerScalarScalar(), SCIPintervalSetRoundingModeToNearest(), SCIPintervalSignPowerScalar(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), and SCIPintervalSquareRoot().
◆ SCIP_ROUND_ZERO
#define SCIP_ROUND_ZERO 3 |
round always towards zero
Definition at line 224 of file intervalarith.c.
Referenced by SCIPintervalSetRoundingModeTowardsZero().
◆ CALCB
Referenced by SCIPintervalSolveBivariateQuadExpressionAllScalar().
◆ CALCR
Referenced by SCIPintervalSolveBivariateQuadExpressionAllScalar().
Function Documentation
◆ intervalSetRoundingMode()
|
static |
sets rounding mode of floating point operations
- Parameters
-
roundmode rounding mode to activate
Definition at line 236 of file intervalarith.c.
References SCIPerrorMessage.
Referenced by SCIPintervalAdd(), SCIPintervalAddScalar(), SCIPintervalAddVectors(), SCIPintervalDiv(), SCIPintervalDivScalar(), SCIPintervalMul(), SCIPintervalMulScalar(), SCIPintervalPowerScalarInteger(), SCIPintervalPowerScalarIntegerInf(), SCIPintervalPowerScalarIntegerSup(), SCIPintervalQuadUpperBound(), SCIPintervalReciprocal(), SCIPintervalScalprod(), SCIPintervalScalprodScalars(), SCIPintervalSetRoundingMode(), SCIPintervalSetRoundingModeDownwards(), SCIPintervalSetRoundingModeToNearest(), SCIPintervalSetRoundingModeTowardsZero(), SCIPintervalSetRoundingModeUpwards(), SCIPintervalSignPowerScalar(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), SCIPintervalSquare(), and SCIPintervalSub().
◆ intervalGetRoundingMode()
|
static |
gets current rounding mode of floating point operations
Definition at line 245 of file intervalarith.c.
References SCIP_ROUND_NEAREST.
Referenced by SCIPintervalAdd(), SCIPintervalAddInf(), SCIPintervalAddScalar(), SCIPintervalAddSup(), SCIPintervalAddVectors(), SCIPintervalDiv(), SCIPintervalDivScalar(), SCIPintervalExp(), SCIPintervalGetRoundingMode(), SCIPintervalLog(), SCIPintervalMul(), SCIPintervalMulInf(), SCIPintervalMulScalar(), SCIPintervalMulScalarInf(), SCIPintervalMulScalarSup(), SCIPintervalMulSup(), SCIPintervalPowerScalar(), SCIPintervalPowerScalarInteger(), SCIPintervalPowerScalarIntegerInf(), SCIPintervalPowerScalarIntegerSup(), SCIPintervalPowerScalarScalar(), SCIPintervalQuadUpperBound(), SCIPintervalReciprocal(), SCIPintervalScalprod(), SCIPintervalScalprodScalars(), SCIPintervalScalprodScalarsInf(), SCIPintervalScalprodScalarsSup(), SCIPintervalSignPowerScalar(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), SCIPintervalSquare(), SCIPintervalSquareRoot(), and SCIPintervalSub().
◆ negate()
gets the negation of a double
Fallback implementation that calls the negation method from misc.o. Having the implementation in a different object file will hopefully prevent it from being "optimized away".
- Parameters
-
x number that should be negated
Definition at line 321 of file intervalarith.c.
References SCIPnegateReal().
Referenced by polyscip::global::print(), SCIPintervalGetRoundingMode(), SCIPintervalNegateReal(), SCIPintervalPowerScalarInteger(), SCIPintervalQuadUpperBound(), SCIPintervalSignPowerScalar(), and SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar().
Variable Documentation
◆ pi_d_l
|
static |
Definition at line 2680 of file intervalarith.c.
◆ pi_d_u
|
static |
Definition at line 2681 of file intervalarith.c.