17.05.2015 Views

zl:1 - FTP

zl:1 - FTP

zl:1 - FTP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ationalp<br />

428<br />

Examples:<br />

(rationalize B.2) => 1/5<br />

(rationalize 3.95) => 79/28<br />

For a table of related items: See the section "Functions That Convert Noncomplex<br />

to Rational Numbers" in Symbolics Common Lisp: Language Concepts.<br />

I<br />

rationalp object Function<br />

This predicate is true if object is a rational number (a ratio or an integer)<br />

after conversion to canonical form; it is false otherwise.<br />

Examples:<br />

(rationa1p 3.B) => NIL<br />

(rationalp 2) => T<br />

(rationa1p #c(3 4)) => NIL<br />

(rationalp (I 22 7)) => T<br />

(rationa1p #c(4 B)) => T ;comp1ex canonica1ization<br />

For a table of related items: See the section "Numeric Type-checking<br />

Predicates" in Symbolics Common Lisp: Language Concepts.<br />

<strong>zl</strong>:rationalp object Function<br />

Returns t if object is a ratio. Returns nil if object is an integer or other<br />

type of object.<br />

Examples:<br />

(<strong>zl</strong> :rationa1p (I 8 7)) => T<br />

(<strong>zl</strong> :rationalp 9/16) => T<br />

(<strong>zl</strong> :rationa1p 4) => NIL<br />

(<strong>zl</strong> :rationalp (I 9 3)) => NIL<br />

(<strong>zl</strong> :rationalp 16/4) => NIL<br />

For a table of related items: See the section "Numeric Type-checking<br />

Predicates" in Symbolics Common Lisp: Language Concepts.<br />

*read-base*<br />

Variable<br />

The value of *read-base* is a number controlling the radix in which integers<br />

and ratios are read. Valid values are between 2 and 36, inclusive;<br />

the default is 10 (decimal radix).<br />

The value of *read-base* does not affect rational numbers whose radix is<br />

explicitly indicated by a radix specifier, or by a trailing decimal point. See<br />

the section "Radix Specifier Format" in Symbolics Common Lisp: Language<br />

Concepts.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!