Error, (in evalf/RootOf) there are ambiguous values encoded in RootOf(_Z^2-2, 0) - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Error, (in evalf/RootOf) there are ambiguous values encoded in RootOf(_Z^2-2, 0)

Error, (in evalf/RootOf) there are ambiguous values encoded in RootOf(...)

Error, (in convert/RootOf) there is ambiguity in RootOf(...)

 

Description

Examples

Description

The error occurs when evalf or convert are passed expressions that have ambiguity in regards to specification of roots.

Examples

Example 1

The numerical approximation of 12 used as a root selector is not helpful in distinguishing between the two roots, 12−52, 12+52,  since both roots are a distance of exactly 52 from 12.

> 

e≔RootOf⁡x2−x−1,12

e:=RootOf⁡_Z2−_Z−1,12

(2.1)
> 

evalfe

Error, (in evalf/RootOf) there are ambiguous values encoded in RootOf(_Z^2-_Z-1, 1/2)

 

Solution

Use a different value as the root selector:

 

> 

 e≔RootOfx2−x−1,32

e≔RootOf⁡_Z2−_Z−1,32

(2.2)
> 

 evalfe

1.618033989

(2.3)

 

Example 2

 

> 

r1≔RootOf⁡_Z2−2,0

r1:=RootOf⁡_Z2−2,0

(2.4)
> 

r2≔RootOf⁡_Z2−2,index=1

r2:=RootOf⁡_Z2−2,index=1

(2.5)

The numeric selector, 0, is not sufficient to distinguish whether r1 is the positive or negative root. Therefore, the following gcd computation is ambiguous: if r1 represents the positive root, then the GCD is x−2, but if r1 represents the negative root, then the GCD is 1. Hence an error is raised:

> 

gcdx−r1,x−r2;

Error, (in evalf/RootOf) there are ambiguous values encoded in RootOf(_Z^2-2, 0)

 

Solution

If you use a different selector that is not ambiguous, you can get an answer. Here, we use index=1 and index=2.

 

> 

 r1≔RootOf_Z2−2,index=1

r1≔RootOf⁡_Z2−2,index=1

(2.6)
> 

 r2≔RootOf_Z2−2,index=2

r2≔RootOf⁡_Z2−2,index=2

(2.7)
> 

 gcdx−r1,x−r2;

1

(2.8)

We've specified two distinct roots, and their gcd is  1.

 

Example 3

> 

convert⁡RootOf⁡x2−x−1,12,RootOf,form=index

Error, (in convert/RootOf) there is ambiguity in RootOf(_Z^2-_Z-1, 1/2)

 

Solution

This is the same root selector problem as in example 1.  As was done for that example, by choosing a different numeric selector for the RootOf, the specification is no longer ambiguous:

> 

 convertRootOf⁡x2−x−1,32,RootOf,form=index

RootOf⁡_Z2−_Z−1,index=1

(2.9)

See Also

examples,RootOf

RootOf