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.

<strong>zl</strong>:1 4<br />

I<br />

I follows normal mathematical rules, so if the mathematical quotient of two<br />

integers is not an exact integer, the function returns a ratio. To obtain an<br />

integer result, use one of these functions: floor, ceiling, truncate, round.<br />

(I 4) => 1/4<br />

(I 4.9) => 9.25<br />

(I 9 3) => 3<br />

(I 18 4) => 9/2 jreturns rational number in canonical form<br />

(I 191 19.9) => 19.1 japplies coercion rules<br />

(I 191 19) => 191/19<br />

(I 24 4 2) => 3<br />

(I 36. 4. 3.) => 3<br />

(I 36.9 4.9 3.9) => 3.9<br />

(I #c(1 1) #c(1 -1» => #c(9 1)<br />

(I #c(3 4) 5) => #c(3/5 4/5)<br />

For a table of related items: See the section "Arithmetic Functions" in<br />

Symbolics Common Lisp: Language Concepts.<br />

<strong>zl</strong>:1 number &rest more-numbers Function<br />

With more than one argument, <strong>zl</strong>:1 is the same as <strong>zl</strong>:quotient; it returns<br />

the irrst argument divided by all of the rest of its arguments. With only<br />

one argument, (<strong>zl</strong>:1 x) is the same as (<strong>zl</strong>:1 1 x).<br />

With integer arguments, <strong>zl</strong>:1 acts like truncate, except that it returns only<br />

a single value, the quotient.<br />

Note that in Zetalisp syntax I is the quoting character and must therefore<br />

be doubled.<br />

Examples:<br />

(<strong>zl</strong>!1 3 2) => 1 ;Integer division truncates.<br />

(<strong>zl</strong>:/3 -2) => -1<br />

(<strong>zl</strong>:1 -3 2) => -1<br />

(<strong>zl</strong>:1 -3 -2) => 1<br />

(<strong>zl</strong>:/3 2.9) => 1.5<br />

(<strong>zl</strong>:/3 2.9d9) => 1.5d9<br />

(<strong>zl</strong>:/4 2) => 2<br />

(<strong>zl</strong>:1 12. 2. 3.) => 2<br />

(<strong>zl</strong>:1 4.9) => .25<br />

The following function is a synonym of <strong>zl</strong>:1 :<br />

<strong>zl</strong>:l$<br />

For a table of related items: See the section "Arithmetic Functions" in<br />

Symbolics Common Lisp: Language Concepts.

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

Saved successfully!

Ooh no, something went wrong!