GNU Info

Info Node: (guile.info)Exactness

(guile.info)Exactness


Next: Number Syntax Prev: Complex Numbers Up: Numbers
Enter node , (file) or (file)node

Exact and Inexact Numbers
-------------------------

R5RS requires that a calculation involving inexact numbers always
produces an inexact result.  To meet this requirement, Guile
distinguishes between an exact integer value such as `5' and the
corresponding inexact real value which, to the limited precision
available, has no fractional part, and is printed as `5.0'.  Guile will
only convert the latter value to the former when forced to do so by an
invocation of the `inexact->exact' procedure.

 - primitive: exact? x
     Return #t if X is an exact number, #f otherwise.

 - primitive: inexact? x
     Return #t if X is an inexact number, #f else.

 - primitive: inexact->exact z
     Returns an exact number that is numerically closest to Z.

 - primitive: exact->inexact


automatically generated by info2www version 1.2.2.9