nag_real_arithmetic_rounds (X02DJC) (PDF version)
x02 Chapter Contents
x02 Chapter Introduction
NAG C Library Manual

NAG Library Function Document

nag_real_arithmetic_rounds (X02DJC)

+ Contents

    1  Purpose
    7  Accuracy
    9  Example

1  Purpose

nag_real_arithmetic_rounds (X02DJC) returns the ROUNDS argument of the model of floating point arithmetic (see Section 2.1.1 in the x02 Chapter Introduction).

2  Specification

#include <nag.h>
#include <nagx02.h>
Nag_Boolean  nag_real_arithmetic_rounds

3  Description

nag_real_arithmetic_rounds (X02DJC) is a constant defined in the C Header file.
nag_real_arithmetic_rounds (X02DJC) indicates the rules obeyed by the model numbers for the computed results of the following basic arithmetic operations: addition, subtraction, multiplication, negation, absolute value, and comparisons.
If ROUNDS is Nag_TRUE, then the computed result must be the nearest model number to the exact result (assuming that overflow or underflow does not occur); if the exact result is midway between two model numbers, then it may be rounded either way.
If ROUNDS is Nag_FALSE, then: if the exact result is a model number, then the computed result must be equal to the exact result, otherwise the computed result may be either of the adjacent model numbers on either side of the exact result.

4  References

None.

5  Arguments

None.

6  Error Indicators and Warnings

None.

7  Accuracy

None.

8  Further Comments

None.

9  Example

None.

nag_real_arithmetic_rounds (X02DJC) (PDF version)
x02 Chapter Contents
x02 Chapter Introduction
NAG C Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012