Ada Programming/Attributes/'Machine Rounding

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Description

[edit | edit source]

Yields the integral value nearest to X.

The function yields the integral value nearest to X.

If X lies exactly halfway between two integers, one of those integers is returned, but which of them is returned is unspecified.

A zero result has the sign of X when S'Signed_Zeros is True.

This function provides access to the rounding behavior which is most efficient on the target processor.

Example

[edit | edit source]
SMachine_Rounding (X:T) return T