evala - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Evaluation : evala

evala

evaluate in an algebraic number (or function) field

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

evala(expr)

evala(expr, opts)

Parameters

expr

-

expression or an unevaluated function call

opts

-

(optional) name or a set of names

Description

• 

If expr is an unevaluated function call, such as Gcd(u,v), the function is performed in the smallest algebraic number (or function) field possible. Otherwise, evala(Normal(expr)) is computed.

• 

The following placeholders are accepted by evala and described in the documentation.  For example, to find further help on the Gcd command see evala/Gcd.

AFactor

AFactors

AIrreduc

Algfield

Content

Divide

evala/Norm

Expand

Factor

Factors

Frobenius

Gcd

Gcdex

Indep

Issimilar

Normal

Prem

Primfield

Primpart

Quo

Reduce

Rem

Resultant

Simplify

Sprem

Sqrfree

Subfields

Trace

• 

The algebraic numbers and functions must be represented with the RootOf notation.   For example, the algebraic number 2 is represented by RootOfz22,z and the algebraic function x is represented by RootOfz2y,z.

• 

If the function is Gcd or the underlying process involves gcd computations, a case discussion and combination is attempted in case of reducible RootOfs (see evala/Gcd).

• 

The evala command supports a second argument opts, which is an option or a set of options to be passed to the appropriate function. The help pages for the placeholders describe the options that are currently accepted.

• 

In some cases, evala checks that the RootOfs are independent. If relations are found, an error may occur. The relations are accessible through the variable lasterror. The independence checking is performed if the function is one of the following:

Gcd

Primfield

Primpart

Content

 

Factor

Factors

AFactor

AFactors

Sqrfree

• 

You can instruct evala to skip this independence checking by adding the option 'independent' to the option set opts. However, the result may be incorrect if the option 'independent' is used but the RootOfs are not actually independent.

• 

Information about the execution of the function can be displayed by setting infolevel[evala] to a positive integer. Likewise, assigning a positive integer to infolevel[function], where function is one of the placeholders, causes Maple to print selected information about computations involving function.

Examples

Define aliases for the examples.

aliassqrt2=RootOfx22,sqrt3=RootOfx23,sqrt6=RootOfx26:

evalasqrt22

2

(1)

Compute the quotient q and remainder r of a divided by b such that a=bq+r.

ax2x+3;bxsqrt2

ax2x+3

bxsqrt2

(2)

qevalaQuoa,b,x

qsqrt21+x

(3)

revalaRema,b,x

r5sqrt2

(4)

evalaabqr

0

(5)

Polynomial multiplication and factorization over Q2,3

fsqrt2x+sqrt3sqrt3x+sqrt2

fsqrt2x+sqrt3sqrt3x+sqrt2

(6)

evalaNormalf

16sqrt22x+sqrt2sqrt3sqrt33x+sqrt2sqrt3

(7)

gevalaExpandf

gsqrt3sqrt2x2+5x+sqrt2sqrt3

(8)

evalaFactorg

sqrt2sqrt3x+13sqrt2sqrt312sqrt2sqrt3+x

(9)

An example of dependent algebraic functions

aliassqrtu=RootOfx2u,x,sqrtv=RootOfx2v,x,sqrtuv=RootOfx2uv,x:

asqrtusqrtvsqrtuv

asqrtusqrtvsqrtuv

(10)

evalaNormal1a

sqrtusqrtvsqrtuvu2v2

(11)

Norms of algebraic numbers and algebraic functions

evalaNormsqrt2

2

(12)

evalaNormsqrt2+sqrt3

1

(13)

n2+3232+323

n2+3232+323

(14)

expandn

1

(15)

evalaNormu+sqrtu

u2u

(16)

evalaPrimfieldsqrt2,sqrt3

RootOf_Z410_Z2+1=sqrt2+sqrt3,sqrt2=12RootOf_Z410_Z2+1392RootOf_Z410_Z2+1,sqrt3=112RootOf_Z410_Z2+112RootOf_Z410_Z2+13

(17)

zsqrt2+sqrt3

zsqrt2+sqrt3

(18)

evalaz410z2+1

0

(19)

The following examples demonstrate that the result by using the option 'independent' for actually dependent algebraic functions may not be correct.

bx2RootOfx2x

bx2RootOf_Z2_Z

(20)

cx22x+1

cx22x+1

(21)

evalaGcdb,c

Error, (in evala/Gcd/preproc) reducible RootOf detected. Substitutions are {RootOf(_Z^2-_Z) = 0, RootOf(_Z^2-_Z) = 1}

evalaGcdb,c,'independent'

1

(22)

b1x2RootOfx2x,index=1

b1x2RootOf_Z2_Z,index=1

(23)

evalaGcdb1,c

1

(24)

b2x2RootOfx2x,index=2

b2x2RootOf_Z2_Z,index=2

(25)

evalaGcdb2,c

x1

(26)

dx2+x

dx2+x

(27)

evalaGcdb,d

x+RootOf_Z2_Z

(28)

evalaGcdb,d,'independent'

1

(29)

See Also

Algebraic

alias

convert/RootOf

RootOf

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam