ccl icon indicating copy to clipboard operation
ccl copied to clipboard

(subtypep 'number '(or complex real)) ;=> NIL T

Open phoe opened this issue 4 years ago • 3 comments

(subtypep 'number '(or complex real)) ;=> NIL T. This implies that CCL is sure that there is a subtype of number which is neither complex nor real. Either this type exists, and I'm completely puzzled by its existence, or CCL's subtypep has a bug (just like SBCL's).

phoe avatar May 27 '21 12:05 phoe

That's a great question. A shame Gary Byers isn't around any longer...

Symbolics avatar May 27 '21 13:05 Symbolics

The CLHS ssue REAL-NUMBER-TYPE http://clhs.lisp.se/Issues/iss290_w.htm seems to dance around this.

Also note:

? (subtypep 'real '(or rational float))
NIL
T

xrme avatar May 27 '21 16:05 xrme

On the other hand, this leaves the door open for extensions such as realib (real reals), or quaternion, octonions, etc.

informatimago avatar Jun 01 '21 18:06 informatimago