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 233 of file intervalarith.c.
◆ SCIP_ROUND_UPWARDS
#define SCIP_ROUND_UPWARDS 1 |
round always up
Definition at line 234 of file intervalarith.c.
◆ SCIP_ROUND_NEAREST
#define SCIP_ROUND_NEAREST 2 |
round always to nearest
Definition at line 235 of file intervalarith.c.
◆ SCIP_ROUND_ZERO
#define SCIP_ROUND_ZERO 3 |
round always towards zero
Definition at line 236 of file intervalarith.c.
◆ CALCB
◆ CALCR
Function Documentation
◆ intervalSetRoundingMode()
|
static |
sets rounding mode of floating point operations
- Parameters
-
roundmode rounding mode to activate
Definition at line 248 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 257 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 333 of file intervalarith.c.
References SCIPnegateReal(), and x.
Referenced by aggregation(), SCIPintervalNegateReal(), SCIPintervalPowerScalarInteger(), SCIPintervalQuadUpperBound(), SCIPintervalSignPowerScalar(), and SCIPintervalSolveUnivariateQuadExpressionPositiveAllScalar().
Variable Documentation
◆ pi_d_l
|
static |
Definition at line 2692 of file intervalarith.c.
Referenced by SCIPintervalCos(), and SCIPintervalSin().
◆ pi_d_u
|
static |
Definition at line 2693 of file intervalarith.c.
Referenced by SCIPintervalCos(), and SCIPintervalSin().