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"#include "scip/rational.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) |
| #define | CALCR(c, 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) |
| #define SCIP_ROUND_DOWNWARDS 0 |
round always down
Definition at line 234 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().
| #define SCIP_ROUND_UPWARDS 1 |
round always up
Definition at line 235 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().
| #define SCIP_ROUND_NEAREST 2 |
round always to nearest
Definition at line 236 of file intervalarith.c.
Referenced by intervalGetRoundingMode(), SCIPintervalCos(), SCIPintervalEntropy(), SCIPintervalExp(), SCIPintervalLog(), SCIPintervalPowerScalar(), SCIPintervalPowerScalarScalar(), SCIPintervalSetRoundingModeToNearest(), SCIPintervalSignPowerScalar(), SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar(), and SCIPintervalSquareRoot().
| #define SCIP_ROUND_ZERO 3 |
round always towards zero
Definition at line 237 of file intervalarith.c.
Referenced by SCIPintervalSetRoundingModeTowardsZero().
| #define CALCB | ( | y | ) |
Referenced by SCIPintervalSolveBivariateQuadExpressionAllScalar().
Referenced by SCIPintervalSolveBivariateQuadExpressionAllScalar().
|
static |
sets rounding mode of floating point operations
| roundmode | rounding mode to activate |
Definition at line 249 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().
|
static |
gets current rounding mode of floating point operations
Definition at line 258 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().
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".
| x | number that should be negated |
Definition at line 334 of file intervalarith.c.
References SCIP_Real, SCIPnegateReal(), and x.
Referenced by aggregation(), SCIPintervalNegateReal(), SCIPintervalPowerScalarInteger(), SCIPintervalQuadUpperBound(), SCIPintervalSignPowerScalar(), and SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar().
|
static |
Definition at line 2713 of file intervalarith.c.
Referenced by SCIPintervalCos(), and SCIPintervalSin().
|
static |
Definition at line 2714 of file intervalarith.c.
Referenced by SCIPintervalCos(), and SCIPintervalSin().