invalid power - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Error, invalid power

Error, non-algebraic exponent

 

Description

Examples

Description

This error occurs when you attempt to raise an expression to an invalid power, such as a string.  See example 1.

By default, Maple assumes that an invalid power implies that the entire expression, for example, x#  is to be taken atomically as an expression unto itself (an expression that cannot be broken down into its component meanings).

restart

x#

x#

(1.1)

However, if your typesetting settings are instead set to Typesetting:-Settings(autoatomic=false), an error will occur when you execute x#.  See example 2.

 

Tip: If an expression is executed accidentally, it can lead to error messages (if it is not valid Maple syntax). If this happens, toggling the expression to nonexecutable math removes the error message and changes the math to nonexecutable. To change an expression to nonexecutable math use the shortcut key Shift + F5.  For more information, see Executable and Nonexecutable Math.

Examples

Example 1:

A string is not a valid exponent.

xtwo

Error, invalid power

With 1-D math input, the error message is different.

x^"two";

Error, non-algebraic exponent: two

Solution: Use a valid expression for the exponent, such as a name or numerical value.

xa; x2

xa

x2

(2.1)

Example 2:

The following value is identified as an atomic object.

restart

x@

x@

(2.2)

The same value produces an error because autoatomic is set to false.

restart

TypesettingSettingsautoatomic=false:

x@

Error, invalid power

Solution: This automatic behavior can be disabled by setting the Typesetting[Settings] command to true, or via the Typesetting Rule Assistant.

TypesettingSettingsautoatomic=true:

x@

x@

(2.3)

See Also

2Dmath

2DMathDetails

Executable and Nonexecutable Math

Typesetting[Settings]