Gecode::Float::Rounding Class Reference
Functionality by programming task » Programming models » Using integer set variables and constraints » Float variables

Floating point rounding policy. More...

`#include <float.hh>`

## Constructor and destructor

| Rounding (void)
| Default constructor (configures full rounding mode).
| ~Rounding (void)
| Destructor (restores previous rounding mode).

## Arithmetic operations

FloatNum | add_down (FloatNum x, FloatNum y)
| Return lower bound of x plus y (domain: ).
FloatNum | add_up (FloatNum x, FloatNum y)
| Return upper bound of x plus y (domain: ).
FloatNum | sub_down (FloatNum x, FloatNum y)
| Return lower bound of x minus y (domain: ).
FloatNum | sub_up (FloatNum x, FloatNum y)
| Return upper bound of x minus y (domain: ).
FloatNum | mul_down (FloatNum x, FloatNum y)
| Return lower bound of x times y (domain: ).
FloatNum | mul_up (FloatNum x, FloatNum y)
| Return upper bound of x times y (domain: ).
FloatNum | div_down (FloatNum x, FloatNum y)
| Return lower bound of x divided by y (domain: ).
FloatNum | div_up (FloatNum x, FloatNum y)
| Return upper bound of x divided y (domain: ).
FloatNum | sqrt_down (FloatNum x)
| Return lower bound of square root of x (domain: ).
FloatNum | sqrt_up (FloatNum x)
| Return upper bound of square root of x (domain: ).

## Miscellaneous operations

FloatNum | median (FloatNum x, FloatNum y)
| Return median of x and y (domain: ).
FloatNum | int_down (FloatNum x)
| Return next downward-rounded integer of x (domain: ).
FloatNum | int_up (FloatNum x)
| Return next upward-rounded integer of x (domain: ).

## Exponential functions

FloatNum | exp_down (FloatNum x)
| Return lower bound of exponential of x (domain: ).
FloatNum | exp_up (FloatNum x)
| Return upper bound of exponential of x (domain: ).
FloatNum | log_down (FloatNum x)
| Return lower bound of logarithm of x (domain: ).
FloatNum | log_up (FloatNum x)
| Return upper bound of logarithm of x (domain: ).

## Trigonometric functions

FloatNum | sin_down (FloatNum x)
| Return lower bound of sine of x (domain: ).
FloatNum | sin_up (FloatNum x)
| Return upper bound of sine of x (domain: ).
FloatNum | cos_down (FloatNum x)
| Return lower bound of cosine of x (domain: ).
FloatNum | cos_up (FloatNum x)
| Return upper bound of cosine of x (domain: ).
FloatNum | tan_down (FloatNum x)
| Return lower bound of tangent of x (domain: ).
FloatNum | tan_up (FloatNum x)
| Return upper bound of tangent of x (domain: ).

## Inverse trigonometric functions

FloatNum | asin_down (FloatNum x)
| Return lower bound of arcsine of x (domain: ).
FloatNum | asin_up (FloatNum x)
| Return upper bound of arcsine of x (domain: ).
FloatNum | acos_down (FloatNum x)
| Return lower bound of arccosine of x (domain: ).
FloatNum | acos_up (FloatNum x)
| Return upper bound of arccossine of x (domain: ).
FloatNum | atan_down (FloatNum x)
| Return lower bound of arctangent of x (domain: ).
FloatNum | atan_up (FloatNum x)
| Return upper bound of arctangent of x (domain: ).

## Hyperbolic functions

FloatNum | sinh_down (FloatNum x)
| Return lower bound of hyperbolic sine of x (domain: ).
FloatNum | sinh_up (FloatNum x)
| Return upper bound of hyperbolic sine of x (domain: ).
FloatNum | cosh_down (FloatNum x)
| Return lower bound of hyperbolic cosine of x (domain: ).
FloatNum | cosh_up (FloatNum x)
| Return upper bound of hyperbolic cosine of x (domain: ).
FloatNum | tanh_down (FloatNum x)
| Return lower bound of hyperbolic tangent of x (domain: ).
FloatNum | tanh_up (FloatNum x)
| Return upper bound of hyperbolic tangent of x (domain: ).

## Inverse hyperbolic functions

FloatNum | asinh_down (FloatNum x)
| Return lower bound of hyperbolic arcsine of x (domain: ).
FloatNum | asinh_up (FloatNum x)
| Return upper bound of hyperbolic arcsine of x (domain: ).
FloatNum | acosh_down (FloatNum x)
| Return lower bound of hyperbolic arccosine of x (domain: ).
FloatNum | acosh_up (FloatNum x)
| Return upper bound of hyperbolic arccosine of x (domain: ).
FloatNum | atanh_down (FloatNum x)
| Return lower bound of hyperbolic arctangent of x (domain: ).
FloatNum | atanh_up (FloatNum x)
| Return upper bound of hyperbolic arctangent of x (domain: ).

## Detailed Description

Floating point rounding policy.

Definition at line 154 of file float.hh.

## Constructor & Destructor Documentation

## Rounding()

Gecode::Float::Rounding::Rounding | ( | void |  | ) |

inline

Default constructor (configures full rounding mode).

Definition at line 37 of file rounding.hpp.

## ~Rounding()

Gecode::Float::Rounding::~Rounding | ( | void |  | ) |

inline

Destructor (restores previous rounding mode).

Definition at line 41 of file rounding.hpp.

## Member Function Documentation

## add_down()

FloatNum Gecode::Float::Rounding::add_down | ( | FloatNum | x,
|  | FloatNum | y )

Return lower bound of x plus y (domain: ).

## add_up()

FloatNum Gecode::Float::Rounding::add_up | ( | FloatNum | x,
|  | FloatNum | y )

Return upper bound of x plus y (domain: ).

## sub_down()

FloatNum Gecode::Float::Rounding::sub_down | ( | FloatNum | x,
|  | FloatNum | y )

Return lower bound of x minus y (domain: ).

## sub_up()

FloatNum Gecode::Float::Rounding::sub_up | ( | FloatNum | x,
|  | FloatNum | y )

Return upper bound of x minus y (domain: ).

## mul_down()

FloatNum Gecode::Float::Rounding::mul_down | ( | FloatNum | x,
|  | FloatNum | y )

Return lower bound of x times y (domain: ).

## mul_up()

FloatNum Gecode::Float::Rounding::mul_up | ( | FloatNum | x,
|  | FloatNum | y )

Return upper bound of x times y (domain: ).

## div_down()

FloatNum Gecode::Float::Rounding::div_down | ( | FloatNum | x,
|  | FloatNum | y )

Return lower bound of x divided by y (domain: ).

## div_up()

FloatNum Gecode::Float::Rounding::div_up | ( | FloatNum | x,
|  | FloatNum | y )

Return upper bound of x divided y (domain: ).

## sqrt_down()

FloatNum Gecode::Float::Rounding::sqrt_down | ( | FloatNum | x | ) |

Return lower bound of square root of x (domain: ).

## sqrt_up()

FloatNum Gecode::Float::Rounding::sqrt_up | ( | FloatNum | x | ) |

Return upper bound of square root of x (domain: ).

## median()

FloatNum Gecode::Float::Rounding::median | ( | FloatNum | x,
|  | FloatNum | y )

inline

Return median of x and y (domain: ).

Definition at line 44 of file rounding.hpp.

## int_down()

FloatNum Gecode::Float::Rounding::int_down | ( | FloatNum | x | ) |

Return next downward-rounded integer of x (domain: ).

## int_up()

FloatNum Gecode::Float::Rounding::int_up | ( | FloatNum | x | ) |

Return next upward-rounded integer of x (domain: ).

## exp_down()

FloatNum Gecode::Float::Rounding::exp_down | ( | FloatNum | x | ) |

Return lower bound of exponential of x (domain: ).

## exp_up()

FloatNum Gecode::Float::Rounding::exp_up | ( | FloatNum | x | ) |

Return upper bound of exponential of x (domain: ).

## log_down()

FloatNum Gecode::Float::Rounding::log_down | ( | FloatNum | x | ) |

Return lower bound of logarithm of x (domain: ).

## log_up()

FloatNum Gecode::Float::Rounding::log_up | ( | FloatNum | x | ) |

Return upper bound of logarithm of x (domain: ).

## sin_down()

FloatNum Gecode::Float::Rounding::sin_down | ( | FloatNum | x | ) |

Return lower bound of sine of x (domain: ).

## sin_up()

FloatNum Gecode::Float::Rounding::sin_up | ( | FloatNum | x | ) |

Return upper bound of sine of x (domain: ).

## cos_down()

FloatNum Gecode::Float::Rounding::cos_down | ( | FloatNum | x | ) |

Return lower bound of cosine of x (domain: ).

## cos_up()

FloatNum Gecode::Float::Rounding::cos_up | ( | FloatNum | x | ) |

Return upper bound of cosine of x (domain: ).

## tan_down()

FloatNum Gecode::Float::Rounding::tan_down | ( | FloatNum | x | ) |

Return lower bound of tangent of x (domain: ).

## tan_up()

FloatNum Gecode::Float::Rounding::tan_up | ( | FloatNum | x | ) |

Return upper bound of tangent of x (domain: ).

## asin_down()

FloatNum Gecode::Float::Rounding::asin_down | ( | FloatNum | x | ) |

Return lower bound of arcsine of x (domain: ).

## asin_up()

FloatNum Gecode::Float::Rounding::asin_up | ( | FloatNum | x | ) |

Return upper bound of arcsine of x (domain: ).

## acos_down()

FloatNum Gecode::Float::Rounding::acos_down | ( | FloatNum | x | ) |

Return lower bound of arccosine of x (domain: ).

## acos_up()

FloatNum Gecode::Float::Rounding::acos_up | ( | FloatNum | x | ) |

Return upper bound of arccossine of x (domain: ).

## atan_down()

FloatNum Gecode::Float::Rounding::atan_down | ( | FloatNum | x | ) |

Return lower bound of arctangent of x (domain: ).

## atan_up()

FloatNum Gecode::Float::Rounding::atan_up | ( | FloatNum | x | ) |

Return upper bound of arctangent of x (domain: ).

## sinh_down()

FloatNum Gecode::Float::Rounding::sinh_down | ( | FloatNum | x | ) |

Return lower bound of hyperbolic sine of x (domain: ).

## sinh_up()

FloatNum Gecode::Float::Rounding::sinh_up | ( | FloatNum | x | ) |

Return upper bound of hyperbolic sine of x (domain: ).

## cosh_down()

FloatNum Gecode::Float::Rounding::cosh_down | ( | FloatNum | x | ) |

Return lower bound of hyperbolic cosine of x (domain: ).

## cosh_up()

FloatNum Gecode::Float::Rounding::cosh_up | ( | FloatNum | x | ) |

Return upper bound of hyperbolic cosine of x (domain: ).

## tanh_down()

FloatNum Gecode::Float::Rounding::tanh_down | ( | FloatNum | x | ) |

Return lower bound of hyperbolic tangent of x (domain: ).

## tanh_up()

FloatNum Gecode::Float::Rounding::tanh_up | ( | FloatNum | x | ) |

Return upper bound of hyperbolic tangent of x (domain: ).

## asinh_down()

FloatNum Gecode::Float::Rounding::asinh_down | ( | FloatNum | x | ) |

Return lower bound of hyperbolic arcsine of x (domain: ).

## asinh_up()

FloatNum Gecode::Float::Rounding::asinh_up | ( | FloatNum | x | ) |

Return upper bound of hyperbolic arcsine of x (domain: ).

## acosh_down()

FloatNum Gecode::Float::Rounding::acosh_down | ( | FloatNum | x | ) |

Return lower bound of hyperbolic arccosine of x (domain: ).

## acosh_up()

FloatNum Gecode::Float::Rounding::acosh_up | ( | FloatNum | x | ) |

Return upper bound of hyperbolic arccosine of x (domain: ).

## atanh_down()

FloatNum Gecode::Float::Rounding::atanh_down | ( | FloatNum | x | ) |

Return lower bound of hyperbolic arctangent of x (domain: ).

## atanh_up()

FloatNum Gecode::Float::Rounding::atanh_up | ( | FloatNum | x | ) |

Return upper bound of hyperbolic arctangent of x (domain: ).

The documentation for this class was generated from the following files:

- gecode/float.hh
- gecode/float/rounding.hpp