<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, what is maple doing?</title>
    <link>http://www.mapleprimes.com/questions/38327-What-Is-Maple-Doing</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Sun, 14 Jun 2026 03:27:44 GMT</lastBuildDate>
    <pubDate>Sun, 14 Jun 2026 03:27:44 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, what is maple doing?</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, what is maple doing?</title>
      <link>http://www.mapleprimes.com/questions/38327-What-Is-Maple-Doing</link>
    </image>
    <item>
      <title>Comparing Vectors</title>
      <link>http://www.mapleprimes.com/questions/38327-What-Is-Maple-Doing?ref=Feed:MaplePrimes:what is maple doing?:Comments#answer68786</link>
      <itunes:summary>&lt;p&gt;I think the problem is that, unlike most mathematical objects, Maple can have two identical Vectors in memory, and &amp;quot;=&amp;quot; will not consider them to be the same.&lt;br /&gt;
The recommended way to compare them would be with Equal in the LinearAlgebra package.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;I think the problem is that, unlike most mathematical objects, Maple can have two identical Vectors in memory, and &amp;quot;=&amp;quot; will not consider them to be the same.&lt;br /&gt;
The recommended way to compare them would be with Equal in the LinearAlgebra package.&lt;/p&gt;</description>
      <guid>68786</guid>
      <pubDate>Thu, 20 Nov 2008 20:31:03 Z</pubDate>
      <itunes:author>Robert Israel</itunes:author>
      <author>Robert Israel</author>
    </item>
    <item>
      <title>LinearAlgebra:-Equal</title>
      <link>http://www.mapleprimes.com/questions/38327-What-Is-Maple-Doing?ref=Feed:MaplePrimes:what is maple doing?:Comments#answer68785</link>
      <itunes:summary>&lt;p&gt;Think of x as a pointer to a certain Vector. For the the actual comparison, you will need the Equal command (see ?Equal for more info):&lt;/p&gt;
&lt;p&gt;if Equal(x,Vector(2,[1,0])) then 7 else 3 end if;&lt;/p&gt;
&lt;p&gt;By the way, if you merely want to check if x is of type Vector, then this will do:&lt;/p&gt;
&lt;p&gt;if type(x,Vector) then 7 else 3 end if;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Think of x as a pointer to a certain Vector. For the the actual comparison, you will need the Equal command (see ?Equal for more info):&lt;/p&gt;
&lt;p&gt;if Equal(x,Vector(2,[1,0])) then 7 else 3 end if;&lt;/p&gt;
&lt;p&gt;By the way, if you merely want to check if x is of type Vector, then this will do:&lt;/p&gt;
&lt;p&gt;if type(x,Vector) then 7 else 3 end if;&lt;/p&gt;</description>
      <guid>68785</guid>
      <pubDate>Thu, 20 Nov 2008 20:32:57 Z</pubDate>
      <itunes:author>Thomas Richard</itunes:author>
      <author>Thomas Richard</author>
    </item>
    <item>
      <title>minus vs equal</title>
      <link>http://www.mapleprimes.com/questions/38327-What-Is-Maple-Doing?ref=Feed:MaplePrimes:what is maple doing?:Comments#answer68784</link>
      <itunes:summary>&lt;p&gt;What I find strange is the difference in implementation. While in:&lt;/p&gt;
&lt;pre&gt;
x-Vector(2, [1, 0]);
&lt;/pre&gt;
&lt;p&gt;after the arguments to `-` are checked as vectors, the operation is dispatched to 'LinearAlgebra'/rtable routines (LinearAlgebra:-Multiply, LinearAlgebra:-LA_Main:-VectorAdd, etc), but for&lt;/p&gt;
&lt;pre&gt;
x=Vector(2, [1, 0]);
&lt;/pre&gt;
&lt;p&gt;'LinearAlgebra:-Equal' or something like that is not called.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;What I find strange is the difference in implementation. While in:&lt;/p&gt;
&lt;pre&gt;
x-Vector(2, [1, 0]);
&lt;/pre&gt;
&lt;p&gt;after the arguments to `-` are checked as vectors, the operation is dispatched to 'LinearAlgebra'/rtable routines (LinearAlgebra:-Multiply, LinearAlgebra:-LA_Main:-VectorAdd, etc), but for&lt;/p&gt;
&lt;pre&gt;
x=Vector(2, [1, 0]);
&lt;/pre&gt;
&lt;p&gt;'LinearAlgebra:-Equal' or something like that is not called.&lt;/p&gt;</description>
      <guid>68784</guid>
      <pubDate>Thu, 20 Nov 2008 21:08:48 Z</pubDate>
      <itunes:author>jakubi</itunes:author>
      <author>jakubi</author>
    </item>
    <item>
      <title>another way to look at it</title>
      <link>http://www.mapleprimes.com/questions/38327-What-Is-Maple-Doing?ref=Feed:MaplePrimes:what is maple doing?:Comments#answer68782</link>
      <itunes:summary>&lt;p&gt;Suppose we make the two assignments,&lt;/p&gt;
&lt;pre&gt;
&amp;gt; x := Vector[row]([1,2]);
                                  x := [1, 2]
 
&amp;gt; y := Vector[row]([1,2]);
                                  y := [1, 2]
 
&lt;/pre&gt;
&lt;p&gt;And now we assign to an entry of x,&lt;/p&gt;
&lt;pre&gt;
&amp;gt; x[1]:=17:

&amp;gt; x;
                                    [17, 2]
&lt;/pre&gt;
&lt;p&gt;Most people will usually want that the corresponding entry of y to &lt;b&gt;&lt;i&gt;not&lt;/i&gt;&lt;/b&gt; get assigned by the above assignment to x. So, Maple has two separate and distinct Vectors [1,2] when x and y are created.&lt;/p&gt;
&lt;p&gt;The comparison,&lt;/p&gt;
&lt;pre&gt;
  if foo = bar then
&lt;/pre&gt;
&lt;p&gt;will do a comparison for identity, ie. are they the same object in memory. But as just seen, they are not. They are distinct, so that their respective elements may be changed independently.&lt;/p&gt;
&lt;p&gt;So, what's been noticed is that mutable objects (objects whose elements may be changed or altered) are generally distinct in Maple.&lt;/p&gt;
&lt;p&gt;The routine &lt;b&gt;is()&lt;/b&gt; can do some mathematical inference that &lt;b&gt;evalb(..=..)&lt;/b&gt; does not do. Originally, &lt;b&gt;is()&lt;/b&gt; was a mechanism for query properties, but perhaps it's been becoming mathematically smarter.&amp;nbsp; It's not an unreasonable expectation for &lt;b&gt;is()&lt;/b&gt; to be able to handle this query. But, as it happens, it hasn't (yet) been taught to do that.&lt;/p&gt;
&lt;p&gt;One might ask, why does &lt;b&gt;if foo=bar then..&lt;/b&gt; make the &amp;quot;object identity&amp;quot; query &lt;b&gt;evalb(foo=bar) &lt;/b&gt;rather that the&lt;b&gt; LinearAlgebra:-Equal(foo,bar) &lt;/b&gt;query? Well, it's consistent with how most all other objects are treated in that operation. And if the implementation were reversed then someone would complain about that, and an alterntive syntax would have to be used in order to force the specific identity query on Matrices/Vectors, etc.&lt;/p&gt;
&lt;p&gt;The Maple help system doesn't really make it easy to figure out what the `=` means in &lt;b&gt;if foo=bar then.. &lt;br /&gt;
&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;acer&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Suppose we make the two assignments,&lt;/p&gt;
&lt;pre&gt;
&amp;gt; x := Vector[row]([1,2]);
                                  x := [1, 2]
 
&amp;gt; y := Vector[row]([1,2]);
                                  y := [1, 2]
 
&lt;/pre&gt;
&lt;p&gt;And now we assign to an entry of x,&lt;/p&gt;
&lt;pre&gt;
&amp;gt; x[1]:=17:

&amp;gt; x;
                                    [17, 2]
&lt;/pre&gt;
&lt;p&gt;Most people will usually want that the corresponding entry of y to &lt;b&gt;&lt;i&gt;not&lt;/i&gt;&lt;/b&gt; get assigned by the above assignment to x. So, Maple has two separate and distinct Vectors [1,2] when x and y are created.&lt;/p&gt;
&lt;p&gt;The comparison,&lt;/p&gt;
&lt;pre&gt;
  if foo = bar then
&lt;/pre&gt;
&lt;p&gt;will do a comparison for identity, ie. are they the same object in memory. But as just seen, they are not. They are distinct, so that their respective elements may be changed independently.&lt;/p&gt;
&lt;p&gt;So, what's been noticed is that mutable objects (objects whose elements may be changed or altered) are generally distinct in Maple.&lt;/p&gt;
&lt;p&gt;The routine &lt;b&gt;is()&lt;/b&gt; can do some mathematical inference that &lt;b&gt;evalb(..=..)&lt;/b&gt; does not do. Originally, &lt;b&gt;is()&lt;/b&gt; was a mechanism for query properties, but perhaps it's been becoming mathematically smarter.&amp;nbsp; It's not an unreasonable expectation for &lt;b&gt;is()&lt;/b&gt; to be able to handle this query. But, as it happens, it hasn't (yet) been taught to do that.&lt;/p&gt;
&lt;p&gt;One might ask, why does &lt;b&gt;if foo=bar then..&lt;/b&gt; make the &amp;quot;object identity&amp;quot; query &lt;b&gt;evalb(foo=bar) &lt;/b&gt;rather that the&lt;b&gt; LinearAlgebra:-Equal(foo,bar) &lt;/b&gt;query? Well, it's consistent with how most all other objects are treated in that operation. And if the implementation were reversed then someone would complain about that, and an alterntive syntax would have to be used in order to force the specific identity query on Matrices/Vectors, etc.&lt;/p&gt;
&lt;p&gt;The Maple help system doesn't really make it easy to figure out what the `=` means in &lt;b&gt;if foo=bar then.. &lt;br /&gt;
&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;acer&lt;/p&gt;</description>
      <guid>68782</guid>
      <pubDate>Thu, 20 Nov 2008 21:39:50 Z</pubDate>
      <itunes:author>acer</itunes:author>
      <author>acer</author>
    </item>
    <item>
      <title>if</title>
      <link>http://www.mapleprimes.com/questions/38327-What-Is-Maple-Doing?ref=Feed:MaplePrimes:what is maple doing?:Comments#answer68760</link>
      <itunes:summary>&lt;p&gt;Speaking of possible changes to &lt;b&gt;if&lt;/b&gt;:&lt;/p&gt;
&lt;p&gt;The failure of the construction&lt;/p&gt;
&lt;p&gt;if a &amp;lt; b then ... end if&lt;/p&gt;
&lt;p&gt;when a and b evaluate to real constants that are not of type numeric is a very common cause of grief, and not just to Maple novices.&amp;nbsp; Always checking conditionals using &lt;b&gt;is&lt;/b&gt; instead of &lt;b&gt;evalb&lt;/b&gt; might, I suppose, cause performance to suffer.&amp;nbsp; But using &lt;b&gt;is&lt;/b&gt; when Maple would otherwise return the dreaded&amp;nbsp;&amp;quot;cannot determine if this expression is true or false&amp;quot; error shouldn't affect performance when the &lt;b&gt;is&lt;/b&gt; is not necessary, and I can't see it breaking much existing code. &amp;nbsp; So this is one case that I think it would be useful to change.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Speaking of possible changes to &lt;b&gt;if&lt;/b&gt;:&lt;/p&gt;
&lt;p&gt;The failure of the construction&lt;/p&gt;
&lt;p&gt;if a &amp;lt; b then ... end if&lt;/p&gt;
&lt;p&gt;when a and b evaluate to real constants that are not of type numeric is a very common cause of grief, and not just to Maple novices.&amp;nbsp; Always checking conditionals using &lt;b&gt;is&lt;/b&gt; instead of &lt;b&gt;evalb&lt;/b&gt; might, I suppose, cause performance to suffer.&amp;nbsp; But using &lt;b&gt;is&lt;/b&gt; when Maple would otherwise return the dreaded&amp;nbsp;&amp;quot;cannot determine if this expression is true or false&amp;quot; error shouldn't affect performance when the &lt;b&gt;is&lt;/b&gt; is not necessary, and I can't see it breaking much existing code. &amp;nbsp; So this is one case that I think it would be useful to change.&lt;/p&gt;</description>
      <guid>68760</guid>
      <pubDate>Fri, 21 Nov 2008 14:09:36 Z</pubDate>
      <itunes:author>Robert Israel</itunes:author>
      <author>Robert Israel</author>
    </item>
    <item>
      <title>interesting idea</title>
      <link>http://www.mapleprimes.com/questions/38327-What-Is-Maple-Doing?ref=Feed:MaplePrimes:what is maple doing?:Comments#comment82511</link>
      <itunes:summary>&lt;p&gt;It &lt;i&gt;might&lt;/i&gt; even be possible for that error to be caught (followed by a pass-off to &lt;b&gt;is&lt;/b&gt;) without the usual overhead of a try..catch.&lt;/p&gt;
&lt;p&gt;Thanks for suggesting it (AJ and RI).&lt;/p&gt;
&lt;p&gt;Dave Linder&lt;br /&gt;
Mathematical Software, Maplesoft&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;It &lt;i&gt;might&lt;/i&gt; even be possible for that error to be caught (followed by a pass-off to &lt;b&gt;is&lt;/b&gt;) without the usual overhead of a try..catch.&lt;/p&gt;
&lt;p&gt;Thanks for suggesting it (AJ and RI).&lt;/p&gt;
&lt;p&gt;Dave Linder&lt;br /&gt;
Mathematical Software, Maplesoft&lt;/p&gt;</description>
      <guid>82511</guid>
      <pubDate>Fri, 21 Nov 2008 18:00:38 Z</pubDate>
      <itunes:author>Dave L</itunes:author>
      <author>Dave L</author>
    </item>
  </channel>
</rss>