[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue: REAL-NUMBER-TYPE (version 1)



> Hold on.  How should the following be handled:
>  (declare (type (real 3.1415926 71/7) x))
> ...or (typep x '(real 3.1415926 71/7))?
> When the type determination is made, how is the coercion of x to be done?
> Must x be coerced from rational to float, or from float to rational, in 
> order to do the type check?  Should RATIONAL or RATIONALIZE be used?  ETc.,
> etc., etc.

On the Explorer,  (TYPEP X '(REAL 3.1415926 71/7))  is expanded by the
compiler to  (AND (REALP X) (>= X 3.1415926) (<= X 71/7))  and then follows
the normal rules for numerical comparison from there.