Compatibility - Maple Help

Compatibility Issues in Maple 9.5

 The following is a brief description of the compatibility issues that affect users upgrading from Maple 9 to Maple 9.5.

record Constructor

 The record constructor has been removed. Use the Record constructor.

Parameter Processing

 Ongoing work to enhance the power of parameter processing in Maple has introduced a compatibility issue related to the use of type names as parameter names in parameter lists.  The problem is best illustrated by an example. A procedure with parameter list $\mathrm{name}::\mathrm{string},d::\mathrm{name}$ now causes an "invalid input" error message if the type of the second argument does not match the string passed as the first argument. To fix this problem, rename the relevant parameter so that it is not the name of a type, for example, $\mathrm{userinput}::\mathrm{string},d::\mathrm{name}$.

Automatic Simplifications

 Continuing the automatic simplification changes in Maple 9, a simplification has been removed. The simplification x-x does not automatically simplify to 0 if the value of x renders this simplification invalid.  If x is an unassigned name, the simplification proceeds.

Iterate Through Entries of a Table or RTable

 The commands seq, add, mul, and for-in style loops, now iterate through the entries of a table, Matrix, Vector, or Array, instead of iterating over the ops. Also, in addition to the add(i, i=A) syntax using an equal sign ("="), the same command can be issued with "in" notation, for example, add(i, i in A).

Example

 > M := Matrix([[1,2],[3,4]]);
 ${M}{≔}\left[\begin{array}{cc}{1}& {2}\\ {3}& {4}\end{array}\right]$ (1)
 > seq(e,e in M);
 ${1}{,}{3}{,}{2}{,}{4}$ (2)

StringTools

 To comply with the naming convention, the NumbOccur command in the StringTools package has been renamed to the more descriptive name, StringTools[CountCharacterOccurrences]. While the long form (StringTools:-NumbOccur) of the old name works in this release, users should update their code to use the new name.

Boolean Evaluation

 In Maple 9.5, the evalb command does not perform arithmetic for inequalities involving <, <=, >, or >=. This avoids, for example, performing the computationally expensive subtraction of the right-hand side from the left-hand side, which generally does not facilitate the return of a true or false value. Most importantly, the subtraction may be mathematically incorrect.

Example

 > evalb( 'rand()' + 1 > 'rand()');  #returned true in Maple 9
 ${\mathrm{rand}}{}\left(\right){<}{\mathrm{rand}}{}\left(\right){+}{1}$ (3)
 > evalb( f(x) + 1 > f(x) );   #returned true in Maple 9
 ${f}{}\left({x}\right){<}{f}{}\left({x}\right){+}{1}$ (4)
 > f := (x) -> x*I;
 ${f}{≔}{x}{↦}{I}{\cdot }{x}$ (5)
 > evalb( f(1) + 1 > f(1) );  #counter example in Maple 9
 ${\mathrm{FAIL}}$ (6)

Example

 The evalb command may now return unevaluated when a relation is true.
 > evalb(Re(x)
 ${\mathrm{\Re }}{}\left({x}\right){<}{1}{+}{\mathrm{\Re }}{}\left({x}\right)$ (7)
 In some cases, you must force the subtraction of the right-hand side from the left-hand side when using <, <=, >, or >=.
 > evalb(Re(x)-Re(x+1)<0);
 ${\mathrm{true}}$ (8)