Next: , Previous: , Up: built-in numerics compnums   [Contents][Index]


6.13.14.2 The <exact-compnum> type

Core Type: <exact-compnum>
Parent Type: <compnum>

Type of compnum values having exact real and imaginary parts.

Remembering that a compnum with exact zero as imaginary part is converted to a real number by the Scheme reader and the function make-rectangular:

1+0i                            ⇒ 1
1.0+0i                          ⇒ 1.0
(make-rectangular 1 0)          ⇒ 1
(make-rectangular 1.0 0)        ⇒ 1.0

it follows that a value of type <exact-compnum> cannot be zero.

Constructor on <exact-compnum>: <exact-compnum> type-constructor obj

Validate obj as object of type <exact-compnum>. Return obj itself.

Type predicate on <exact-compnum>: <boolean> type-predicate obj

The type predicate is exact-compnum?. Return #t if obj is an object of type <exact-compnum>; otherwise return #f.