Fundamentals of CS I (CS151 2001S) : Reference

complex?: determine if a number is complex

Parametersn, a number
PurposeDetermines if v is a complex number (including an optional complex part).
ProducesA truth value: true (#t) if n is a complex number, false (#f) if it's not a complex number.
PreconditionsOnly one parameter (verified).
PostconditionsReturns true if and only if the parameter is a complex number.
> (complex? (sqrt -1))
> (complex? 1)
> (complex? 3/2)
> (complex? -1/2)
> (complex? 1.3)
> (complex? (sqrt 2))
> (complex? 'a)

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:47:52 2001.
This page may be found at
You may validate this page's HTML.
The source was last modified Wed Jan 31 22:40:15 2001.