Axiom Volume 1Tutorial (2005)

background image
background image
background image

ii

Cyril

A lb

erg

a

Ro

y

A dler

Ric

har

d

A nder

so

n

Geor

ge

A ndr

ews

Henr

y

Ba

k

er

Stephen

Ba

lzac

Y

ur

ij

Bar

ansk

y

Da

vid

R.

Ba

rto

n

Ger

ald

Baumga

rtner

Gil b

er

R.

Roy

RoyR.

yro0(b)-20c(er)]Tj 32.56 0 Tk (a)Tj 76.72 0 (Mumga)Tj 5.04 0 Tn (k)Tj29.68 0 TuelGerGersoykyGer

Da

vidR.Day

background image

C

o n

t en

t s

1

Ax i

om

F

ea tures

1

1.1

In

tro d uctio

n

t o

Axio

m

background image

iv

CO

NTENTS

3.2

. 4

Sym

b

ols,

V

a

ria

bles,

Assig

nm eb9.31000(4)]TD 18.24 [cla 0 Td 9q 0.12 0 0 0.12 0 0 cm /R7 gs 0 G 0 g q 8.33333 0 0 8.33333 0 0 cm BT /R81 0.12 Tf 1 0 0 -1 160.68 736.08 Tm (iv)Tj /R257 0.12 Tf 287.16 0 Td (CO)Tj 14q 0.12 0 0 0.12 0 0 cm /R7 gs 0 G 0 g q 8.33333 0 0 8.33333 0 0 cm BT /R81 0.12 t04[000(4)]TD 18.24 [cla 0 Td 9q 0.12 0 0 0v

background image
background image

vi

CO

NTENTS

7

I nput

Fi

les

an d

Output

St

yles

22

1

7.1

Inp ut

Files

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

2

21

7.2

The

.ax

iom.inp ut

File

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

2

22

7.3

Common

F

ea

t ur

es

of

Using

Outp ut

F

o

rmats

.

.

.

.

.

.

.

.

.

.

.

.

2

23

7.4

Monos

p a

ce

Tw

o-

D imensio

nal

Ma

t hema

t ica

l

F

or

mat

.

.

.

.

.

.

.

2

24

7.5

T

eX

F

oTd (of)Tj 11.4 0 T0 Td (23)Tj -318.84 12 Td (7.4)Tj 22.92 0 Td (Monos)Tj 28.56 0 Td [(p)-1000(a)]TJ 10.56 0 Td (ce)Tj 12.12 0 Td (Tw)Tj 14.16 0 Td (o-)Tj 8.28 0 Td [(D)-1000(imensio)]TJ 40.32 0 Td (nal)Tj 16.68 0 Td (Ma)Tj 14.04 0 Td [(t)-1000(hema)]TJ 27.12 0 Td [(t)-1000(ic0t(0j 14.04 0 Td (ce)Tj 12.12 0 Td (Tw)Tj 14.16 0 Td (o-)Tj 8.28 0 Td [(D)-1000(imensio)]TJ 40.32 0 Td (nal)Tj 16.68 0 Td (Ma)Tj 14.04 0 Td [(ce)Tj 12.12 0 Td (Tw)Tj 14.16 0 Td (o-)Tj 8.28 0 Td [(D)-1000(imensio)]TJ 40.32 0 Td (nal)Tj 16.68 0 Td (Ma)Tj 14.04 0 Td [(ce)Tj 12.12 0 Td (Tw)Tj 14.16 0 Td (o-)Tj 8.28 0 Td [(D)-1000(imensio)]TJ 40.32 0 Td (nal)Tj 16.68 0 Td (Ma)Tj 14.04 0 Td [(ce)Tj 12.l)Tj 16.683 d (nal)Tj 16.68 0 Td (Ma)Tj 14.04 0 Td [(t)-1000(hema)]TJ 27.12 0 Td [(t)-1000(ic0t(0j 14.04 0SM0(ic03 27.12 0 TSc24 0 (.)8 0 Td (.i18.84 1pj 7.68al)7.12 0 T8.64 0 Td (2)Tj 4.92 0 Td (23)Tj -(mat)T (23)Tjula7.8 0 T57.12 0 T8.64 0 Td (2)Tj 424 0 Td (F)Tj 5[(m5.64 0 Td (or).)Tj 7.68 0t)Tj 1692 Td (Ma)Tj 14.04 0 Td [(ce)Tj 12.12 0 Td (Tw)Tj 14.16 0 Td (o-)Tj 8.28 0 Td [(D)-1000(imensio)]TJ 40.32 0 Td (nal)Tj 16.68 0 Td (Ma)Tj 14.04 0 Td [(ce)Tj 12.l)Tj 16.683 d (nal)Tj 16.68 0 Td (Ma)T Td (nal)Tj 16.68 0 Td (Ma)Tj 14.04 0 Td [(ce)Tj 12.l)Tj 16.683 d (nal)Tj 16.68 0 Td (Ma)Tj 14.04 0 Td [(t)-1000(hema)6TJ 27.12 0 Td [(t)-1070(ic0t(0j 14.04 Fsio)]TTj 16.68 OR8 0 Td 1000(ic0tTRAN8 0 32Ma)Tj 14.00 Td (Ma)Tj 14.04 0 Td [(t)-1000(hema)]TJ 27.12 0 Td [(t7T57.12 0 T[(ce)Tj 12.l)Tj 16.683 d (nal)Tj 16.68 0 Td (Ma)T Td (nal)Tj 16.68 0 Td (Ma)Tj 14.04 0 Td [(ce)Tj 12.l)Tj 16.683 d (nal)Tj 16.68 0 Td (Ma)T Td (nal)Tj 16.68 0 Td (Ma)Tj 14.04 0 Td [(ce)Tj 12.l)Tj 16.683 d (nal)Tj 16.68 0 Td (Ma)T Td (nal)Tj 16.68 0 Td (Ma)Tj 14.04 0 Td [(ce)Tj 12.lnal

Ma

background image

CO

NTENTS

vii

New

F

o rew

o rd

O

n

Octob

er

1

,

20

01

Axio

m

w

as

withdra

wn

f r

om

th e

ma

rk

et

a

nd

ended

life

a

s

a

commer

cial

pro

duct.

background image

C

hapte r

1

Axi

om

F

eat ures

1.1

In

tro

du

t ion

to

Axiom

W

elco

m e

to

t he

w

or

ld

o

f

A x

i o

m.

W

e

ca

ll

Axiom

a

background image

2

CHAPTE

R

1.

A XIO

M

FEA

TUR E

S

whic

h

w

ould

g

background image

1

.1.

IN TR

ODU CT

ION

TO

AX IO

M

3

liter

ally

d o

zens

of

kinds

of

n

u m

b

er

s

to

co

mp ute

wit h.

Th e

se

r

ang

e

fro

m

v

ar

-

io

us

kind s

o

f

in

00inr

background image

4

CHAPTE

R

1.

A XIO

M

FEA

TUR E

S

i

nve

rs

e(%

)



1

x

+i

0

1

2

x

+2

i

1

2



Ty

pe

:

Un

io

n(M

at

rix

F

ra

ti

on

Po

ly

nom

ia

l

Com

pl

ex

In

te

ger

,.

..)

1.1.4

Hyp

er

Do

Figure

1.1

:

Hyp

er

do

c

o

p

e

n ing

men

u

Hyp

erDo

c

pres

en

ts

y

o

u

wind o

ws

o

background image

1

.1.

IN TR

ODU CT

ION

TO

AX IO

M

5

k

background image
background image

1

.1.

IN TR

ODU CT

ION

TO

AX IO

M

7

d

ra

w(5

*b

es

sel

J(

0,s

qr

t(

x**

2+

y**

2)

),

x=

-2

0..

20

,

y

=-

20

..2

0)

F ig

ure

1.2

:

J

0

(

p

background image

8

CHAPTE

R

1.

A XIO

M

FEA

TUR E

S



1

;

3

x ;

1

5

background image

1

.1.

IN TR

ODU CT

ION

TO

AX IO

M

9

Ty

pe:

Ex

pre

ss

ion

I

nt

ege

r

No

t e

the

use

of

\%"

h er

e.

This

m e

ans

the

v

a

lue

of

t he

la

st

ex

p r

ess

ion

w

e

c

omput ed.

In

t his

case

it

is

the

lo

ng

expres

sion

a

b

o

v

e.

1.1.8

P

a tt

ern

Mat

hi8yTj 106P8yTj a 4.32 0 T(9)TjTj 10.08 0 Td (the)Tje

background image

1

0

CHAPTE

R

1.

A XIO

M

FEA

TUR E

S

Using

i

nput

les

and

the

) read

co

m ma

nd ,

y

ou

ca

n

c

rea

t e

y

our

o

I2y

ou)ourourr84 0 TTj 20.4 0 ud (the)Tj 18.72 0 Td (o)Tjs12 07.2 0 Td (r84 0 TTj 20.4 (elev14.886)]TJ 12.72an000(XIO]TJ 12.72t1C2 96 Td (our)To 18.72 01Td (o)Tj 4.68 0 Td (I7Tj4rea)Tj a4.68 0 Td (Ipplications,4.68530.12 Tf 2 Td (our)Then Td (y2.58 0 Td (selectiv14.8310 Td (ou)Te000(e)]TJ 12.7[(l (our)Ty 18.71)T0 Td [(TUa4.68 0 Td (I[ppd (the)Ty Td (y2.]TJ 12.72t00(rea-31 04 0r84 0 TTj 20.4 0 ud (the)Tj 18.72 0 Td (o)Tjs12 07.3Td (o)Tj 4.68 0 Td (ITd (y)T Td (Ineed.(read)34517 0.12 Tf4 0 Td320.1226.28 1.94.68 10.12 Tf 27Pj 42.84 0 lo)Tjol000(XIO412 Tf 27ymor84 0 0M)Tj 12.48 pd (the)hi14.88 0 TJ 21.6 0 000(XIO412 Tf 27AlTd (y)T Td (Igori12 0 2. Td (ou)Tthm12 0 384 0 lo)Tjsg)Tj /R217 0.12 Tf180M)Tj 2. Tdf 27All14.886)56 Tcompd 2ur)Tonen Td (43. Td (ou) Td (our)Ts 18.71)T12 Tf 27o1C1)Tj4rea)Tj t00(rea7T12 Tf 27Axiom12 03204rea)Tj a4.68 0 Td (Ilgey)Tj 4.92 a4.688Tj4rea)Tj CHAPTE)Tj 42.84 0 lo)Tj 12 T8CHAPTE)Tj 42.84 0 lo)Tjej 42.8.12 Tf 27wr1C1oury401Td (o)Tjin1C1rea7T12 Tf 27Axiom12 03204reaououruag0 Td (M)Tj 12.4jej 429(c)Tj 4.32 0 Td (rea)Tj lled 0 Td (nput)Tj /R8108.12 Tf 27Spades

background image
background image

1

2

background image

C

hapte r

2

T

en

F

undamen

tal

Ideas

Axioeas

background image

1

4

CHA P

TER

2.

TE

NNAMENTj 1037.0 Td (N)ALj 10.7.04 Td (N)IDEASj /R25345.12 Tf 13-312.72 27.96d (2.)T12 Tj 4.97.70 Td (TE)j 4.9

background image

15an /R7 gs 0Myth e

background image
background image
background image

1

8

CHA P

TER

2.

TE

N

FUN D

AMENT

AL

IDEAS

Ty

pe

:

Ma

tri

x

Pol

yn

om

ial

F

ra

ti

on

In

te

ger

the

in

t er

preter

background image

1

9

Axio

m's

use

o

f

a

bstra

ct

da

tat

yp

es

clea

rly

separ

ates

the

exp

or

ts

of

a

domain

(wha

t

o

p

er

ations

a

re

de ned)

fro

j 10.44 a-1TJ 1t.88 0 15 (domain)Timpleme1.52 4d (6at)Tj 12.430.4 0 Td (the)Tj 1(h88 0 Td (ations)Tw8 0 Td (j 10.44 8.24 0 Td [(yp)-2000ob)-5TJ 1ject.88 0 35d (Tj 4.92 0 Td (re)Tj 13.08 0 27.5.28(wha)Tj8 0 T3 (a)Tj 4.9epr.72 0 T (ct)Tj 12e1.52 9 (the)Tj 18ed2 0 Td 68Tj 4.92 0 Td (re)Tj 13nd8 0 Td (re)Tj 132 0 Td [(p)-3000(er)]TJ 1488 0 10(ct)Tj 12.2 0 T8 (j 10.44[64 -1TJ 1.4 8 0 11 (o)Tj 4.9n24 0 Td (of)Tj 12a.08 0 T6(ct)Tj 12)Tj 39.6..52 4d (j 10.44 User4 0 Td 68Tj 4.924 0 6 (the)Tj 1.48 0 T0.8Tj 4.92 0 T7.8Tj 4.9j -311.52 3d (re)Tj 13c6 0 Td (domain)Tn 0 T8 tat)Tj 12h 0 Td 1re

background image

2

0

CHA P

TER

2.

TE

N

FUN D

AMENT

AL

IDEAS

background image

C

hapte r

3

Starting

Axi

om

W

elco

m e

t o

th e

A x

i o

m

en

vir

onmen

t

for

in

t e

rac

t ivvir

background image

2

2

CHAPTE

R

3.

ST

A R

TING

AXIOM

If

y

ou

a

re

running

Axiom

under

th e

X

W indo

w

System,

there

ma

y

b

e

t

w

o

windo

ws:

t he

c

onso

le

wind o

w

(as

j ust

descr

ib

ed)

a

n d

the

Hyp

e

rDo

c

main

men

u.

Hyp

erDo

c

is

a

m

u ltiple-windo

w

h

yp

ertext

sys

t em

that

lets

y

o

u

view

A x

iom

do

cumen

tatio

n

a

nd

examples

o

n-line,

execute

A x

iom

expre

ssions

,

a

nd

g

ener

ate

g

ra

p hics

.

If

y

o

u

ar

e

in

a

g

ra

background image
background image

2

4

CHAPTE

R

3.

ST

A R

TING

AXIOM

1

+

2

-

3

/

4

*

3

**

2

-

1

1

9

4

T

yp

e:

F

ra

ti

on

In

te

ger

The

a

b

o

v

e

ex

p r

essio

n

is

equiv

alen

t

to

th is

.

(

(1

+

2)

-

((3

/

4

)

*

(

3

*

*

2)

))

-

1

1

9

4

T

yp

e:

F

ra

ti

on

In

te

ger

If

a

n

expr

essio

n

co

n

t a

ins

s

ub

expr

essio

ns

enclo

sed

i n

par

en

theses,

t he

background image

3

.2.

TH E

AXIOM

L

A NGUA

G E

2

5

99

99

99

99

99

Ty

pe

:

Po

si

tiv

eI

nt

ege

r

This

is

the

la

st

r

esult .

%

%(

-1)

99

99

99

99

99

Ty

pe

:

Po

si

tiv

eI

nt

ege

r

This

is

the

r

esult

fro

m

step

n

um

b

er

1.

%

%(

1)

10

00

00

00

000

Ty

pe

:

Po

si

tiv

eI

nt

ege

r

3.2.3

Some

T

yp

es

E

v

e

rything

i n

Axiom

ha

s

a

t

y

p

e.

The

t

yp

e

determines

what

op

era

t io

ns

y

ou

can

p

er

f o

rm

o

n

a

n

ob

ject

a

nd

ho

w

the

ob

j e[

background image

2

6

CHAPTE

R

3.

ST

A R

TING

AXIOM

x

**8

x

8

T

yp

e:

P

ol

yno

mi

al

In

te

ger

Here

a

nega

t iv

e

in

teg

er

exp

o

nen

t

pro d uce

s

a

fra

ct io

background image

3

.2.

TH E

AXIOM

L

A NGUA

G E

2

7

This

giv

es

the

v

a

lue

z

+

3

=5

(a

background image

2

8

CHAPTE

RA yp

ti als anrl=i(b)-2[(yp)-300038 Tm (2)Tjg736.08 Tm (2)Tjiv736.7..22 7e.14 0 3.5n.18.tog14 0 3..22 7ether 0 de5..22 7with 0 de3 A.71.1a736.08 Tm (2)Tj79.04 0 n.9 0as92 0((CHAPTE)Tj[(92 0[(tg)-3007..22 7nme.14 0e3 5n.9 0t.92 0n.9 0The14 0e0.76]TJ 19. 4.92 0 de la.22 7- 0 d-340.32 8)TT2 739.04 0HAPTE)Tj ation 0 de5.5n.18. 736.083n.9 0a.14 0 3. Tm (2)Tja736.08 Tm (2)Tjssis79.04210HAPTE

background image

3

.2.

TH E

AXIOM

L

A NGUA

G E

2

9

T

ype

:

F

loa

t

Use

background image

3

0

CHAPTE

R

3.

ST

A R

TING

AXIOM

3.2.6

Ca l

l

i

ng

F

un

ti

ons

As

w

e

sa

w

ear

lier,

when

y

ou

w

an

t

to

add

or

subtra

ct

t

w

o

v

alues,

y

ou

pla

ce

the

ar

it hmetic

op

era

t o

r

\

+"tt

background image

3

.2.

TH E

AXIOM

L

A NGUA

G E

3

1

An

o

p

e

ra

t io

ns

that

r

eturns

a

B

oo

lea

n

v

a

lue

(that

is,

t

rue

o

r

fal

se

)

background image
background image

3

.3.

U SING

AXIOM

AS

A

P

OCK

ET

CA L

CU LA

TO

R

3

3

r

4(3)Tj 4.9[(b)-2J 27elong 0 Td 8.4s7PAS

background image

3

4

CHAPTE

R

3.

ST

A R

TING

AXIOM

3.3.2

T

yp

e

Con

v

background image
background image

3

6

CHAPTE

R

3.

ST

A R

TING

AXIOM

3.3.3

Us eful

F

un ti

ons

T

o

obtain

the

a

bsolute

v

alue

o

f

a

n

background image

3

.3.

U SING

AXIOM

AS

A

P

OCK

ET

CA L

CU LA

TO

R

3

7

Ty

pe

:

Po

si

tiv

eI

nt

ege

r

T

es

t s

on

v

alues

ca

n

b

e

done

using

v

a

rious

functions

whic

h

ar

e

gener

ally

mo

re

e

Æ cien

t

than

using

r

elationa

l

o

p

era

t o

rs

s

uc

h

as

=

pa

rticular

ly

if

the

v

a

lue

is

a

ma

t r

ix.

E

xamples

of

s12 Td (ma)Tj 13mue

of

thses

background image

3

8

CHAPTE

R

3.

ST

A R

TING

AXIOM

Ty

pe

:

Bo

ol

ean

e

background image
background image
background image

3

.4.

U SING

AXIOM

AS

A

SYMBO

LIC

CALCULA

TO

R

4

1

3.4.2

Com

p l

ex

Num

b

ers

F

o

r

man

y

scien

ti c

calc

u la

ti o

ns

r

eal

n

um

b

ers

ar

en' t

suÆcien

t

a

n d

s

u pp

or

t

f o

r

c

omplex

n

um

b

er

s

is

a

lso

re

quired.

Complex

n

um

b

ers

ar

e

ha

ndled

in

a

n

in

tuitiv

e

ma

nn e

r.

A xio

m

us

es

t he

%

i

macr

o

to

r

eprese

n

t

the

squar

%

background image

4

2

CHAPTE

R

3.

ST

A R

TING

AXIOM

Ty

pe:

Com

pl

ex

In

te

ger

f

a t

or

(%)

i

background image

3

.4.

U SING

AXIOM

AS

A

SYMBO

LIC

CALCULA

TO

R

background image

4

4

CHAPTE

R

3.

ST

A R

TING

AXIOM

r

adi

x(

3/2

1,

5)

0:0

32

41

2

T

yp

e:

R

41

2

T

yp41T41

background image

3

.4.

U SING

AXIOM

AS

A

SYMBO

LIC

CALCULA

TO

R

4

5

om

pa

tF

ra

ti

on

(%)

6

3

background image

4

6

CHAPTE

R

3.

ST

A R

TING

AXIOM

3

background image

3

.5.

GENERAL

P

OINTS

ABO

U T

A XIO

M

4

7

The

rst

e

xample

s

h o

uld

b

e

rea

d

a

s:

Le

t

x

be

of

ty

pe

P

rim

eF

iel

d(

7)

an

d

ass

ig

n

t

o

it

th

e

val

ue

5

No

t e

that

it

is

o

nl y

p

os

sible

t o

in

v

er

t

no

n -

zer

o

v

alues

if

the

ar

it hmetic

is

p

er

-

fo

rmed

mo

dulo

a

prime

n

u m

b

er

.

Th

u s

ar

it hmetic

mo

dulo

a

no

n -

prime

in

teg

er

is

p

os

sible

bu t

the

r

ecipro cal

op

er

ation

is

unde ned

a

sn

background image
background image

3

.5.

GENERAL

P

OINTS

ABO

U T

A XIO

M

4

9

3.5.4

Com

men

ts

background image
background image

3

.5.

GENERAL

P

OINTS

ABO

U T

A XIO

M

5

1

le.

T

o

g

et

A x

iom

t o

rea

d

t his

le,

y

ou

use

the

system

command

)

rea

d

m

y.

inp

ut

.

If

y

o

u

need

to

m a

k

e

c

h a

nges

to

y

our

appr

oa

c

h

or

de niti o

ns,

g

o

in

t o

y

our

f a

v

or

it e

edit o

r,

c

hang

e

m

y

.i

nput ,

t hen

)re

ad

m

y.i

np

ut

ag

ain.

O

th e

r

sys

t em

co

m ma

nd s

in clude:

)

hi

sto

ry

,

t o

d is

pl a

y

pr

evious

input

a

nd/o

r

o

utp ut

lines;

)d

isp

la

y,

to

displa

y

pro

p

e

rties

and

v

alues

of

w

or

kspa

ce

v

ar

iables;

a

nd

)w

ha

t.

Is

sue

)w

ha

t

to

ge

t

a

li s

t

o

f

Axio

m

o

b

jects

thar5N 8.0(e)]TJ 10.2 0 Td (0 Td [(li)- [(pl)-1000(a)]TJalues)Tj 24.48 0ye12.6 0 T5000(jecwbstriTd (e)42nd)Tj 18.9

background image

5

2

CHAPTE

background image
background image
background image
background image

5

6

CHAPTE

R

3.

ST

A R

TING

AXIOM

AXIOMTp11.88 0yTCHAitTCHAteT

background image

3

.6.

D

A

T

A

STR

UCTURES

IN

A XIOM

5

7

r

ev

ers

e(

[7

,2,

-1

,2℄

)

[2;

1;

2;

7

]

T

yp

e:

L

ist

I

nt

ege

r

s

or

t([

7,

2,

-1,

2℄

)

[

1

;

2;

2;

7

]

T

yp

e:

L

ist

I

nt

ege

r

r

em

ove

Du

pl

i a

te

s([

1,

5,

3,5

,1

,1,

2℄

)

[1;

5

;

3;

2

]

Ty

pe

:

Li

st

Po

si

tiv

eI

nt

ege

r

#

[7

,2,

-1

,2

4

Ty

pe

:

Po

si

tiv

eI

nt

ege

r

L

i s

t s

in

A xio

m

ar

e

m

ut a

ble

and

so

th e

i r

co

n

t e

n

t s

( the

elemen

background image

5

8

CHAPTE

R

3.

ST

A R

TING

AXIOM

[9;

2

;

4;

7

;

1

;

5;

4

2]

Typ

e:

Lis

t

Pos

it

iv

eIn

te

ger

e

ndO

fu

:=

r

est

(u

,4

)

[1;

5

;

4

2]

Typ

e:

Lis

t

Pos

it

iv

eIn

te

ger

p

art

Of

u

:

=

res

t(

u,

2)

[4

;

7;

1

;

5

;

42

]

Typ

e:

Lis

t

Pos

it

iv

eIn

te

ger

s

etr

es

t!(

en

dOf

u,

pa

rtO

fu

);

u



9;

2

;

background image
background image

6

0

CHAPTE

R

3.

ST

background image
background image

6

2

CHAPTE

R

3.

ST

A R

TING

AXIOM

[9;

9

9;

20

;

7]

Typ

e:

Lis

t

Pos

it

iv

eIn

te

ger

In

th e

pr

evious

ex

ample

a

new

e6j 30.96 0 ad (9)T 10.68 0 y (ex)T210.44 0 of (In)21.12 0 constd (pr266 23.08 0 Tu[(th)-1c00(e) Tf 9.96 0 Td[(th)-1ing00(e))Tj210.44 0 ld (Lis)Tj 9.36 0 Td[(th)-1s00(e)]Tj 11.88 0 Td (e6j 42.84 0 a (Pos)2j 30.96 0 gd (9)Tj 4.92 0 Td (iv Tf 7.8 0 end (3.))T24.04 0 T (iv T 13.08 0 T [(th)-1is00(e)]6Tf 4.32 0 d (Lis)Tj 10.68 0 ad (9-338.76 1 0. 0 Tp)-2h)-1o00(e)]0.561.88 0 Td (e6j 42.84 0 erful (pr236 23.08 0 Tmetho)-2h)-1d00(e)36j 42.84 0 whic (3.))T561.88 0 h(Lis)T 15.48 0 gTd (iv)2j 15.72 0 T (Pos)2j249.36 0 Td[(th)-1h000(e)]TJ7.n9

background image

3

.6.

D

A

T

A

STR

UCTURES

IN

A XIOM

6

3

3.6.2

Segmen

ted

Li

sts

A

se

gmen

ted

list

is

one

in

whic

h

so

me

of

the

elemen

ts

ar

e

ra

nges

of

v

alues.

The

e

x pand

fun c

t io

n

con

v

er

t s

lists

o

f

th is

t

yp

e

in

to

or

dinary

lists:

[

1.

.10

[1::10

]

Ty

pe:

Lis

t

background image
background image

3

.6.

D

A

T

A

STR

UCTURES

IN

A XIOM

6

5

T

o

crea

te

t he

s

eries

the

windo

w

is

p la

ced

at

the

star

0

background image
background image

3

.6.

D

A

T

A

STR

UCTURES

IN

A XIOM

6

7

y

:

=

xy36 0 0 Td (:)Tj 5.16 0pe Td (26)Tj 10.56 On Td (:)Tj 5.16 0eDi Td (5)Tj 6.36 0me Td (:)Tj 5.16 0nsi Td (5)Tj 6.36 0on Td (:)Tj 5.16 0alA Td (5)Tj 6.36 0rr Td (:)Tj 5.16 0ay Td (5)Tj 6.36 0Po Td (:)Tj 5.16 0si Td (:)Tj 5.16 0tiv Td (5)Tj 6.36 0eI Td (:)Tj 5.16 0nt Td (:)Tj 5.16 0ege Td (5)Tj 6.36 0r Td 96 Td4 32.44 0 Td =

5

background image

6

8

CHAPTE

R

3.

ST

A R

TING

AXIOM

s

wap

!(

b,2

,3

);

b

[2;

4

;

3;

5

;

6]

T

yp

e:

O

ne

Dim

en

sio

na

lA

rra

y

Pos

it

iv

eIn

te

ger

opy

In

to!

(a

,b,

3)

[4;

4

;

2

lArr73r3;

4

2

;

4

;

2

5

;

6]

T

yp

e:

O

ne

Dim

en

sio

na

lA

rra

y

3.30 Td (a 0.12 Tf 4.44 0 T124.25.72 0 Td (In)Tj 10.44 0 Td (to!)Tj 15.72 0 Td ((a)Tj 10.44 0 Td (,b,)Tj 15.72 0 Td (3))Tj /R81 0.12 Tf 51 28.56 Td ([4)Tj /R24 0.12 Tf 7.8 0 Td (;)Tj /R81 0.12 Tf 4.44 0 Td (4)Tj /R24 0.12 Tf 4.92 0 Td (;)Tj /R81 0.12 Tf 4.44 0 Td (2)Tj /R24 0.12 Tf )Tj 10.44 0 Td (lA)Tj 10.44 0 Td (rr73r3;)Tj /R84 0.12 Tf 4.92 0 Td (;)Tj /R81 0.12 Tf 4.44 0 Td (4)Tj /R26 0.12 Tf 4.92 0 Td (;)Tj /R81 0.12 Tf 4.44 0 Td (2)Tj /R24 0.12 Tf 4.92 0 Td (;)Tj /R81 0.12 Tf 4.44 0 Td (4)Tj /R24 0.12 Tf 4.92 0 Td (;)Tj /R81 0.12 Tf 4.44 0 Td (2)Tj /R24 0.12 Tf 5.04 0 Td 87.6 /R8880.12 Tf 4.44 0 Td (5)Tj /R24 0.12 Tf 4.92 0 Td (;)Tj /R81 0.12 Tf 4.44 0 Td (6℄)Tj /R83 0.12 Tf -64.08 23.76 Td (T)Tj 5.16 0 Td (yp)Tj 10.44 0 Td (e:)Tj 21 0 Td (O)Tj 5.16 0 Td (ne)Tj 10.44 0 Td (Dim)Tj 15.72 0 Td (en)Tj 10.44 0 Td (sio)Tj 15.72 0 Td (na)Tj 10.44 0 Td (lA)Tj 10.44 0 Td (rra)Tj 15.72 0 Td (y)Tj 10.44 0 Td (Po4 0 (yv81 0.12 Tf 4.44e tj 10.44 0 Td (rrorj /R83 0.12 Tf -3([1j 10.44 0 Td (rr/24 0 Td (ger)Tj -31/.96 36.24 Td ( )T,4 0 Td (ger)Tj -1/.96 3d (ger)Tj -14 0.12 Td (te)Tj 10 5.16 03625.04 0 Td3881 019 (geTj 1 0.12 Tf 4.44 0 T68 737r3;)Tj -1 0.1ET Q q 4-4 2630.9 3452.9 BI /IM true /W 1 /H 1 /BPC 1 ID EI Q3 Td (t40481 0.m/R24 0.12 Tf 7.8 0 TPos)T-60 m /R81 0.12 Tf 4.44 0 T5.6)T-607;)Tj -1 0.1ET Q q 4-4 27APT9 3452.9 BI /IM true /W 1 /H 1 /BPC 1 ID EI Q327.6 40481 0.m/R4 0.12 Tf )Tj 10.4Po4 0-60 m /R81 0.12 Tf 4.44 0 T812 T-607;)Tj -1 0.1ET Q q m B-4 28 0 T 3452.9 BI /IM true /W 1 /H 1 /BPC 1 ID EI Q339.30 40481 0.m/R1 0.1d (;)Tj /R845.16 03625.04 0 TdPos)T-208880.12 0.12 Tf 5.04 0 Td 3 48 73.12 Tf 4.44 0 Td (5)Tj /R24 0.12 Tf 4.92 0 Td (;)Tj /V81 0.12 Tf 4.44e 44 0 Td (eIn)Tj 15r 0 Td (;)Tj /F81 0.12 Tf 4.44ra j 10.44 0 Td (rrai44 0 Td (eIn)Tj oTj 10.44 0 Td (rr0.44 0 Td (eIn)Tj 1)Tj 15.72 0 Td (y)Tj 10.44 0 Td (3.30 Td ("81 0.12 Tf 4.44Helj 10.44 0 Td (rrlo4 0 Td (ger)Tj -34 0 Td 5 Tf 4.44W72 0 Td (it)Tj 1rj /R83 0.12 Tf -ld"81 07781 0.72 0 Td ("H /R24 0.12 Tf 4.9lj /R83 0.12 Tf -lo4 0 Td (ger)Tj -34 0 Td 5 Tf 4.44W72 0 Td (it)Tj 1rj /R83 0.12 Tf -ld"81 083 (;)/R8880.12 Tf 4.44 0 Td (5)Tj /R24 0.12 Tf 4.92 0 Td (;)Tj /Sf 4.44 0 Td (5)trj /R83 0.12 Tf -ing 10.44 0 Td (Pos)Tj 15bf 4.44 0 Td (5)itTj 10.44 0 Td (si 0 m Td (ger)Tj -3trj /R844 0 Td (siu)Tj 15.72 0 Td (y0 5.1688.25.72 0 Td ("1.96 3d (ger)Tj -11.96 3d (ger)Tj -111j 10.44 0 Td (rr11.96 3d (ger)Tj -"81 0938 73/R81 0.12 Tf 4.44 0 Td (5)Tj /R24 0.12 Tf 4.92 0 Td (;)Tj /Bf 4.44 0 Td (5)itTj 1044 0 Td 2681 0.12 )Tj 5. 4.92 0 Tdyv81 0d (;)Tj /R[4e tjTj /R2o7 0.12781 0f 4.44r5.1683.)TTd (5)isTj 5. 4 0 Td (5)similar5.16(3.8(eIn)Tj 15Tj 5.3r3;)Tj /R8j 10.9.30 it)Tj 181 0d (;)Tj /R[4njTj /R2e-7 0.123r3;)Tj /R[(d.12Tj /R2e7 0.1d (;)Tj [4njTj /R2s7 0.198 736.08 Tionalj /R250.12 Tf 4.ar5.1683.92 0 TdyTj 10.8.6)Td (Dim)Tj 1964.08 23.76x j 10. Tf 179.04 eptj 10.8.30 it)Tj thaj 10. T.)TTd (5)t 10.8..12 Tf -if /R24 02 Td (5)itTj 1015 Td (5) o 10.9.30 it)Tj[(mp)-3 /R2o7 0.129)Tj f 4.44 0Tj 10.442(eIn)Tj 1s 10.44353.92. 4.92)Tj[(b)-20/R2elong 0.131!eIn.8(eIn)Tj ing 10.16 Tf 1 0 0 th0Tj 1022 Tf 1 0 0 a81 0d (;)Tj /R[4rithmetjTj /R2i 0.143.;

background image

3

.6.

D

A

T

A

STR

UCTURES

IN

A XIOM

6

9

3.6.5

Flexi

bl

e

Ar

ra

ys

Flexible

ar

ra

ys

ar

e

desig

ned

to

pr

o

v

id e

th e

eÆciency

o

f

one-

d imensio

nal

a

rr

a

ys

while

r

ri-T39(pr)Tj 9.3the 0 Td [1r

background image

7

0

CHAPTE

R

3.

ST

A R

TING

AXIOM

T

ype

:

F

lex

ib

leA

rr

ay

In

te

ger

d

ele

te

!(f

,5

)

[4

;

3;

4

2;

8;

2

;

28

]

T

ype

:

F

lex

ib

leA

rr

ay

In

te

ger

g

:=f

(3

..5

)

[42

;

8;

2]

T

ype

:

F

lex

ib

leA

rr

ay

In

te

ger

g

.2:

=7

;

f

[4

;

3;

4

2;

8;

2

;

28

]

T

ype

:

F

lex

ib

leA

rr

ay

In

te

ger

i

background image
background image

7

2

CHAPTE

R

3.

ST

A R

TING

AXIOMTING

background image

3

.7.

FU NCTIO

N S,

CHO

ICES,

AND

LOO

PS

7

3

:=a

+

b

)

2:8

28

42

71

24

7

4

61

90

09

76

T

ype

:

F

loa

t

No

t e

tha

t

inden

tatio

n

i s

ext rem

el

y

imp

or

t a

n

t.

If

the

exa

mple

ab

o

v

7nTu.12 Tf 9. .

background image

7

4

CHAPTE

R

3.

ST

A R

TING

AXIOM

Er

ro

r

A:

Mi

ss

in

g

m

at

e.

Li

ne

2:

a:

=3.

0

Li

ne

3:

b:

=1.

0

Li

ne

4:

:

=a

+

b

Li

ne

5:

Li

ne

6:

)

...

..

..

..A

Er

ro

r

A:

(f

ro

m

A

u

p

to

A)

I

gno

re

d.

Er

ro

r

A:

Im

pr

op

er

sy

nta

x.

Er

ro

r

A:

sy

nt

ax

er

ro

r

a

t

to

p

l

ev

el

Er

ro

r

A:

Po

ss

ib

ly

mi

ssi

ng

a

)

5

e

rro

r(

s)

pa

rs

ing

a

similar

er

ro

r

will

b

e

r

aise

d .

F ina

lly

,

the

\

) "

m

background image

3

.7.

FU NCTIO

N S,

CHO

ICES,

AND

LOO

PS

7

5

3

:0

T

ype

:

F

loa

t

b

:=

1.0

1

:0

T

ype

:

F

loa

t

:=

a

+

b

4

:0

T

ype

:

F

loa

t

s

qr

t(4

.0

+

)

2:8

28

42

71

24

7

4

61

90

09

76

T

ype

:

F

loa

t

whic

h

a

c

hiev

es

the

same

r

esult

and

is

eas

ier

to

under

st a

background image

7

6

CHAPTE

RA

background image

3

.7.

FU NCTIO

N S,

CHO

ICES,

AND

LOO

PS

7

7

with

s

ome

in

v

o

ca

t io

ns

o

f

t hes

e

fun c

t io

ns:

f

()

Com

pi

li

ng

fu

n t

io

n

f

w

it

h

t

yp

e

(

)

->

Li

st

In

te

ge

r

[

]

T

yp

e:

L

ist

I

nt

ege

r

g

(4

)

Com

pi

li

ng

fu

n t

io

n

g

w

it

h

t

yp

e

I

nt

eg

er

->

Li

st

I

nte

ge

r

[4

]

T

yp

e:

L

ist

I

nt

ege

r

h

(2

,9)

Com

pi

li

ng

fu

n t

io

n

h

w

it

h

t

yp

e

(

background image

7

8

CHAPTE

R

3.

ST

A R

TING

AXIOM

p

:

I

nte

ge

r

-

>

In

teg

er

T

yp

e:

V

oid

p

x

==

(a

background image
background image

8

0

CHAPTE

R

3.

ST

A R

TING

AXIOM

i

:=1

r

epe

at

if

i

>

4

the

n

br

eak

ou

tp

ut(

i)

i:

=i

+1

the

)read

yields:

i

:=1

1

Ty

pe:

Pos

it

iv

eIn

te

ger

r

epe

at

if

i

>

4

the

n

br

eak

ou

tp

ut(

i)

i:

=i

+1

1

2

3

4

T

yp

e:

V

oid

It

w

as

m e

n

t io

background image

3

.7.

FU NCTIO

N S,

CHO

ICES,

AND

LOO

PS

8

1

0

Ty

pe:

No

nNe

ga

tiv

eI

nt

ege

r

r

ep

eat

i

:=

i

+

1

i

f

i

>

6

th

en

br

ea

k

background image

8

2

CHAPTE

R

3.

background image
background image

8

4

CHAPTE

R

3.

ST

A R

TING

AXIOM

T

ypd (T)Tj.4 0 Td e:G

background image

3

.7.

FU NCTIO

N S,

CHO

ICES,

AND

LOO

PS

8

5

4

Ty

pe

:

Po

si

tiv

eI

nt

ege

r

r

:

=

1

1

Ty

pe

:

Po

si

tiv

eI

nt

ege

r

w

hi

le

r

<=

la

st

row

r

ep

eat

:=

1

-

-

I

nd

ex

of

f

irs

t

ol

um

n

w

hil

e

<=

la

st

ol

r

epe

at

if

e

lt

(m,

r,

)

<

0

the

n

ou

tp

ut

[r

, ,

el

t(

m,r

,

)℄

r

:=

la

st

row

br

ea

k

-

-

background image
background image

3

.7.

FU NCTIO

N S,

CHO

ICES,

AND

LOO

PS

8

7

Typ

e:

background image
background image

3

.8.

N UMBE

RS

8

9

the

)read

yields:

f

or

a

in

1

..4

f

or

b

in

8.

.5

by

-

1

r

ep

ea

t

o

utp

ut

[

a,b

[1,

8℄

[2,

7℄

[3,

6℄

[4,

5℄

Typ

e:

Voi

d

No

t e

t ha

t

wit ho

ut

the

\

b

y

-

1"

t he

segmen

t

8

..5Typ

background image

9

0

CHAPTE

R

3.

ST

A R

TING

AXIOM

T

yp

e:

F

a t

or

ed

In

te

ger

In

teg

ers

ca

n

a

lso

b

e

di s

pla

y

ed

t o

ba

ses

o

t her

t ha

n

1

0.

This

is

an

in

teger

in

bas

e

1

1.

r

adi

x(

259

37

424

60

1,

11)

1

00

00

00

00

00

Ty

pe

:

Ra

dix

Ex

pa

nsi

on

11

Roma

n

n

umera

ls

a

r Tj 27.12 ma

n

n

umera

background image

3

.8.

N UMBE

RS

9

1

Ty

pe

:

Si

ngl

eI

nt

ege

r

Ma

c

hine

double-pr

ecision

oa

tin g

-p

oin

t

n

um

b

ers

a

re

a

lso

a

v

aila

b le

for

n

umeric

a

nd

gr

aphica

l

applica

t io

ns.

1

23

.21

D

ou

ble

Fl

oat

12

3:2

10

00

000

00

00

01

Ty

pe:

Dou

bl

eF

loa

t

The

nor

mal

o

ating-

p

o

in

t

t

yp

e

in

A x

iom,

Fl

oa

t,

is

a

so

f t

w

ar

e

implemen

tation

o

f

o

ating-

p

o

in

t

n

u m

b

er

s

in

whic

h

the

exp

onen

t

and

the

m a

n

tissa

m a

y

ha

v

e

a

n

y

background image

9

2

CHAPTE

R

3.

ST

A R

TING

AXIOM

d

igi

ts

(40

);

ex

p(

%p

i

*

s

qrt

1

63

.0)

2

62

53

74

1

2

64

07

68

74

3:9

99

99

99

99

9

992

50

07

25

9

76

Ty

pe

:

Fl

oat

Here

ar

e

co

mpl e

x

n

um

b

ers

with

ra

tional

n

um

b

er

s

background image

3

.8.

N UMBE

RS

9

3

u

+

v

i

Typ

e:

C

om

ple

x

Po

lyn

om

ial

I

nt

ege

r

O

f

cour

se,

y

ou

can

do

co

m plex

ar

it hmetic

with

these

also

.

%

*

*

2

v

2

+

u

2

+

2

u

v

i

Typ

e:

C

om

ple

x

Po

lyn

om

ial

I

nt

ege

r

E

v

e

ry

r

ationa

l

n

u m

b

er

haor6 Tf 105 26.16 T8ehaor6 Tf 105

background image
background image

3

.8.

N UMBE

RS

9

5

Since

7

is

prime,

y

ou

can

in

v

er

t

nonzer

o

v

a

lues.

1

/x

3

T

yp

e:

P

rim

eF

ie

ld

7

Y

o

u

can

also

co

m pute

mo

dulo

an

i n

t eg

er

th a

t

is

n o

t

a

prime.

y

:

I

nt

eg

erM

od

6

:=

5

5

T

yp

e:

I

nte

ge

rM

od

6

All

o

f

th e

usual

ar

i thmetic

o

p

er

ations

ar

e

a

v

aila

bl e

.

y

**

3

5

T

yp

e:

I

nte

ge

rM

od

6

In

v

er

sion

is

noTd (eI(e:)Tj 21 0 (e:)Tj4b:)Tj 21Td (5)Tj /R81 0.12yp

Qd (5)Tj /RnfTodnoT1

background image

9

6

CHAPTE

R

3.

ST

A R

TING

AXIOM

This

de nes

a

to

b

e

a

n

alg

ebra

i c

n

um

b

e

r,

that

is,

a

background image

3

.9.

D

A

T

A

STR

UCTURES

9

7

2

/%

+1

0



a

4

a

3

+

2

a

2

a

+

1



b

3

+

a

4

a

3

+

2

a

2

a

+

1



b

2

+

a

4

a

3

+

2

a

2

a

+

1



b

+

a

4

a

3

+

2

a

2

a

+

3

1

A

0



a

4

a

3

+

2

a

2

a

+

1



b

3

+

a

4

a

3

+

2

a

2

a

+

1



b

2

+

a

4

a

3

+

2

a

2

a

+

1



b

+

a

4

a

3

+

2

a

2

a

+

1

1

A

Ty

pe:

Ex

pre

ss

ion

I

nt

ege

r

B

u t

w

e

need

t o

r

ationa

background image

9

8

CHAPTE

R

3.

ST

A R

TING

AXIOM

u

:=

[

1,-

7,

11℄

background image

3

.9.

D

A

T

A

STR

UCTURES

9

9



1;

7;

1

1;

9



T

yp

e:

L

ist

I

nt

ege

r

A

st

r

e

a m

is

a

structure

that

(p

o

t e

n

t ia

lly)

h a

s

a

n

in nite

n

um

b

er

of

disti nct

e

l e

m en

t s

.

Think

o

f

a

strea

m

as

an

\

in nite

list"

where

elemen

ts

a

re

co

mpu ted

s

uccessiv

ely

.

Cr

ea

t e

an

in nite

strea

m

of

f a

ct o

re

d

in

teger

s.

Only

a

certa

i n

n

um

b

background image

1

00

CHAPTE

R

3.

ST

A R

TING

AXIOM

O

n e

-dim e

n s

ional

ar

ra

ys

a

re

also

m

u ta

ble:

y

ou

c

an

c

hang

e

their

cons

t ituen

t

elemen

ts

\in

pla

ce."

a

.3

:=

11

;

a



1

;

7

;

11

;

3

2



Ty

pe

:

On

eD

ime

ns

ion

al

Ar

ray

F

ra

ti

on

In

te

ger

Ho

w

ev

er,

one-

dim e

n s

ional

ar

ra

ys

a

re

not

exible

str

u c

t ur

es.

Y

o

u

canno

t

d e

-

str

u c

t iv

ely

on a t!

them

tog

et her

.

on

at

!(a

,o

neD

im

en

sio

na

lAr

ra

y

[1,

-2

℄)

T

he

re

ar

e

5

e

xp

ose

d

and

0

u

nex

po

sed

l

ibr

ar

y

ope

ra

tio

ns

n

ame

d

on

a

t!

hav

in

g0.12 Tf -308.28ysedOn

background image

3

.9.

D

A

T

A

STR

UCTURES

10

1

A

exi blea rr

background image
background image

3

.9.

D

A

T

A

STR

UCTURES

10

3

Typ

e:

Mul

ti

set

I

nt

ege

r

A

t

a ble

i s

conceptually

a

set

of

\

k

ey{

v

alue"

p a

irs

and

is

a

gener

aliza

t io

n

of

a

m

u ltiset.

F

or

e

xamples

of

ta

b le

s,

s

background image

1

04

CHAPTE

R

3.

ST

A R

TING

AXIOM

d

ani

el

:

R

e o

rd

(a

ge

:

In

te

ge

r,

sa

lar

y

:

background image

3

.10

.

E

X P

AN DING

TO

H IGHER

D IME

N SIO

N S

10

5

3.10

Expa n

ding

to

Higher

Di mensions

T

o

g

et

higher

dim e

n s

ional

ag

gr

ega

t e

s,

y

background image
background image

3

.11

.

WRITING

Y O

UR

O

W N

FUNCTIONS

10

7

n

u m

b

er

s

a

s

co

eÆcien

ts.

Mor

eo

v

er,

t he

libr

ar

y

pro

vides

a

w

background image

1

08

CHAPTE

R

3.

ST

A R

TING

AXIOM

This

f unction

is

less

background image

3

.11

.

WRITING

Y O

UR

O

W N

FUNCTIONS

10

9

Ty

pe

:

Po

si

tiv

eI

nt

ege

r

The

libr

ar

y

v

er

sio

n

use

s

an

a

lgo

rithm

that

is

di eren

background image

1

10

CHAPTE

R

3.

ST

A R

TING

AXIOM

Cr

eate

a

n

exa

mpl e

matrix

to

p

er

m

ut e.

m

:=

m

atr

ix

[

[4

*i

+

j

for

j

i

n

1

..

4℄

fo

r

i

i

n

0..

3℄

2

6

6

4

1

2

3

4

5

6

7

8

9

10

1

1

1

2

13

14

1

5

1

6

3

7

7

5

T

ype

:

Ma

tr

ix

In

te

ger

In

ter

c

hang

e

the

se

cond

a

nd

background image

3

.11

.

WRITING

Y O

UR

O

W N

FUNCTIONS

11

1

1

:0

T

ype

:

F

loa

t

Her

e

w

e

de ne

o

u r

o

wn

(user

-de ned)

f unction.

os

inv

(y

)

==

o

s(1

/y

)

Typ

e:

Voi

d

P

a

ss

t his

f unction

a

s

an

a

rg

um en

t

t o

t.

t

(

osi

nv

,

5.2

05

8)

1:

3

background image
background image

3

.12

.

P

OL

YNOMIALS

11

3

m

:

MP

OL

Y(

[x,

y℄

,IN

T)

:

=

(

x*

*2-

x*

y**

3+

3*

y)*

*2

x

4

2

y

3

x

3

+

y

6

+

6

y



x

2

6

y

4

x

+

9

y

2

Ty

pe

:

Mu

lt

iva

ri

ate

Po

lyn

om

ia

l([

background image

1

14

CHAPTE

R

3.

ST

A R

TING

background image

3

.14

.

SE

R IE

S

11

5

l

im

it(

sq

rt

(y*

*2

)/y

,y

=

0)

[l ef

tH

andLi

mit

=

1

;

r

ig

htH

andL

imi

t

=

1]

Ty

pe:

Uni

on

(R

e o

rd

(le

ft

Ha

ndL

im

it:

Uni

on

(O

rde

re

dCo

mp

le

tio

n

Ex

pr

ess

io

n

Int

eg

er,

"f

ail

ed

")

,ri

gh

tHa

nd

Li

mit

:

U

nio

n(

Ord

er

ed

Com

pl

eti

on

E

xpr

es

sio

n

Int

eg

er

,"f

ai

led

")

),

...

)

AsTy6Td ())Tj /R81 0.9 15.72 0pprTd (s)Tj

background image

1

16

CHAPTE

R

3.

ST

A R

TING

AXIOM

T

yp

e:

U

ni

var

ia

te

Pui

se

uxS

er

ies

Tnr

te

background image

3

.14

.

SE

R IE

S

11

7

f

*

*

2

1

+

2

background image

1

18

CHAPTE

R

3.

ST

A R

TING

AXIOM

E

v

a

luate

the

serie

s

a

t

the

v

background image

3

.15

.

DERIV

A

TIVES

11

9

Y

o

u

ca

n

als

o

comput e

par

tial

d er

iv

ativ

es

b

y

sp

ecifying

t he

or

der

of

di ere

n

t ia

-

tio

n .

g

:

=

s

in

(x

**2

+ Td (n)Tj 5.28 -1000(0/R81 0.12 Tf 262.2 0 Td (11)Tj 9.96 0 Td (9)Tj -338.64 2 0 27(x)Tj2

background image

1

20

CHAPTE

R

3.

ST

A R

TING

AXIOM

Y

ou

c

an

use

F,

x ,

and

y

in

expr

essio

ns.

a

:=

F

(x

z,

y

z,

z

**2

)

+

x

y

(z

+1)

x

(y

( z

+

1))

+

F

x

(z

 0 Td (+)Tj 10.567[(; 0 4Td [yA)-10 0 cm BT /R81 12 Tf Tf 6.84 0 Td (()Tj /R24 0.12 Tf 3.96 0 Td (z)Tj /R815sio

 0 Td (+)Tj 10.567[(; 0 4Td [zA)-10 0366

F

background image

3

.16

.

INTEGRA

TION

12

1

0

B

B

B

B



2

z

2

+

2

z



background image

1

22

CHAPTE

R

3.

ST

A R

TING

AXIOM

omp

le

xIn

te

gra

te

(1

/(x

**

2

+

a

),

x)

lo

g



x

p

a+a

p

a



log



x

p

a

a

p

a



2

p

a

T

yp

e:

E

xp

res

si

on

In

te

ger

The

f o

llo

wing

t

w

o

examples

illu s

t r

ate

t he

limit a

t io

ns

o

f

table-ba

sed

appro

ac

hes.

The

t

w

o

in

tegr

ands

ar

e

v

ery

similar

,

but

the

a

nsw

er

to

one

of

them

r

equires

the

a

d dition

of

t

w

o

new

alg

eb r

aic

n

um

b

ers.

This

o

ne

is

t he

e

asy

o

ne.

The

next

one

lo

o

ks

v

ery

s

i mila

r

but

the

a

nsw

er

is

m

uc

h

more

co

m plica

t ed.

i

nte

gr

ate

(x

**3

/

(

a+b

*x

)**

(1

/3

),x

)

12

0

b

3

x

3

13

5

a

b

2

x

2

+

1

62

a

2

b

x(3)Tj /R395 0.12 T 0 i72 Tf 6.72 3.72 T4 (b)Tj /R366 0.12 1

62

background image

3

.16

.

INTEGRA

TION

12

3

c

onclusiv

e

ly

pr

o

v

es

that

an

in

tegr

al

canno

t

b

e

expres

sed

i n

terms

o

f

elemen

tar

y

functions.

When

A x

iom

returns

a

n

i n

t eg

ra

l

sign,

it

has

pr

o

v

ed

th a

t

no

answ

er

exists

a

s

an

e

l e

m en

t a

ry

f unction.

i

nt

egr

at

e(

log

(1

+

sq

rt

(a*

x

+

b

))

/

x,

x)

Z

x

log



p

b

+

%Q

a

+

1



%Q

d%Q

T

yp

e:

U

nio

n(

Exp

re

ss

ion

I

nte

ge

r,

...

)

Axio

m

can

ha

ndl e

complica

t ed

mixed

f unctions

m

u c

h

b

ey

o

n d

wh a

t

y

o

u

can

nd

in

background image

1

24

CHAPTE

R

3.

ST

A R

TING

AXIOM

1.

If

x

=

tan

t

and

g

=

t a

n(t=3

)

then

the

follo

wing

a

lgebr

aic

r

elation

is

t r

background image

3

.17

.

DIFF E

RENTIAL

E

QUA

TIONS

12

5

y

:

=

o

pe

ra

tor

'

y

y

Ty

pe

:

Ba

si

Op

er

ato

r

Her

e

w

e

so

lv

e

a

third

or

d e

r

eq

u a

tion

with

p

olyno

mial

co eÆ c

ien

ts.

d

eq

:=

x

**

3

*

D

(y

x,

x

,

3

)

+

x

**

2

*

D

(y

x,

x

,

2

)

-

2

*

x

*

D(

y

x

,

x

)

+

2

*

y

x

=

2

*

x

**

4

x

3

y

;;;

( x)

+

x

2

y

;;

( x)

2

x

y

;

( x)

+

2

y

(x)

=

2

x

4

T

ype

:

Eq

ua

tio

n

Ex

pre

ss

ion

I

nt

ege

r

s

ol

ve(

de

q,

y,

x

)

h

par

ti u

l

ar

=

x

5

10

x

3

+20

x

2

+4

15

x

;

b

asis

=



2

x

3

3

x

2

+

1

background image
background image

3

.18

.

SOL

U TIO

N

OF

E

QUA

background image

1

28

CHAPTE

R

3.

ST

A R

TING

AXIOM

T

yp

e:

V

oid

Find

the

re

al

r

o

ots

of

S

(1

9)

with

r

ationa

l

ar

it hmetic,

co

rr

ect

to

wit hin

background image

3

.18

.

SOL

U TIO

N

OF

E

QUA

TIONS

12

9

e

qn

s

:

=

[x

**2

-

y

+

z,

x**

2*

z

+

x

**4

-

b

*y,

y

**2

*

z

-

a

-

b*

x℄

*

background image
background image

C

hapte r

4

G

raphi s

Figure

4.1

:

background image

1

32

CH AP

TER

4

.

GRAPHICS

background image

13

3

Pl

otting

2D

gra phs

of

1

v

ariable

The

gener

al

fo

rmat

fo

r

dr

a

w

i ng

a

fu nctio

n

de ned

b

y

a

for

m

ula

f

(x )

is

:

d

raw

(f

(x

),

x

=

a

..

b,

o ptions)

wher

e

a

: :b

de nes

th e

r

ange

o

f

x ,

and

wher

e

background image

1

34

CH AP

TER

4

.

GRAPHICS

Plo

t ti

ng

2D

para m

background image

13

5

Pl

otting

2D

a l

gebrai

urv

es

The

g

enera

l

f o

rma

t

fo

r

dra

wing

a

non-

singular

so

lu tio

n

c

u r

v

e

giv

e

n

b

y

a

p

olyno

mial

o

f

th e

f o

rm

p( x;

y

)

=

0

is:

dr

aw

(p

(x,

y)

=

0,

x,

y

,

ran

ge

==

[

a.

.b,

..d

℄,

op t

i ons)

wher

e

th e

s

econd

a

n d

third

ar

gumen

ts

na

m e

the

rs

t

a

nd

s

econd

indep

e

n den

t

v

a

riables

of

p.

A

r

an

ge

option

is

a

lw

a

ys

g

iv

en

to

designa

te

a

b

ounding

r

ectang

u la

r

r

egio

n

of

the

plane

a



x



b

;



y



d.

Z

ero

or

mor

e

additi o

nal

o

pt io

ns

a

s

des

crib

ed

in

4

.0.1

on

pa

ge

13

6

m a

y

b

e

giv

en.

A

third

k

i nd

o

f

t

w

o-

dim e

n s

ional

g

ra

background image

1

36

CH AP

TER

4

.

GRAPHICS

co

me

to

a

p

o

in

t

(cusp).

Algebr

aica

lly

background image

13

7

adaptiv

e

T

h e

ad

apt

iv

e

o

pti o

n

turns

ada

p tiv

e

plotting

o

n

o

r

o

.

Ada

p tiv

e

plotting

us

es

a

n

background image

1

38

CH AP

TER

4

.

GRAPHICS

background image

13

9

Fig

u r

e

4

.6:

Tw

o-dimensio

nal

co

n

tro

l-panel.

background image
background image

14

1

Pi

k :

k :

background image

1

42

CH AP

TER

4

.

GRAPHICS

ax e

sCol

orD e

f ault

([

o l

or (dar k

bl ue()) ])

sets

o

r

indica

t es

th e

def a

ult

colo

r

o

f

t he

axes

in

a

t

w

o-

dim e

n s

ional

gr

aph

viewp

o

rt.

li

pP

oi

n

ts

darda (ul)

(

[ o

background image
background image

1

44

CH AP

TER

4

.

GRAPHICS

regi

on

(

viewp

o rt,

int e

ge r(1) ,

str i

ng ("of f"))

d e

clar

es

whether

g

ra

ph

i nt

e

ger

is

or

is

no

t

to

b

e

displa

y

ed

wit h

a

b

o

undi ng

rectang

le.

rese

t

(vi

e wp

or

background image
background image

1

46

CH AP

TER

4

.

GRAPHICS

p

8

:

=

poi

nt

[.

5,

1℄

$(P

oi

nt

DF

LO

AT)

background image
background image

1

48

CH AP

TER

4

.

GRAPHICS

p

3

:=

pa

st

el

ye

ll

ow(

)

[ Hue:

1

1W

eigh

t:

1

:0]

fr

om8i48 20 TdasTj 4.6 te

background image
background image

1

5068 762571 0.12 Tf216.482 0 Td[(CH)-1000(AP)]TJ 284.92 0 Td TER068 24.792 0 Td 41

background image
background image
background image

15

3

f

or

p

in

lp

r

epe

at

o

mp

on

ent

(g

,p,

po

in

tCo

lo

rDe

fa

ult

()

,l

ine

Co

lor

De

fa

ult

()

,

po

in

tSi

ze

De3f0sCdfafa

inin

lorp

lorplorin

ofa

m (in)Tj 15.72 0ak())Tj 10.44 0 TdViinine

on

inlorpoinDe3f0sCdDe

,3ze)

De

background image

1

54

CH AP

TER

4

.

GRAPHICS

background image

15

5

Pl

otting

3D

fun tio

ns

of

2

v

a riabl

es

The

gener

al

f o

rma

t

f o

r

dra

wing

a

surfac

e

de ned

a

background image

1

56CH AP1t tipara metr ispac ec urv

background image

15

7

Pl

otting

3D

pa ram

etri

surfa es

background image

1

58

background image

15

9

4.0.9

Three- Di

m

en si

ona l

Con

trol

-P

ane l

O

nce

y

oC7ron

background image

1

60

CH AP

TER

4

.

GRAPHICS

ob

je

t:

The

ob

je t

button

indicates

that

the

ro

tation

is

to

o

ccur

with

res

p

ec

t

to

t he

cen

ter

o

f

v

o

l ume

o

f

t he

o

b

ject,

indep

enden

t

of

the

ax

es'

or

igin

p

os

it io

n.

S a l

e:

A

scaling

t r

ans

f o

rmatio

n

o ccurs

b

y

clic

king

t he

mo

use

background image
background image

1

62

CH AP

TER

4

.

GRAPHICS

BW

co

n

v

er

ts

a

co

lor

viewp

or

t

to

b la

c

k

and

whi te,

or

vic

e-v

e

rsa

.

When

this

b utton

is

selected

th e

con

tr

ol-pa

nel

and

viewp

or

t

switc

h

to

a

n

imm

ut a

ble

colo

rmap

co

mp

o

sed

o

f

a

ra

nge

o

f

gr

ey

sca

le

patterns

or

t iles

t ha

t

ar

e

used

wh e

rev

eTj 8.88 s is

neces

sar

y

.

Ligh

t

ta

k

esj 8.88 s

background image

16

3

Vi

ew

V

ol

um

e

The

V i

ew

V

o

lum

e

but to

n

c

hang

es

the

co

n

background image

1

background image

16

5

s

etAda pti

v

e3D

(b

o

ol

e 0 Td e (o)Tj 4.39[Tj t6 0 Td rue)D16

background image
background image

16

7

vi

ewS ale

D e

f aul

t

([ o

a t

background image

1

68

CH AP

TER68TER

background image

C

background image

1

70

CHAPTE

R

5.

U SING

TYPE

S

AND

M O

D E

S

-

3

3

Ty

pe

:

In

te

ger

Here

w

e

crea

te

a

r

ationa

l

n

um

b

er

bu t

i t

lo

oks

lik

e

the

las

t

res

ult .

background image

5

.1.

TH E

BASIC

I

D E

A

17

1

An

y

doma

in

can

b

e

re

ned

t o

a

su

b

d omai n

b

y

a

mem

b

er

ship

p

re

di

at

e.

A

p

re

di

at

e

is

a

f unction

t ha

t ,

when

a

pp244 0 an

background image

1

72

CHAPTE

R

background image

5

.1.

TH E

BASIC

I

D E

A

17

3

background image

1

74

CHAPTE

R

5.

U SING

TYPE

S

AND

M O

D E

S

P

oly

n o

mial

Squa

reMa

trix(7,Co

mp le

x

In

teg

er)

T

yp

e:

D

om

ain

Another

common

c

atego

ry

is

F

iel

d,

the

cla

ss

o

f

al24 0 4o elds68 0 29 0.12 Tf 5A6 0 Td (o)]TJ 10 eld0 Td (S36y)Tj 12.24 0 3 0.12 Tf 9a4 0 Td(ss)Tj 11Td (An 0.12 Tf 9ing 0 Td ((om)Tj 10with 0 T1 04S36yTd 88 Tf 9a4 0 40(O)]TJ 16.d 0 Td [ditiona-1000(6y)Tj 12l28 0 T7,Co)Tj 39o6 02Td [era-100004S1O)]TJ 16.t 0 Td [i[(n)-101Td (x)Tj 8ns68 0 d ((o)]TJ 10.84 0 Td (x)Tj 8or2 0 Td d (,)Tj 5example.28 041Td (x)Tj 8a4 0 7Td (o)Tj 4 eld0 Td (S36y)Tj 12ha6 0 Td (om)Tj 10s92 0 T9er)Tj 38.74 0 3 3,Co

M

background image

5

.1.

TH E

BASIC

I

D E

A

17

5

1.

a

n a

me

(f o

r

e

xample,

R

in

g),

use

d

t o

background image

1

76

CHAPTE

R

5.

U SING

background image

5

.2.

W RITING

TYP

ES

AND

M O

DES

17

7

When

migh

t

y

background image
background image

5

.2.

W RITING

TYP

ES

AND

M O

DES

17

9

If

the

t

y

p

e

it se

lf

ha

s

pa

ren

t hese

s

a

ro

u nd

it

and

w

e

ar

e

no

t

in

t he

cas

e

o

f

the

r

st

exa

mpl e

ab

o

v

e,

t hen

t he

p a

ren

t hes

es

ca

n

usua

ll y

b

e

omitted.

(

2/

3)

Fr

a

tio

n(

Pol

yn

om

ial

I

nte

ge

r)

2

3

T

ype

:

Fr

a

tio

n

Po

lyn

om

ial

I

nt

ege

r

If

t he

t

yp

e

i s

use

d

in

a

d e

clar

ation

and

t he

ar

gumen

t

is

a

single-

w

or

d

t

y

p

e,

in

t eg

er

or

sym

b

o

l,

th e

n

t he

par

en

theses

can

usua

lly

b

e

o

mi tted.

(

d,

f,g

)

:

Co

mp

lex

P

ol

yno

mi

al

In

teg

er

Typ

e:

Voi

e:

background image

1

80

CHAPTE

R

5.

U SING

TYPE

S

AND

M O

D E

S

?

(In

te

ger

),

Ma

tr

ix(

?

(P

ol

yno

mi

al

)),

Sq

ua

reM

at

ri

x(?

,

Int

eg

er

)

( it

re

-

quir

es

a

n

um e

ric

ar

gumen

t)

a

n d

Sq

ua

reM

at

rix

(?

,

?)

a

re

all

in

v

alid.Fhe 0 Td 26.5j -340.32 14 0 Td 9re

background image
background image

1

82

CHAPTE

R

5.

U SING

TYPE

S

AND

M O

D E

S

Y

ou

can

alw

a

ys

co

m

bine

a

decla

ra

ti o

n

with

an

a

ssig

nmen

t.

When

y

ou

do,

it

is

equiv

ale

n

t

t o

r

st

giv

i ng

a

declar

atio

n

statemen

t,

then

g

i v

in g

a

n

Scan (n76TJ 16.68 0 Td4ar)Tj 26:0 Td (sine)Tj 21I16 05 (st)Tj 1(nte0 Td (sine)Tj 21s (n)Tj 96TJ 16.68yV[T8f 1e)Tj 21I16 05 (yp)Tj 21s (n)Tj 9e:Tj 8.0n

background image

5

.3.

D E

CLARA

TIO

N S

18

3

(

p,

q,r

)

:

Ma

tr

ix

Po

ly

nom

ia

l

?

Typ

e:

Voi

d

h(ia)Tj 10.44 0 Tdhis7.3.72 0 Td nis8.0.44 0 Td eg(?)Tj ..72 0 Td (tr)Tj138.62 0 Tdrea(?)Tj .3.72 0 Td (l)T6 0.12 0 Tdan (d)T1910.44 0 Td maoir(ly)Tj218.48 0 Td p(N)-100a(E)]TJ 10.56 0 Tdrts.(3)Tj /R83 0.12 Tf2-3388 24 0.12 Td )

:l:

d5d3

background image

1

84

CHAPTE

R

5.

U SING

TYPE

S

AND

M O

D E

S



i

x

+

1

7

y

+

4

i



T

yp

e:

M

atr

ix

Po

ly

no

mia

l

Com

pl

ex

In

te

ger

Note

the

di erence

b

et

w

een

this

a

nd

t he

n e

xt

example.

This

is

a

complex

ob

ject

with

p

olyno

m ia

l

r

eal

a

nd

imag

inary

par

ts.

f

:

C

OMP

LE

X

P

OL

Y

?

:

=

(x

+

7

background image

5

.4.

RECO

R DS

18

5

Ty

pe

:

Re

or

d(

a:

I

nt

ege

r,

b:

S

tr

ing

)

T

o

acce

ss

a

co

mp

o

nen

a

background image
background image

5

.4.

RECO

R DS

18

7

Rec

ords

ma

y

b

e

nested

and

the

selec

t o

r

na

mes

ca

n

b

e

shar

ed

at

di eren

t

lev

els.

r

:

R

e

or

d(a

:

R

e

or

d(b

:

In

te

ger

,

:

I

nt

ege

r)

,

b:

I

nte

ge

r)

Typ

e:

Voi

d

The

reco

rd

d

background image
background image

5

.5.

U NIO

N S

18

9

It

is

p

os

sible

to

cre

ate

unio

n s

lik

e

Un

io

n(

Int

eg

er,

P

osi

ti

ve

Int

eg

er)

but

they

a

re

diÆ c

u lt

to

w

o

rk

with

b

e

cause

of

the

o

v

erla

p

in

the

bra

nc

h

t

background image

1

90

CHAPTE

R

5.

U SING

TYPE

S

AND

M O

D E

S

1.

A xio

m

nor

mally

co

n

v

erts

a

r

esult

t o

the

tar

get

v

a

lu e

b

efo

re

pa

ssing

it

t o

t he

funct io

n.

If

w

e

left

the

decla

ra

t io

n

in fo

rmation

o

ut

o

f

t his

functi o

n

d e

nition

th e

n

the

s

a

yBr an

h

background image

5

.5.

U NIO

N S

19

1

3

Ty

pe:

Un

ion

(I

background image

1

92

CHAPTE

R

5.

U SING

TYPE

S

AND

M O

D E

S

5.5.2

Un i

ons

Wi

t

h

Sel

e

tors

Lik

e

r

ecor

ds,

y

ou

ca

n

wr

it e

background image
background image

1

94

CHAPTE

R

5.

U SING

TYPE

S

AND

M O

D E

S



1

;

7:2

;

3

2

;

x

2

;

"w

al

ly"



Typ

e:

Lis

t

Any

When

w

e

ask

for

th e

elemen

ts,

Axio

m

displa

ys

these

t

yp

e

s.

u

.1

1

Ty

pe:

Pos

it

iv

eIn

te

ger

Actually

,

th e

se

ob

jects

b

elong

to

A

ny

but

A x

iom

automa

t ica

lly

background image

5

.7.

CONVERSION

19

5

B

y

default,

3

has

t he

t

yp

e

Po

si

tiv

eI

nt

ege

r.

3

background image

1

96

CHAPTE

R

5.

U SING

TYPE

S

AND

M O

D E

S



x

3

i

4

y

2

z

+

1

2

3

i

7

y

4

x

60

9

i

5



Ty

pe:

Sq

uar

eM

atr

ix

(2

,Po

ly

nom

ia

l

F

ra

t

ion

C

omp

le

x

Int

eg

er)

In

ter

c

hang

e

the

P

oly

no

mia

l

and

the

F

ra

ti

on

lev

e

l s

.

m

2

:

=

m1

::

S

qu

ar

eMa

tr

ix(

2,

FR

AC

PO

LY

CO

MPL

EX

I

NT)

"

4

x

3

i

4

2

y

2

z

+1

2

3

i

y

4

7

x

7

60

9

i

5

#

Ty

pe:

Sq

uar

eM

atr

ix

(2

,Fr

a

tio

n

Pol

yn

om

ial

C

omp

le

x

Int

eg

er)

In

ter

c

hang

e

the

P

oly

no

mia

l

and

the

C

omp

le

x

le

v

els.

m

3

:

=

m2

::

S

qu

ar

eMa

tr

ix(

2,

FR

AC

CO

MPL

EX

PO

LY

I

NT)

"

4

x

3

i

4

2

y

2

z

+1

2

background image

5

.7.

CONVERSION

19

7

c

atego

ry

background image
background image

19

9

F

ur

t her

m o

re

,

unl e

ss

y

o

u

a

re

a

ssig

n ing

an

in

t e

Tm-e.84 0 Tdtore

aaTm-).84 Td (GAIN)Tj /100012 06ug1(Tf 22.84 Td 3GAIN)Tj /59cm B24.

background image

2

00

CHAPTE

R

5.

U SING

TYPE

S

AND

M O

D E

S

T

yp

e:

F

ra

ti

on

In

te

ger

It

mak

es

sense

t hen

tha

t

t his

is

a

list

o

f

background image
background image

2

02

CHAPTE

R

5.

U SING

TYPE

S

AND

M O

D E

S

Ty

pe

:

Fl

oat

P

erha

ps

w

e

a

background image

5

.9.

P

A

CK

A

GE

CALLING

AND

T

A R

G E

T

TYP

ES

20

3

So

met imes

it

m a

k

es

sense,

a

s

in

this

expr

essio

n,

to

s

a

y

\c

ho

os

e

th e

op

era

tions

in

t his

expres

sion

so

t ha

t

t he

nal

r

esult

is

Flo

at.

(

2/

3)

Fl

oa

t

0:6

66

66

66

66

666

66

66

66

67

T

ype

:

F

loa

t

Her

e

w

e

used

\

background image

2

04

CHAPTE

R

5.

U SING

TYPE

S

AND

M O

D E

S

This

sa

ys

th a

t

the

o

p

e

ra

t io

ns

s

hould

b

e

c

hos

en

so

that

t he

re

sult

is

a

Po

lyn

om

ial

o

b

j e

ct .

(

(x

+

y

*

%

i)*

*2

)

(Po

ly

nom

ia

l

Com

pl

ex

In

teg

i (eU.%m0(e) (re)Tj 8.2i 0 Td (s)Tj 3.8x0 Td (is)Tj y Td (ial)Tj /R81 7eU.pfyTd (+ Td (i (eU.%m0(e)9 Tf 0)10.4x 0 Tlud66eU.%m0(e)NG)℄T-d ( )10.42 Td (ia)℄TJ /R83 03d (s)TYP3327.96T 0 Td (%)Tj 5.1ype Td (teg)Tj 15.7: Td (teg)Tj 15.72 0 Td (Po)Tj 10.44 0 Td (ly)Tj 10.44 0 Td (ly)Tj 10.4m2 0 Td (Po)Tj 15.72 0 Td (l)Tj 10.44 0 Td (Com)Tj 15.72 0 Td (pl)Tj 10.44 0 Td (ex)Tj 15.72 0 Td (In)Tj 10.44 0 Td (In)Tj 10.4g2 0 Td(ial)Tj /R81 0.12 Tf %(Com)TW 0 Td (t7 Tf 0)10.4d 0 Td 3 (2)Tj 4.9y 0 Td 0)Tj 10.4 12 Td (o)Tj 4.(u0 Td (ra)Tj 8.88 0 Td [(hink)-100oul)Tj 10.4m2ghTd (Thi2)℄TJ 14.4 0 T0.12 Tf 7.3h 0 Td (ia)Tj 10.92 0 Td [(p0 Td [(bn)-100o4om)Tj 15.72f 0 T9 2)℄TJ 14.w 0 Td (s)Tj 3.8e 0 T0.a

background image

5

.10

.

RE

S O

L

VING

TYPE

S

20

5



1

8

1

6

1

4

1

9



Ty

pe:

Mat

background image
background image
background image

2

08

CHAPTE

R

5.

U SING

TYPE

S

AND

M O

D E

S

ate

go

rie

s

A

be

lia

nG

ro

up

A

BE

LGR

P

A

be

lia

nM

on

oid

A

BE

LMO

N

A

be

lia

nM

on

oid

Ri

ng

A

MR

A

be

lia

nS

em

iGr

ou

p

A

BE

LSG

A

gg

reg

at

e

A

GG

A

lg

ebr

a

A

LG

EBR

A

A

lg

ebr

ai

a

lly

Cl

ose

dF

ie

ld

A

CF

A

lg

ebr

ai

a

lly

Cl

ose

dF

un

ti

on

Spa

e

A

CF

S

A

r

Hyp

er

bo

li

Fu

n t

io

nC

ate

go

ry

A

HY

P

.

..

F

or

eac

h

co

nstructor

in

a

gr

oup,

the

f ull

name

a

n d

the

abbre

viation

is

g

i v

en.

Ther

e

a

re

other

gr

oups

in

e

x p

o

sed.

ls

p

but

init ia

lly

o

nly

the

constr

u c

t o

rs

in

exp

os

ure

g

ro

ups

\

basic"

\

categ

or

ies"

\na

glink"

and

\

anna

"

a

re

exp

osed.

As

an

in

t er

activ

e

user

o

f

Axiom,

y

o

u

do

background image

5

.12

.

CO

MM AND S

F

OR

SNOO

PING

20

9

This

is

a

p

olyno

mi a

l.

x

+

x

2

x

Ty

pe:

Po

lyn

om

ial

I

nt

ege

r

E

xp

ose

Ou

tpu

tF

or

m.

)

se

t

e

xp

os

e

a

dd

o

ns

tr

u t

or

Ou

tp

utF

or

m

Out

pu

tF

orm

i

s

n

ow

e

xpl

i

itl

y

exp

os

ed

in

f

ram

e

G8

232

2

This

is

wha

t

w

e

get

when

O

ut

pu

tFo

rm

is

a

utomatica

l ly

a

v

ailable.

x

+

x

x

+

x

T

ype

:

Ou

tp

ut

For

m

Hide

O

ut

put

Fo

rm

so

w

e

don't

run

in

t o

pro

blems

with

a

n

y

la

ter

e

xamples!

)

se

t

e

xp

os

e

d

ro

p

on

st

ru

to

r

O

ut

put

Fo

rm

Out

pu

tF

orm

i

s

n

ow

e

xpl

i

itl

y

hid

de

n

in

fr

ame

G

82

322

Fina

l ly

,

exp

os

u r

e

is

d o

ne

on

a

f r

ame-

b

y-fra

me

ba

sis.

A

f r

a me

is

one

of

p

o

background image

2

10

CHAPTE

R

5.

U SING

TYPE

S

AND

M O

D E

S

o

p

er

ations

.

T

h e

mos

t

p

o

background image

5

.12

.

CO

MM AND S

F

OR

SNOO

PING

21

1

RM

ATC

AT

-

Re

ta

ngu

la

rM

atr

ix

Cat

eg

ory

&

RM

ATR

IX

Re

ta

ngu

la

rM

atr

ix

SM

ATC

AT

-

Squ

ar

eMa

tr

ix

Cat

eg

ory

&

SQ

MAT

RI

X

Squ

ar

eMa

tr

ix

Similar

ly

,

if

y

ou

wis

h

to

see

a

ll

p a

c

k

a

ges

w

h o

se

na

m e

s

con

t a

in

\g

aus

s"

,

en

ter

this.

)

wh

at

pa

k

age

g

aus

s

-

--

---

--

--

---

--

---

--

--

Pa

k

age

s

---

--

--

---

--

---

--

--

---

-

P

a

kag

es

w

ith

n

ame

s

ma

t h

in

g

p

at

ter

ns

:

g

au

ss

GA

USS

FA

C

Gau

ss

ian

Fa

t

ori

za

tio

nP

a k

ag

e

This

co

m ma

background image

2

12

CHAPTE

R

5.

U SING

TYPE

S

AND

M O

D E

S

)

dis

pl

ay

op

era

ti

on

o

mp

lex

T

her

e

is

on

e

e

xp

os

ede

background image

C

hapte r

6

U

si

ng

Hy

p

erDo

Fig

ure

6.1:

The

Hyp

er

D o c

r

o

ot

windo

w

pa

ge

Hyp

erDo

c

is

the

ga

t ew

a

y

to

Axio

m.

It's

b

oth

an

on-line

tut o

ria

l

a

nd

a

n

on-line

r

eference

ma

n

ual.

It

also

enables

y

ou

to

use

Axio

m

s

im ply

b

y

using

the

m o

use

a

nd

llin g

in

background image
background image

6

.3.

SCR

OLL

BARS

21

5

Do

wn

Arr o

w

Scro

ll

do

wn

one

line.

P

a g

e

Up

Scr

oll

up

o

ne

pag

e.

P

a g

e

ro

ll

S r

oll

do

wn

o

ne

pag

background image

2

16

CHAPTE

R

6

.

USIN G

HYPE

RD O

C

The

inpu t

ar

ea

g

ro

ws

to

a

ccommo

date

as

m a

n

y

c

ha

ra

cters

a

s

y

o

u

t

yp

e.

Use

the

Ba

k s

pa e

k

ey

to

era

se

c

ha

ra

ct er

s

to

t he

left .

T

o

mo

dif y

wha

t

y

o

u

t

y

p

e,

u s

e

the

r

igh

t -

ar

ro

w

!

background image

6

.7.

EXAMPLE

P

A

GE

S

21

7

The

glos

sar

y

ha

s

an

input

ar

ea

a

t

it s

b

o

tt o

m.

W

e

review

t he

v

a

rio

u s

kinds

o

f

s

ear

c

h

s

t r

ings

y

o

u

can

en 0 Td

background image

2

18

CHAPTE

R

6

.

USIN G

HYPE

RD O

C

its

t ex

t !

Wh en

y

o

u

d o

,

the

example

lin e

is

co

p ie

d

in

to

a

new

in

tera

cti v

e

A x

iom

bu e

r

for

this

Hyp

erDo

c

page

.

Sometimes

one

exa

mple

line

ca

n no

t

b

e

run

b

efor

e

y

o

u

r

un

a

n

ea

rlier

one.

Don't

w

o

r0 Td [(U2F[(d)-1000(o)]T4 47.4 0 Tmaticalld (y)43 49.44 0 Td (sne.)Tj j 12 0 Tdllits)Tj 4.92 0 Td (the)T7j 8.16 0 Td c(un)Tj 20.28 0 Tesstera

background image
background image
background image

C

hapte r

7

I

nput

Fil

es

and

Output

St

y

les

In

this

c

ha

p ter

background image
background image

7

.3.

COMMON

FE

A

TURE

S

OF

USING

OUTP

U T

F

ORMA

TS

22

3

background image

2

24

CHA P

TER

7.

background image

7

.5.

TEX

F

O

RMA

T

22

5

T

ur

n

T

E

X

output

on

a

ga

in.

)

se

t

o

ut

pu

t

t

ex

on

The

c

har

acters

u s

ed

f o

r

the

m a

trix

bra

c

k

ets

ab

o

v

e

a

re

ra

ther

ugly

.

Y

ou

g

et

this

c

har

acter

set

when

y

ou

iss

u e

)s

et

ou

tp

ut

h

ara

t

ers

p

la

in.

This

c

ha

ra

cter

s

et

should

b

e

used

wh e

n

y

o

u

ar

e

r

u nning

on

a

mac

hine

th a

t

do

es

n o

t

supp

o

rt

the

IBM

ex

t ended

ASCI

I

c

har

ac

t er

set.

If

y

o

u

ar

e

running

o

n

an

IBM

w

or

k-

s

t a

tion,

for

example,

i s

sue

)se

t

out

pu

t

ha

ra

te

rs

d

efa

ul

t

t o

get

b

et

background image

2

26

CHA P

TER

7.

IN P

UT

FILES

A ND

OUTP

U T

STY LE

S

\

def

\

s h

{\

mat

ho

p{

\rm

s h

}\

no

lim

it

s}

\

def

\e

rf{

\m

ath

op

{\

rm

er

f}\

no

li

mit

s}

\

def

\z

ag#

1#

2{

{{

\h

fil

l

\le

ft

.

{#1

}

\ri

gh

t|

}

\

ov

er

{

\l

eft

|

{#2

}

\r

igh

t.

\h

fi

ll

}

}

}

7. 6

IBM

S ript

F

o rm

ula

F

o rmat

Axiom

can

pr

o

duce

IBM

Script

F

or

m

ula

F

o

rmat

o

background image

7

.7.

F

OR

TRAN

F

ORMA

T

22

7

Since

so

me

v

er

sio

n s

of

F

OR

TRAN

ha

v

e

restr

ict io

ns

on

the

n

um

b

e

r

of

lines

p

er

sta

t emen

t ,

Axiom

brea

ks

long

expr

essio

ns

in

t o

s

egmen

ts

wit h

a

maxim

um

o

f

13

20

c

har

acter

s

(20

li nes

of

66

c

ha

ra

ct er

s)

p

e

r

seg

men

t.

If

y

ou

w

an

t

c

longj 4.92 0 Td 8n s6cwayTj 10.44 , Td (w)Tj 6.84 0 Td [(t)-1000(o)]ysegchara66haued (seg)th

background image

2

28

background image

7

.7.

F

OR

TRAN

F

ORMA

T

22

9

Ty

pe:

Po

lyn

om

ial

I

nt

ege

r

This

c

background image

2

30

CHA P

TER

7.

IN P

UT

FILES

A ND

OUTP

U T

STY LE

S

R8=

SI

N(E

XP

background image
background image
background image

C

hapte r

8

Axi

om

Sy

stem

Commands

This

c

ha

p ter

descr

ib

es

sys

t e

m

commands,

the

co

mmand-line

facilities

u s

ed

to

c

on

background image
background image

8

.2.

) ABB

R E

VIA

TIO

N

23

5

8.2

)a b

brevi ati on

Use

r

Lev

e

l

R

equired:

compiler

background image

2

36CH AP

background image

8

.5.) CL

background image

238

background image

8

.7.

) CO

MPILE

23

9

)

l

ear

v

al

ue

al

l

)

l

ear

v

a

ll

This

re

t a

ins

wha

t e

v

er

decla

ra

t io

ns

the

ob

jects

h a

d.

T

o

r

emo

v

e

d e nitions

and

v

a

lues

for

the

sp

eci c

o

b

jects

x

,

y

a

nd

f,

i s

sue

)

l

ear

v

al

ue

x

y

f

)

l

ear

v

x

y

f

T

o

re

m o

v

e

th e

declar

background image

2

40

CH AP

TER

8

.

AXIOM

SYSTEM

COMMAN DS

) o

mp

ile

l eName.a

l

) o

mp

ile

di r

e

Des riptio(mp)51.20.44 0 Tn:ile

background image

8

.38) CO

background image

2

42

CH AP

TER

8

.

AXIOM

SYSTEM

COMMAN DS

-

O

-

Fa

sy

-F

ao

-F

ls

p

-

la

xio

m

-M

no-

AX

L_W

_W

ill

Ob

so

let

e

-DA

xi

om

These

options

mean:



-O:

p

er

f o

rm

all

o

pt imiza

t io

ns,



-Fa

sy

:

gener

ate

a

.

asy

le,



-Fa

o:

g

enera

t e

a

.a

o

le,



-Fl

sp

:

gener

ate

a

.

background image

8

.7.

) CO

MPILEMPILE

background image

2

44

CH AP

TER

8

.

AXIOM

SYSTEM

COMMAN DS

)

om

pi

le

ma

tri

x.

sp

ad

)

edi

t

)

om

pi

le

will

call

the

c

ompiler,

edit,

and

t hen

ca

l l

the

compiler

a

ga

in

o

n

the

le

m

a-

trix.s

pa d.

If

y

o

u

do

no

t

s

p

ecify

a

d ir

e

t

background image

8

.8.

) DISPL

A

Y

24

5

8.8

)displa

y

Use

r

Lev

e

l

R

equired:

i n

t er

preter

Co

m

m

a nd

Syn

tax:

)d

is

pla

y

all

)d

is

pla

y

pro

pe

rti

es

)d

is

pla

y

pro

pe

rti

es

a

ll

)d

is

pla

y

pro

pe

rti

es

[tax:es

[

background image

2

46

CH AP

TER

8

.

AXIOM

SYSTEM

COMMAN DS

background image

8

.10

.

)FIN

24

7

)

sy

ste

m

em

a s

/

et

/r

.

t p

ip

c

alls

e

ma

s

background image

2

48

CH AP

TER

8

.

AXIOM

SYSTEM

COMMAN DS

Some

fra

m es

a

re

crea

ted

b

y

the

Hyp

erDo

c

pro

gr

am

background image
background image

2

50

CH AP

TER

8

.

AXIOM

SYSTEM

COMMAN DS

)

hel

p

le

ar

will

displa

y50)

background image

8

.14

.

)HISTOR

Y

25

1

ha

s

b

een

is

sued.

Issuing

eit her

)

se

t

h

is

to

ry

of

f

)

hi

sto

ry

)

off

will

d is

con

tin

ue

t he

reco

rding

of

infor

m a

tion.

Whether

the

facilit

y

is

disa

b led

or

not,y

background image

2

52

CH AP

TER

8

.

AXIOM

SYSTEM

COMMAN DS

)

res

et

will

us

h

the

in

t er

nal

list

o

f

the

mo

st

r

ecen

t

w

o

rkspa

ce

calcula

t io

ns

so

t ha

t

t he

d a

ta

s

t r

uct ur

es

ma

y

b

e

g

ar

bag

e

co

llect e

d

b

y

the

underly

i ng

Common

Lisp

sy

stem.

Lik

e

)h

ist

or

y

)

h

ang

e,

t his

option

only

has

rea

l

e ect

w

h en

hi s

t o

ry

data

is

b

eing

sa

v

ed

in

a

le.

)

res

to

re

[sav e

d HistoryName

]

co

mp letely

clear

s

the

en

v

iro

n men

t

a

nd

re

store

s

i t

t o

a

s

a

v

ed

s

essio

n ,

if

p

o

ssible.

The

)s

av

e

option

background image

8

.16

.

)LISP

25

3

)l

ib

rar

y

)no

ex

pos

e

Co

m

m

a nd

Des

ripti

on:

This

comma

n d

repla

ces

the

)lo

ad

sys

t em

command

tha

t

w

as

a

v

aila

b le

in

Axiom

r

elea

ses

background image

2

54

CH AP

TER

8

.

AXIOM

SYSTEM

COMMAN DS

Since

th is

co

mmand

is

only

useful

fo

r

ev

alua

t ing

s

in g

le

expre

ssions

,

t he

)

fin

co

mm a

nd

ma

y

background image

8

.19

.

)QUIT

25

5

8.19

)qui t

Use

r

Lev

e

l

R

equired:

i n

t er

preter

Co

m

m

a nd

Syn

tax:

)q

ui

t

)s

et

qu

it

pr

ot

e t

ed

|

un

pr

ote

t

ed

Co

m

m

a nd

Des

ripti

on:

This

comma

n d

background image

2

56

CH AP

TER

8

.

AXIOM

SYSTEM

COMMAN DS

will

rea

d

the

c

on

ten

ts

of

t he

le

m

a trix.

input

in

t o

Axio

m.

T

h e

\

.i nput"

le

extensio

n

is

o

pti o

nal.

This

co

mmand

remem

b

er

s

the

previo

us

le

y

o

u

edited,

rea

d

or

compiled.

If

y

o

u

do

not

sp

ecify

a

le

na

me,

th e

prev

ious

le

will

b

e

rea

d.

The

)

if

the

re

option

c

hec

ks

t o

see

whet her

the

background image

8

.22

background image

2

58

CH AP

TER

8

.

AXIOM

SYSTEM

COMMAN DS

)

sho

w

POL

Y

INT

)

op

era

ti

ons

)

sho

w

Pol

yn

omi

al

I

nte

ge

r

)

sho

w

Pol

yn

omi

al

I

nte

ge

r

)

op

er

ati

on

s

a

re

a

mong

th e

com

rm2 T

background image

8

.25

.

)SYS TE

M

25

9

This

command

is

used

to

cr

ea

t e

shor

t

synon

yrrop9e624i

background image

2

60

CH AP

TER

8

.

AXIOM

SYSTEM

COMMAN DS

W

e

do

no

t

r

background image

8

.26

.

)TRA

CE

26

1

background image
background image

8

.26

.

background image
background image

8

.28

.

)WH A

T

26

background image

2

66

CH AP

TER

8

.

AXIOM

SYSTEM

COMMAN DS

)ap

ro

pos

p

att

ern1

[p

a t

tern2

.. .]

Com

m

and

Des riptio

n:

This

co

m ma

nd

is

used

background image

8

.29

.

MAKE

FILE

26

7267

background image
background image

Bi

bliograph

y

[1]

Jenks

,

R.J.

and

S uto

r,

R .S.

\Axio

m

{

The

S c-1000u33i 0 Td [eS

background image

I

n dex



Mult iplica

t io

n,

39





E

xp

onen

tiatio

n ,

39

+

Ad dition,

39

Nu mer

ical

N eg

atio

n ,

39

Sub tr

action,

39

=

D iv

ision,

3

9

<

less

t ha

n,

39

<

=

les

s

than

o

r

equal,

39

=

>

blo

c

k

exit,

7

8,

80

,

81

>

gr

eater

than,

3

9

>

=

g

rea

ter

tha

n

or

equa

l,

39

~

L

og

i c

al

Neg

ation,

3

9

)abb,

1

80

)abbr

eviation,

18

0,

2

44

)b

o ot,

2

36

,

25

4,

2

60

,

2

64

)cd,

2

36

,

25

3,

258

)clear

,

5

0,

2

388 Td (+)Tj 11.04 0 Td [4)cd,

background image
background image
background image

INDEX

27

3

s

t a

rt-up

pr

o le,

2

22

n,

2

47

r

st,

5

5,

9

8

rst

,

97

r

stD eno

m,

46

r

stN umer

,

4

6

Flexible

A r

ra

ys

,

69

FlexibleAr

ra

y

,

6

7

ex

ib leAr

ra

y

,

1

01

Flo

at,

9

1,

1

69

,

2

01

o

ating

p

o

in

t,

91

fo

n

t ,

21

8

fo

r,

8

5

fo

r

b

y

,

88

fo

r

list,

8

5

fo

r

s

egmen

t,

8

5

F

OR

TRA N,

1

3

F

OR

TRA N

o

utp ut

for

mat,

2

26

a

rr

a

ys,

2

30

br

eak

i ng

in

to

m

ultiple

s

t a

t e

m en

t s

,

2

27

da

t a

t

yp

es,

22

8

in

t eg

ers

vs.

o

ats,

22

8

line

l e

n g

th,

22

7

o

pt imiza

t io

n

lev

el,

22

8

pr

ecisio

n ,

22

9

F

r

action,

18

,

17

4,

17

6,

191

,

2

01

,

2

04

fr

action

pa

rtial,

93

F

r

action(Complex(In

teg

er)),

17

4

F

r

action(In

tege

r),

1

74

fr

actionP

ar

t,

35

fr

ame,

2

09

,

24

7

ex

p

o

sure

and,

2

09

fr

ame

dr

op,

2

48

fr

ame

f1.88 Td (fr)Tj 6f1.88 Tdn6 0 Td (24)Tj 9.96 0 T (48)T73-88.56 12 Td (fr)Tj 6.84 0 Td (ame)Tj 21.12 0 Tla(in)Tj16.68 0 Td (st,)Tj 13.92 0 Td (24)Tj 9.96 0 T (48)T59-92.52 11.88 Td (fr)Tj 6.84 0 Td (ame)Tj 21.12 0 (n (da)Tj 10.44 0 Tdm[(l)-1000(e)]Tj 81.72 0 Ts (r,)Tj 10.08 0 Td (2)Tj 4.92 0 Td (48)Tj -66.12 12 Td (fr)Tj 6.84 0 Td (ame)Tj 21.12 0 (newame,)Tj 16 0 Td (24)Tj 9.96 0 T (48)Tj -13.08 12 Td (fr)Tj 6.84 0 Td (ame)Tj 21.12 0 (nex(mat,)T5 22.2 0 Td (2)Tj 4.92 0 Td (48)Tj -058.8 11.88 Tdun (action,)j -41.92 0 Td (1)Tj 4.92 0 T0 (27)Tj6-41.76 12 Tca(dr)Tj 9.36 0 Tld (gial,)Tj 9.96 0 Td (3)Tj 4.92 0 T0(30)Tj9 12.08 12 Tdiece-al,)Tj 6.84 0 Twis(ame)Tj 81.72 0 Tde ni(action,)j7j 8.04 0 Td (1)Tj 4.92 0 T0 (27)T1Tj 10.Tj 6. 0 TGalev)Tj 81.72 0 Tussiaametege

ra

74

,t,

o

1ar

,48

background image
background image

INDEX

27

5

a

daptiv

e,

14

1

a

xes

colo

r,

1

42

clip

p

o

in

t s

,

14

2

line

colo

r,

1

42

ma

x

p

oin

ts,

14

2

min

p

oin

ts,

14

2

p

oin

t

colo

r,

1

42

p

oin

t

size,

1

42

r

eset

v

i e

wp

o

rt,

1

42

s

creen

reso

lut io

n,

1

42

to

sca

le,

1

42

units

co

lor

,

1

42

v

i e

wp

o

rt

p

os

background image
background image

INDEX

27

7

P

o

stScript,

13

2,

14

1,

1

62

,

background image
background image

Wyszukiwarka

Podobne podstrony:
Axiom Volume 1Tutorial (2005)
2005 Volume 46 2 171 177
dr dobbs journal volume 30 issue 2 number 369 february 2005 een www!osiolek!com LJHWNJQZ7RJVY7VF3ROE
BS EN ISO 1133 2005 Plastics Determination of the melt mass flow rate (MFR) and the melt volume flow
AM1 2005 W1upg
Wytyczne ERC 2 2005
BYT 2005 Pomiar funkcjonalnosci oprogramowania
Wyklad3 2005
SWW epidem AIDS 2005
gemius 2005 zagrozenia
Świecie 14 05 2005
Walproiniany 2005
1 Podstawy diagnostyki w chorobach nerek 2005
N T 2005(fizjoterapia)

więcej podobnych podstron