Fundamentals of CS I (CS151 2001S) : Reference

inexact?: determine if a number is approximated

Predicateinexact?
Parametersn, a number
PurposeDetermines if n is not an exact number, and therefore approximated.
ProducesA truth value: true (#t) if n is not an exact number, false (#f) if it is an exact number. A number is exact if Scheme represents it exactly (with no rounding off).
PreconditionsOnly one parameter (verified).
n is a number (verified).
Examples
> (inexact? 'a)
inexact?: expects argument of type <number> given a
> (inexact? 12.2)
#t
> (inexact? 3)
#f
> (inexact? 3 4)
inexact?: expects 1 argument, given 2: 3 4
> (inexact?)
inexact?: expects 1 argument, given 0

Disclaimer: I usually create these pages on the fly. This means that they are rarely proofread and may contain bad grammar and incorrect details. It also means that I may update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.

This page was generated by Siteweaver on Thu Feb 22 05:48:01 2001.
This page may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS151/2001S/inexact-p.html.
You may validate this page's HTML.
The source was last modified Sun Feb 4 21:40:38 2001.