|
From: Robert D. <rob...@gm...> - 2019-10-27 18:57:57
|
Hi, some time ago a bug was reported for vect.mac. The cross product of a vector with itself is supposed to be zero. Now in vect.mac, a vector is represented as a list of three elements, so the question is whether the zero vector result for the cross product should be 0 or [0, 0, 0]. For the original report and some discussion see: https://sourceforge.net/p/maxima/bugs/3287/ The current behavior is that x ~ x (i.e. cross product of x with itself) returns 0, I propose it's changed to x*0 which is going to be a list when x is a list. What does anyone say about that? (Yes, x*0 simplifies to 0 when x is not a list. I agree that's an unsolved problem.) I was thinking at first that the result should be zero since 0 is a perfectly good symbol for the additive identity for vectors. However, [0, 0, 0] is just as good, just a little more verbose, and [0, 0, 0] helps Maxima keep track of what's going on. As it stands, the cross product yields some unexpected results, see the bug report for examples. The general approach of using a list to represent a vector has some unhappy consequences, since Maxima has a lot of ideas about lists and that stuff doesn't always square with what vectors are supposed to do. But short of reworking the vector stuff from the ground up (which, indeed, I have experimented with in the past), I am just trying to fix up the existing vect.mac package. best, Robert Dodier |