Numerical computation occurs within the context of an environment containing the rounding mode and exception flags. An environment class object encapsulates the environment within a block.
In the typical case, you instantiate an environment object in a block:
Unless otherwise specified, a function is assumed to be called with rounding to nearest; it will not clear any exception flags raised at the time of its invocation, but might set flags according to its own behavior.