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


6.13.14.4 The <zero-compnum> type

Core Type: <zero-compnum>
Parent Type: <inexact-compnum>

Type of compnum values having both the real part and imaginary part equal to zero.

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

the compnums of type <zero-compnum> are ‘0+0.0i’ and ‘0-0.0i’ with the imaginary part always inexact.

NOTE We need to remember that if a value is a compnum: only one among the real and imaginary parts is inexact. If both are inexact: it is not a compnum, it is a cflonum.

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

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

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

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