Close
Close window
evala - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

evala

evaluate in an algebraic number (or function) field

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 .

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

qsqrt2+x1

(3)
>

revalaRema,b,x

rsqrt2+5

(4)
>

evalaabqr

0

(5)

Polynomial multiplication and factorization over Q2,3

>

fsqrt2x+sqrt3sqrt3x+sqrt2

fsqrt2x+sqrt3sqrt3x+sqrt2

(6)
>

evalaNormalf

sqrt2sqrt2sqrt3+2xsqrt3sqrt2sqrt3+3x6

(7)
>

gevalaExpandf

gsqrt3sqrt2x2+sqrt2sqrt3+5x

(8)
>

evalaFactorg

sqrt2sqrt3x+sqrt2sqrt33sqrt2sqrt32+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)
>

nsqrt2+sqrt3sqrt2sqrt3sqrt2+sqrt3sqrt2sqrt3

n2+3232+323

(14)
>

expandn

1

(15)
>

evalaNormu+sqrtu

u2u

(16)
>

evalaPrimfieldsqrt2,sqrt3

RootOf_Z410_Z2+1=sqrt2+sqrt3,sqrt2=RootOf_Z410_Z2+1329RootOf_Z410_Z2+12,sqrt3=11RootOf_Z410_Z2+12RootOf_Z410_Z2+132

(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

>

evalaGcdb,c,independent

1

(22)
>

b1x2RootOfx2x,index=1

b1x2

(23)
>

evalaGcdb1,c

1

(24)
>

b2x2RootOfx2x,index=2

b2x21

(25)
>

evalaGcdb2,c

x1

(26)
>

dx2+x

dx2+x

(27)
>

evalaGcdb,d

x+RootOf_Z2_Z

(28)
>

evalaGcdb,d,independent

1

(29)


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /