Next: , Previous: , Up: baselib math ops   [Index]


4.6.4.2 Exactness conversion

These procedures implement the natural one–to-one correspondence between exact and inexact integer objects throughout an implementation–dependent range. The inexact and exact procedures are idempotent.

Procedure: inexact z

The inexact procedure returns an inexact representation of z. If inexact number objects of the appropriate type have bounded precision, then the value returned is an inexact number object that is nearest to the argument. If an exact argument has no reasonably close inexact equivalent, an exception with condition type &implementation-restriction-violation may be raised.

NOTE For a real number object whose magnitude is finite but so large that it has no reasonable finite approximation as an inexact number, a reasonably close inexact equivalent may be +inf.0 or -inf.0. Similarly, the inexact representation of a complex number object whose components are finite may have infinite components.

Procedure: exact z

The exact procedure returns an exact representation of z. The value returned is the exact number object that is numerically closest to the argument; in most cases, the result of this procedure should be numerically equal to its argument. If an inexact argument has no reasonably close exact equivalent, an exception with condition type &implementation-restriction-violation may be raised.