The Museum of HP Calculators

HP Forum Archive 21

 [HP-Prime CAS] Bugs and more Bugs ...Message #1 Posted by CompSystems on 28 July 2013, 11:20 a.m. [HP-Prime CAS] Bugs and more Bugs ... =( =[ ={ =0 Report #?? Thanks for your reply Edited: 28 July 2013, 11:28 a.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #2 Posted by From Hong Kong on 29 July 2013, 11:22 a.m.,in response to message #1 by CompSystems Only square matrices can have powers and inverses. This is common sense. I don't see any problem with their re-definition of powers and inverses for non-square matrices. Edited: 29 July 2013, 11:25 a.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #3 Posted by CompSystems on 29 July 2013, 12:00 p.m.,in response to message #2 by From Hong Kong Quote: I don't see any problem with their re-definition of powers and inverses for non-square matrices Poder se puede pero no se debe! sorry google translator It would be a poor tool in the teaching and learning of mathematics, confused, which violates the rules of vector and matrix algebra There is also a command that executes "extra" math features dot to dot (.^) & (./) & (.*) mat1/vector (.^ || .* || ./ ) mat2/vector // is allowed but no, vector * vector, matrix / matrix, vector ^ n, vector / vector etc ... PD see pseudoinverse for non-square matrices http://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_pseudoinverse others BUGs Edited: 1 Aug 2013, 2:30 p.m. after one or more responses were posted

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #4 Posted by Gilles Carpentier on 31 July 2013, 6:25 p.m.,in response to message #3 by CompSystems 1/ I desagree with you about LINSOVE-SOLVE and {} or [] on the 50G The first argmument _must be_ an array of equation and not a list. It's important for parallel processing. We can say that [...] is one object and {..} is a collection of objects. It's the logic of the 50G and it's very convenient, practical and powerfull ```@ Here you solve a "system of equations" : ['4*x+3*y=10','5*x-2*y=1'] ['x' 'y'] SOLVE One solution only : ``` ``` @ Here you solve another "system of equations" : ['4*x^2+3*y=10','5*x-2*y=1'] ['x' 'y'] SOLVE One system with 2 solutions : ``` ``` @ Here you solve 2 systems of equations with the same unknows {['4*x+3*y=10','5*x-2*y=1'] ['4*x^2+3*y=10','5*x-2*y=1']} ['x' 'y'] SOLVE This returns a list of 1 solution for eq1 and 2 solutions for eq2 { {[x=1 y=2]} {[x=1 y=2][x=-23/8 y=-123/16]} } @ Here you solve à list of equation (each equation is independant) {'4*x+3*y=10','5*x-2*y=1'} {'x' 'y'} SOLVE This returns 2 independant solutions ``` 2/ about A.X=B I don't understand why you say that the "error" of the TI for B/A is a good thing and that the 50G does bad. ```X=A^(-1) * B B/A is a shortcut for A^(-1) * B (read the doc, since the 48SX. It'a far more easy that to search 'simult' or equivalent). B [10 1] - = ------ -> [1 2] A [[4 3] [5 -2]] It's very convenient in real life. If you don't like this you can inverse the matrix and multiply [10 1] is a vector and can be used in most case as [[10][1]] (there is a flag if you prefer vertical display for vectors but it's less efficiant on the screen) Why do you put ->V2 ->V3 in red ? These commands allows to create 2D and 3D vectors from reals. They are very usefull 5 6 ->V2 gives [5. 6.] or [7.81 <\ 50.3] with polar presentation in degree ( wich is interesting in physics) ``` The TI display { 1 2 } is very ambigous for me (for a 50G user) because I understand this as : There are 2 solutions 1 and 2, but in fact there is only ONE solution {[1 2]} For the same reason I disagree totaly for your proposition of {x=1, y=2} for the Prime. It's {[x=1 y=2]} or {[1 2]} or [1 2] but I prefer always a list (and {} if no solution) because it's more coherent that a command always return the same type of object and it's more efficiant in programmation if you need to use the result. It's not ugly at all, it's logic The TI returns 'x=1 and y=2' I wonder how you decrypt this in a program in wich you have to solve such things Edited: 1 Aug 2013, 6:04 a.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #5 Posted by Han on 1 Aug 2013, 10:20 a.m.,in response to message #4 by Gilles Carpentier Quote: 2/ about A.X=B I don't understand why you say that the "error" of the TI for B/A is a good thing and that the 50G does bad. [pre] X=A^(-1) * B B/A is a shortcut for A^(-1) * B (read the doc, since the 48SX. It'a far more easy that to search 'simult' or equivalent). B [10 1] - = ------ -> [1 2] A [[4 3] [5 -2]] It's very convenient in real life. If you don't like this you can inverse the matrix and multiply Emphasis mine -- because that is the ONLY way we "divide" matrices. So let's call it what it is. From a mathematical point of view, there is NO such thing as matrix division. As I am sure you know, we do not use "/" or any "division" symbol for matrices because unlike non-zero real numbers, not all matrices have a multiplicative inverse. The older HP48 series may have allowed division as a shortcut, but to display it like division suggests that division is a valid binary operation over matrices -- this is just wrong. I do agree with the other parts of your post regarding the display of solutions for systems of equations.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #6 Posted by Gilles Carpentier on 1 Aug 2013, 11:12 a.m.,in response to message #5 by Han I understand but with this logic - "A"+"B" -> "AB" bug . must be fordidden - RPN 2 2 + -> bug . must be forbidden - And what about { 1 2 3 } 4 * in RPL ? Excerpt of the user guide : "An array B divided by a matrix A solves the system of equations AX=B for X; that is, X = A^–1 B. This operation uses 15-digit internal precision, providing a more precise result than the calculation INV(A)*B. The matrix must be square, and must have the same number of columns as the array has rows (or elements, if the array is a vector)." I like the idea to use only a key for doing this. Edited: 1 Aug 2013, 11:21 a.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #7 Posted by CompSystems on 1 Aug 2013, 12:03 p.m.,in response to message #6 by Gilles Carpentier Perdon bad english - "A"+"B" -> "AB" bug . must be fordidden No is Error, there is no logic in chains (mathematics) that I know - And what about { 1 2 3 } 4 * in RPL ? // valid Parallel objects Operation // valid if V1 = [ 1, 2, 3 ] // vector then V1^4 // not valid for the algebra of vectors, in physics also has no logic if L1 = { "&*^" , [ 1, 2 3 ] } then V1^L1 // " Error: incompatible data types" so simple and formal I (or the majority of teachers in the world) do not share the philosophy of xcas (HP-Prime) to apply to all data parallel operation Yo (ni la mayoría de docentes del mundo) no comparto la filosofia, del xCAS (HP-Prime) en aplicar a todos los datos operación paralela [ 1, 2, 3 ] ^ 4 /=/ [ 1^4, 2 ^4, 3^4 ] // invalid { 1, 2, 3 } ^ 4 == { 1^4, 2 ^4, 3^4 } // valid one thing is a vector, a matrix, and another data list here and in Timbuktu Edited: 1 Aug 2013, 12:29 p.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #8 Posted by Han on 1 Aug 2013, 9:23 p.m.,in response to message #6 by Gilles Carpentier Quote: I understand but with this logic - "A"+"B" -> "AB" bug . must be fordidden - RPN 2 2 + -> bug . must be forbidden - And what about { 1 2 3 } 4 * in RPL ? Excerpt of the user guide : "An array B divided by a matrix A solves the system of equations AX=B for X; that is, X = A^–1 B. This operation uses 15-digit internal precision, providing a more precise result than the calculation INV(A)*B. The matrix must be square, and must have the same number of columns as the array has rows (or elements, if the array is a vector)." I like the idea to use only a key for doing this. There is nothing wrong with "A" + "B" producing "AB" because strings are not mathematical objects. They are abstract objects most relevant in computer programming, not mathematical constructs. 2 2 + (in RPN) is not a bug because it the assumption is that we are using RPN. On the other hand, if we are using algebraic input, then yes, 2 2 + SHOULD produce an error. { 1 2 4 } * 4 in RPL should also work as expected and produce { 4 8 16 }, because the assumption is that we are working with RPL. However, even outside of the notion of RPL, the majority of folks who understand basic mathematics and programming will naturally conclude that the result should be { 4 8 16 }. On the other hand, the ambiguous case would be { 1 2 4 } + 4 -- should this be { 5 6 8 } or should the answer be { 1 2 4 4 } ? Again, none of your examples shows a mathematical (a matrix) object being ambiguously used (as a vector of vectors) in a non-conventional way. The real question that needs to be raised is: What happens when I want to take a square matrix and treat it like a vector of vectors, as the author interprets it, and then use inversion in the same manner of non-square matrices? Do you see the issue, now? Edited: 1 Aug 2013, 9:29 p.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #9 Posted by Thomas Klemm on 1 Aug 2013, 9:38 p.m.,in response to message #8 by Han Quote: There is nothing wrong with "A" + "B" producing "AB" because strings are not mathematical objects. Except that + is not commutative with strings: "AB" is not the same as "BA". So it might be not so clever to overload this operation. The same could be said about using + to add an element to a list: ```{ 1 2 3 } 4 * -> { 4 8 12 } ``` But: ```{ 1 2 3 } 4 + -> { 1 2 3 4 } ``` Never understood this in the HP-48GX. Cheers Thomas

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #10 Posted by CompSystems on 1 Aug 2013, 11:01 p.m.,in response to message #9 by Thomas Klemm HP48/49/50 { 1 2 3 } 4 + -> { 1 2 3 4 } // OK // [+] == Append or augment ( Bad Logic with operator + ) { 1 2 3 } 4 ADD -> { 5, 6, 7 } // OK // [ADD] == Parallel Object Operation HP-Prime CAS { 1 2 3 } + 4 -> { 5, 6, 7 } // Ok and best that logic of HP48/49/50 // New BUG [ 1 2 3 ] + 4 -> [ 1, 2, 7 ] // 2 BUG: first wrong doing parallel processing, second no sense in physics add a scalar to a vector [ 1 2 3 ] .+ 4 -> [ 5, 6, 7 ] // OK // Other [ 1 2 3 ] - 4 -> [ 1, 2, -1 ] // ?? [ 1 2 3 ] .- 4 -> [ 1, 2, -1 ] // ?? Edited: 2 Aug 2013, 7:10 a.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #11 Posted by Gilles Carpentier on 2 Aug 2013, 2:46 a.m.,in response to message #9 by Thomas Klemm Quote: { 1 2 3 } 4 * -> { 4 8 12 } But: { 1 2 3 } 4 + -> { 1 2 3 4 } Never understood this in the HP-48GX. That's what I say in the previous post. ADD and + were switched in a bad way { 1 2 3 } 4 ADD -> {5 6 7} Must be exactly the contrary. Just switch ADD and + behavior and all becomes logic. Not sure but I think that this come frome the 48S legacy in wich paralel list programming is very 'light' (non existant ?) and after it can't be changed for compatibility. Edited: 2 Aug 2013, 8:28 p.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #12 Posted by Han on 2 Aug 2013, 10:26 a.m.,in response to message #9 by Thomas Klemm Quote: Except that + is not commutative with strings: "AB" is not the same as "BA". So it might be not so clever to overload this operation. The same could be said about using + to add an element to a list: ```{ 1 2 3 } 4 * -> { 4 8 12 } ``` But: ```{ 1 2 3 } 4 + -> { 1 2 3 4 } ``` Never understood this in the HP-48GX. Cheers Thomas I see your point. However, we seem to be focusing on the programming aspects of functions and operations. The original issue was on the _mathematical_ issues of overloading an operation (inverse) in such a way as to cause _mathematical_ ambiguity. As for as programming is concerned, whether strings are added non-commutatively or not, or syntax such as using + vs ADD... those are all going to be different based on the language used. There is no universal programming language. So while + and ADD may behave one way (say in RPL), they may behave differently in some other hypothetical architecture / language. The same does not apply to mathematics. When you start treating [ [ 1 2 3 ] [ 4 5 6 ] ] differently from [ [ 1 2 ] [ 3 4 ] ] (the first a vector of vectors and the latter a matrix), you get inconsistencies. How does the user then explicitly force the square matrix to be treated as a vector of vectors so that its "inverse" is [ [ 1 1/2 ] [ 1/3 1/4 ] ] ? Moreover, should that even be an option? To me, the answer is no. Inverses on matrices should only take square matrices as input, and error out otherwise. No one seems to be addressing these basic questions.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #13 Posted by Han on 2 Aug 2013, 10:30 a.m.,in response to message #12 by Han I think, for me, the solution could be as simple as a flag that toggles whether or not mathematical operations should error out or overload in the event that the input is not the expected type/size/etc.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #14 Posted by Gilles Carpentier on 2 Aug 2013, 11:23 a.m.,in response to message #12 by Han Quote: When you start treating [ [ 1 2 3 ] [ 4 5 6 ] ] differently from [ [ 1 2 ] [ 3 4 ] ] (the first a vector of vectors and the latter a matrix), you get inconsistencies. How does the user then explicitly force the square matrix to be treated as a vector of vectors so that its "inverse" is [ [ 1 1/2 ] [ 1/3 1/4 ] ] ? There is no problem both on 50G and Prime : INVERT A SQUARE MATRIX : On 50G (RPL) INV (wich is the 1/x key) or -1 ^ inverse a square matrix Same thing with the Prime (in algebraic syntax) INVERT EACH ELEMENT OF a MATRIX (square or not) On 50G [ [ 1 2 ] [ 3 4 ] ] << INV >> MAP On Prime apply( x->1/x,[ [ 1 2 ] [ 3 4 ] ]) or (does not work with pre-release) [ [ 1 2 ] [ 3 4 ] ] .^(-1) The difference between 50/Prime is : 1/The Prime allows 'vector of vectors' (that could not be a matrix) mixing dimensions 2/ The Prime allows special rules for these objects Edited: 2 Aug 2013, 11:26 a.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #15 Posted by Han on 3 Aug 2013, 4:57 p.m.,in response to message #14 by Gilles Carpentier The concern is not whether the HP Prime (or 50G) has the ability to invert (reciprocal) the elements of a square matrix. The point was that you have to rely on a completely different input syntax, or even use a totally different command. This is what is inconsistent. Look at the original screenshot -- it shows a non-square matrix with an exponent of -1, and the result is a matrix whose elements are reciprocals of elements of the original matrix. This _suggests_ that one _should_ be able to do the SAME with a square matrix using the SAME syntax (power of -1). However, I would bet that one cannot do this using a square matrix. Look at it from another point of view. Suppose someone is working with only vectors of vectors. They use ^-1 to get reciprocals of each element. Everything works so far, until suddenly they try a square matrix ... Calculators should NOT have ambiguous results when inputs look essentially the same (matrix vs vector of vectors).

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #16 Posted by Thomas Klemm on 2 Aug 2013, 12:57 p.m.,in response to message #12 by Han Completely agree with you. But I think we should in general be cautious when overloading functions. These are only two examples to illustrate my point. The whole calculator appears to be rather inconsistent. For instance I still don't get what CONCAT does. But then probably I was never much interested in this model. Quote: Turn the calculator into a customizable testing tool with exam mode configuration that makes only pre-approved functions available. As a student, I would never buy a calculator that can be crippled by my teacher at his will. This feature shows me that this calculator is not intended to be sold to students but to teachers. But of course the students are still forced to pay. Cheers Thomas

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #17 Posted by CompSystems on 1 Aug 2013, 10:22 a.m.,in response to message #4 by Gilles Carpentier >> The TI returns 'x=1 and y=2' I wonder how you decrypt this in a program in wich you have to solve such things expresion to list command TIcalcs: [TI89/NSPIRE] expr>List( x=1 AND y=2 , { x, y } ) [Enter] return [ 1, 2 ] expr>List( x=1 OR x=-1 , x ) [Enter] return { -1, 1 } /! \ If a list has matrix dimension, the calculators [TI89/NSPIRE...] consider it a matrix example [TI89/NSPIRE] {{1,2},{3,4}} == [[1,2],[3,4]] [TI89/NSPIRE] {{1,2},{3,4},5} // Invalid list =( HP Calculators, accept multiple objects within a list =) =], the TIcalcs not =( but a trick to store several object in a list with TI-Calcs, assigning an identifier to each object { M1 = [[1,2],[3,4]], S1 = "x^4=1", G1=G010101... } // valid {[[1,2],[3,4]], "x^4=1", G010101... }// invalid =( >> Why do you put [->V2] [->V3] in red? Perdon [CYLIN],[SPHERE] menus In the HP-Prime as I can see a vector in different coordinate? Ans: In HP50G does not work CYLIN ans SPHERE. Edited: 1 Aug 2013, 3:39 p.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #18 Posted by Han on 29 July 2013, 7:22 p.m.,in response to message #2 by From Hong Kong Quote: Only square matrices can have powers and inverses. This is common sense. I don't see any problem with their re-definition of powers and inverses for non-square matrices. I hope the software engineers disagree with last sentence of this comment and fix the issue as a bug. The first two sentences are precisely why any attempt to invert a non-square matrix should be an error.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #19 Posted by Tim Wessman on 29 July 2013, 8:37 p.m.,in response to message #18 by Han For a matrix, yes, I 100% agree. That is not a matrix though - it is a vector of vectors. I'd be more then happy if someone could convince the author it should be changed. Feel free to make the attempt. Here's the forum to talk to him about it. http://xcas.e.ujf-grenoble.fr/XCAS/ TW Edited: 29 July 2013, 8:42 p.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #20 Posted by Peter Murphy (Livermore) on 29 July 2013, 9:39 p.m.,in response to message #19 by Tim Wessman That looks plausible for French-speaking Forum members; for others, not so much.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #21 Posted by Gilles Carpentier on 30 July 2013, 4:01 a.m.,in response to message #20 by Peter Murphy (Livermore) "That looks plausible for French-speaking Forum members; for others, not so much. " I think you can post in english ;)Edited: 30 July 2013, 5:38 a.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #22 Posted by Manolo Sobrino on 30 July 2013, 8:09 p.m.,in response to message #19 by Tim Wessman That's my real problem with this calculator. An integral part of the product is not in HP's hands, and HP denies responsibility about it... This is just amazing. What's the point in building a device around some code you have no word in? The whole approach is wrong. Say I've spent 100€+ on this calculator and then there is a bug or something should work better. I expect that this behaviour is eventually fixed by HP. But no, I have to hope that a single independent developer really feels like to fix it in his spare time. I'm sorry Tim, this can't be your fault, yet it is amateurish. You know what TI did with the 92, they rewrote Stoutmeyer's algorithms in C for the 68000 (apparently keeping them in lisp was not an option) and some time later they not only bought Derive, but Soft Warehouse (and then they killed it, shame on them). I can run Giac/Xcas for free, why should I buy yet another calculator? At least your company could fork the code and tailor it to your needs, but shipping a console with no real support for a CAS? I have to pass on this one. Some people just love HP no matter what, too much love is blindness.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #23 Posted by Gerson W. Barbosa on 30 July 2013, 9:39 p.m.,in response to message #22 by Manolo Sobrino I completely lost any interest in the Prime when I discovered its CAS doesn't support RPN entry and HP won't do anything about that.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #24 Posted by Tim Wessman on 30 July 2013, 9:44 p.m.,in response to message #23 by Gerson W. Barbosa Nothing was said about never supporting RPN in the CAS. All that was said is that it would take a while to do... TW

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #25 Posted by Gerson W. Barbosa on 30 July 2013, 9:52 p.m.,in response to message #24 by Tim Wessman Quote: All that was said is that it would take a while to do... So much the better! I thought I heard that was going to be difficult since XCAS had stopped supporting it. To me, RPN is the most convenient way to enter complicated algebraic expressions. Gerson.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #26 Posted by Tim Wessman on 30 July 2013, 10:13 p.m.,in response to message #25 by Gerson W. Barbosa Quote:So much the better! I thought I heard that was going to be difficult since XCAS had stopped supporting it. Well, yes. If it hasn't been supported or running there for many years, getting it back running and working will take time and is much more difficult then if it already works! :-) Timing is often a very difficult thing. TW Edited: 30 July 2013, 10:32 p.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #27 Posted by Tim Wessman on 30 July 2013, 10:10 p.m.,in response to message #22 by Manolo Sobrino You are perfectly correct in that one of the downsides of not building everything from scratch is that you sometimes do not get exactly what is wanted because it doesn't exist. You can then take the time to make it yourself and possibly never do it because of

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #28 Posted by Manolo Sobrino on 30 July 2013, 11:38 p.m.,in response to message #27 by Tim Wessman Quote: All that has happened is that a pre-release, unfinished software version of the calculator was leaked by a Chinese company and everyone has been commenting on it. I comment that some things will not be resolved by first release, and that if anyone would like to talk directly with the author of that logic and code it can be done on the author's site. Well, that makes sense. But just referring to the Giac/Xcas forum after acknowledging any CAS bug is puzzling... more so after getting the general idea of how the system works. I was (maybe some were) expecting something like "We are working closely WITH B. Parisse on that" instead of the "go tell Parisse about it" vibe. Maybe it's going to be great when it's finished, I'm sure you have the skill to get it right despite all the constraints. However, "ship early, ship often" was never really meant for hardware IMHO. I don't know, maybe you have to bury Giac/Xcas under a driver program that fixes syntax, allowed types and basically handles it... or else rewrite large sections of it :-(

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #29 Posted by Gilles Carpentier on 31 July 2013, 6:56 p.m.,in response to message #28 by Manolo Sobrino All this thread is a little sureal... I can summarize all the thread in 2 lines 1/ no automatic simplifcation at this time 2/ If you use matrix and vectors as defined in math, the result is what is expected. But you can mix matrix, vectors, list (add, multiply etc.) with no errors at this time and the whole thing operates like lists with his proper logic (but not with a math logic where you can't add a matrix and a vector for example)

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #30 Posted by Richard Berler on 31 July 2013, 9:41 p.m.,in response to message #27 by Tim Wessman Hi Tim, Do you know if the 39gII will be available in the U.S.? This fall? When you say the 39gII's symbolic capability is far beyond the 50g, what might be the most notable examples? Where is it the lesser machine symbolically? Is the 1st edition of Prime ahead of the 50g or 39gII symbolically? Graphingwise, Prime looks to be quite amazing although I understand that the 39gII is outstanding as well. Quite interested in both machines, and hope both will be available soon!

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #31 Posted by Tim Wessman on 31 July 2013, 10:41 p.m.,in response to message #30 by Richard Berler Hello, Definitely made a minor mistake there in that last bit. I've added the phrase "In Prime" to clarify. The whole last paragraph there was in reference to Prime. There is no symbolic capability exposed to the end user in the 39gII. TW Edited: 31 July 2013, 10:43 p.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #32 Posted by BruceH on 30 July 2013, 11:37 p.m.,in response to message #22 by Manolo Sobrino Quote: Say I've spent 100€+ on this calculator and then there is a bug or something should work better. I expect that this behaviour is eventually fixed by HP. "Expect" you say? Consumer law doesn't work that way: either you return it promptly to the shop for a refund or you keep it.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #33 Posted by Manolo Sobrino on 30 July 2013, 11:45 p.m.,in response to message #32 by BruceH There is something called warranty, there's another thing called support, and then there is the brand, so if the company wants to kill itself I will help them by not buying from them again. Hence, I expect.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #34 Posted by Han on 1 Aug 2013, 9:59 a.m.,in response to message #19 by Tim Wessman Quote: For a matrix, yes, I 100% agree. That is not a matrix though - it is a vector of vectors. I'd be more then happy if someone could convince the author it should be changed. Feel free to make the attempt. Here's the forum to talk to him about it. http://xcas.e.ujf-grenoble.fr/XCAS/ TW Calling a non-square matrix a "vector of vectors" does not appropriately address the issue. The issue is that (going off of the screenshot), there is nothing that distinguishes a matrix from a "vector of vectors" -- and mathematically speaking, there should not be any difference. They are mathematically the same. If you want to start distinguishing "vector of vectors" as something different from a matrix, then require the user to use something like: { [ 1 2 ] [ 3 4 ] }. This would be more appropriate so that inverting this list produces the result seen in the screenshot (and the outer delimeter should also use { } in the result). Having only glanced at the XCAS web page, it appears the project is open source (GPL3). Why can we not just change the behavior as needed?

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #35 Posted by Han on 1 Aug 2013, 9:33 p.m.,in response to message #19 by Tim Wessman Quote: For a matrix, yes, I 100% agree. That is not a matrix though - it is a vector of vectors. I'd be more then happy if someone could convince the author it should be changed. Feel free to make the attempt. Here's the forum to talk to him about it. http://xcas.e.ujf-grenoble.fr/XCAS/ TW From a previous post of mine: What happens when I want to take a square matrix and treat it like a vector of vectors, as the author interprets it, and then use inversion in the same manner of non-square matrices? I don't have XCAS installed (don't find it interesting enough).

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #36 Posted by Gilles Carpentier on 2 Aug 2013, 10:46 a.m.,in response to message #35 by Han Quote: What happens when I want to take a square matrix and treat it like a vector of vectors, as the author interprets it, and then use inversion in the same manner of non-square matrices? I don't have XCAS installed (don't find it interesting enough). Not sure to understand your question but, for all commands about matrix : - If it is a square matrix, it works like it has to work with math rules - If it is not a square matrix, it works like a 'vector of vector' with special rules ... A 'vector of vector' could be something 'exotic' like : [[1 2 3] 3 [1 2] 4] wich is (if i understand well !) a vector of 4 vectors of 3D, 1D 2D 1D dimensions. - If you want to treat a square matrix like a 'vector of vector' there is two ways 1/ Use Apply (same that MAP in 50G) apply(x->x^2,[[1,2],[3,4]]) x->x^2 could be a function and there is no limitations here. 2/ For simple operations, Use the .* ./ etc syntax (this does'nt work with the pre-release) [[1,2][3,4]] .^2 The Prime does nothing else it has to do with square matrix, but it uses in this pre-release some "non standard" extension with 'vectors of vectors' (for example the Prime ddcide to apply a .* operator if * is not allowed with the object) The question is if these extensions have a sense or not Edited: 2 Aug 2013, 11:01 a.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #37 Posted by CompSystems on 2 Aug 2013, 11:30 a.m.,in response to message #36 by Gilles Carpentier >> - If it is not a square matrix, it works like a 'vector of vector' with special rules ... A 'vector of vector' could be something 'exotic' like : [[1 2 3] 3 [1 2] 4] wich is (if i understand well !) a vector of 4 vectors of 3D, 1D 2D 1D dimensions. but much better, it would define a new data type, special matrices and vectors so let the matrices and vectors well defined and ready the problem « [1 2 3] 3 [1 2] 4 » // valid a new data type « == CHAR #171 » == CHAR #187 The CAS for the student should be transparent, unambiguous, the student would have to think this is a matrix y no a vector of vectors or n dimensional matrix or pseudo-matrix or pseudo-vector or >> The question is if these extensions (.*) (./) (.+) (.-) (.^) have a sense or not other object If they have sense, not to violate the linear algebra (.*) (./) (.+) (.-) (.^) consider dots commands as functions no operators =) like matLab and TI-derive/TI89/Nspire (.*) == Hadamard function of matrix (*) no dotProduct (*) no crossProduct [HP-Prime CAS++] [ 1 2 3 ] .+ 4 -> [ 5, 6, 7 ] // OK [ 1 2 3 ] + 4 -> "Error data type" // OK [ 1 2 3 ] .- 4 -> [ -3, -2, -1 ] // OK [ 1 2 3 ] - 4 -> "Error data type" // OK [ 1 2 3 ] .^ 4 -> [ 1^4, 2^4, 3^4 ] // OK [ 1 2 3 ] ^ 4 -> "Error data type" // OK M1 := [[ 3, 2, 4 ], [ 2, 0, 2 ]] // OK M1^3 -> "Error data type" // OK M2 := [[ 3, 2, 4 ], [ 2, 0, 2 ], [4, 2, 3]] // OK M2 ^ 2 -> [[ 29, 14, 28 ], [ 14, 8, 14 ] [ 28, 14, 29]] // OK L1 := { 3+4*i, // Dom_Complex 3*x+2*y+4=0, // Dom_Symbolic "3*x+2*y+4=0" , // Dom_String "x: =", // Dom_String [[ 3, 2, 4 ], [ 2, 0, 2 ]], // Dom_matrix =) not List 2, // Dom_Int 2,7182, // Dom_Float [ 1, 2 ], // Dom_Vector, not list { A, Z0, L0, M0, G0 } // Dom_List With A = #, B = complex#, L0 =List, M0 = Matrix, G0 = Graphic } L1 ^ 3 -> "Error data type" // ... L1(1) ^ 3 == (3+4*i) ^ 3 // valid L1(2) ^ 3 == (3*x+2*y+4=0) ^ 3 // valid L1(3) ^ 3 == "3*x+2*y+4=0" ^ 3 // invalid L1(4) ^ 3 == "x: =" ^ 3 // invalid L1(5) ^ 3 == [[ 3, 2, 4 ], [ 2, 0, 2 ]]^3 // invalid L1(6) ^ 3 == 2^3 // valid L1(7) ^ 3 == 2,7182^3 // valid >> [HP-Prime CAS] current L1^3 [Enter] return { BUG LIST } =( // [Request] please do not make sense to apply an operator (*,^,/,+,-) and others commands to all types of objects in the calculator Other BUG [+/-]"HPPrime" [Enter] return "-HPPrime" ??? "HPprimeCAS"-"-" return "HPprimeCAS--" ??? "HPprimeCAS" + "++ > TInspireCAS" return "HPprimeCAS++ > TInspireCAS" // OK HP CAS > TI CAS EXPR("X =" + 3 ) [Enter] return X=3 // OK EXPR("X =" ^ 3 ) [Enter] "Error data type" // OK >> 2/ Use the .* ./ etc syntax (this does'nt work with the pre-release) [[1,2][3,4]] .^ 2 if work with the pre-release firts place [.], then from the character 'window" [Shift]+[Var] insert "^" character and run =) [Request] [Shift-Lock]+[x^y] = '^' no template x^y [Shift-Lock]+[+/-]= '|' evaluate Edited: 2 Aug 2013, 9:49 p.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #38 Posted by Han on 2 Aug 2013, 3:10 p.m.,in response to message #36 by Gilles Carpentier Quote:If it is not a square matrix, it works like a 'vector of vector' with special rules ... A 'vector of vector' could be something 'exotic' like : [[1 2 3] 3 [1 2] 4] wich is (if i understand well !) a vector of 4 vectors of 3D, 1D 2D 1D dimensions. A matrix _IS_ a vector of vectors. And a vector of vectors _IS_ a matrix. Whether the matrix (or vector of vectors) is square is irrelevant. They should be treated one and the same. The only time they could possibly be different is if by vector of vectors we actually mean a list of vectors. In which case, { } should be used as the outer delimiters, and not [ ]. And [ [ 1 2 3 ] 3 [ 1 3 ] 4 ] is NOT a proper vector of vectors. By your reasoning, [ "A" 1 ] should also be a valid vector of vectors since you are using "vector" in an abstract sense here (in the same way a textbook uses a bold x to denote a vector). Of course, the "inverse" of [ "A" 1 ] would be what? [ 1/"A" 1 ]? Nonsense! As a mathematical operation, an inverse should only be applicable to properly formed arguments. Next you'll start to suggest that it's OK to return anything we want when taking the reciprocal or "inverse" of the number 0 since it would just be an "exotic" case of a real number. As for my original question: what if I wanted the calculator to return [ [ 1/a 1/b ] [ 1/c 1/d ] ] when given the square matrix [ [ a b ] [ c d ] ]? Your proposed solution now introduces special cases of "inverses" for vectors of vectors -- requiring a different method of input which should have been uniform for all cases of vectors of vectors. Conclusion: don't mix mathematical convention and ease of programming (by overloading operators) in such a way that introduces ambiguity. Either have a flag that users can enable if they wish to have that "feature" but leave it disabled by default so as to not cause any confusion. A calculator should not just facilitate computations, but if intended as a learning tool, it should provide useful information when we make mistakes (such as trying to take an inverse of a non-square matrix). Edited: 2 Aug 2013, 3:12 p.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #39 Posted by Thomas Klemm on 2 Aug 2013, 5:52 p.m.,in response to message #38 by Han Quote: And [ [ 1 2 3 ] 3 [ 1 3 ] 4 ] is NOT a proper vector of vectors. Consider the following base: ```e1 = [ [ 1 0 0 ] 0 [ 0 0 ] 0 ] e2 = [ [ 0 1 0 ] 0 [ 0 0 ] 0 ] e3 = [ [ 0 0 1 ] 0 [ 0 0 ] 0 ] e4 = [ [ 0 0 0 ] 1 [ 0 0 ] 0 ] e5 = [ [ 0 0 0 ] 0 [ 1 0 ] 0 ] e6 = [ [ 0 0 0 ] 0 [ 0 1 ] 0 ] e7 = [ [ 0 0 0 ] 0 [ 0 0 ] 1 ] ``` So: [ [ 1 2 3 ] 3 [ 1 3 ] 4 ] = e1 + 2e2 + 3e3 + 3e4 + e5 + 3e6 + 4e7. Thus I don't see a problem with that. Of course this vector space is isomorphic to R7. But you may ask yourself: What exactly do we gain by adding these additional brackets? Quote: By your reasoning, [ "A" 1 ] should also be a valid vector of vectors Depends on the field F but it will possibly be difficult to define scalar multiplication: What's k"A" if k is not an integer? And even if we assume for instance F = Z5. Does it make sense to say: 4"AAA" = "AA"? Kind regards Thomas Edited: 2 Aug 2013, 5:58 p.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #40 Posted by Gilles Carpentier on 2 Aug 2013, 6:36 p.m.,in response to message #39 by Thomas Klemm Here, my math level is overflowed :)

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #41 Posted by Thomas Klemm on 2 Aug 2013, 7:40 p.m.,in response to message #40 by Gilles Carpentier Maybe I just didn't explain it well enough. Which part is confusing?

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #42 Posted by Han on 5 Aug 2013, 12:14 a.m.,in response to message #39 by Thomas Klemm Yes, you are correct that it is a vector of vectors in the abstract (as in abstract algebra) sense. I should have clarified that "vector" here was intended to mean the HP Prime or HP 50G syntax of vector (i.e. that which is enclosed by [ ]). Using { [ 1 2 3 ] 3 [ 1 3 ] 4 } is much better in representing a vector of vectors (in the abstract sense). Based on prior HP models, this list syntax is a better means of representing an abstract collection of vectors (mathematical definition of vectors, not the HP interpretation generally surrounded by []'s) because a list can contain any type of object. If you stick with the HP-syntax for vectors, then each vector within the containing vector should be enclosed within []s. That is, [ [ 1 2 3 ] 3 [ 1 3 ] 4 ] should then be written as [ [ 1 2 3 ] [3] [ 1 3 ] [4] ] (and possibly even padding in 0's so that the nested vectors have the same length). Back on the HP48 series, one could type: [ [ 1 2 3 ] 4 5 6 7 8 and press ENTER and the result would be a proper matrix. But it would not look like our example... try it for yourself, and see.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #43 Posted by Gilles Carpentier on 2 Aug 2013, 6:34 p.m.,in response to message #38 by Han Quote: As for my original question: what if I wanted the calculator to return [ [ 1/a 1/b ] [ 1/c 1/d ] ] when given the square matrix [ [ a b ] [ c d ] ]? Edited: 2 Aug 2013, 7:02 p.m.

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #44 Posted by Thomas Klemm on 2 Aug 2013, 7:12 p.m.,in response to message #43 by Gilles Carpentier But [ [ a b ] ]-1 magically falls back to [ [ a b ] ].^(-1). That should lead to an error. Because if you really want to calculate [ [ 1/a 1/b ] ] you can use .^(1). Cheers Thomas

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #45 Posted by Gilles Carpentier on 2 Aug 2013, 7:30 p.m.,in response to message #44 by Thomas Klemm "But [ [ a b ] ]-1 magically falls back to [ [ a b ] ].^(-1). That should lead to an error. Because if you really want to calculate [ [ 1/a 1/b ] ] you can use .^(1).3 I totally agree... I would prefer the behavior you explain

 Re: [HP-Prime CAS] Bugs and more Bugs ...Message #46 Posted by Ángel Martin on 30 July 2013, 2:30 a.m.,in response to message #18 by Han Semantics aside, a vector of vectors is a construct more suited to the computer science realm than to Math. IMHO introducing such ambiguous terms and object types is detrimental to the main goal of a device like the Prime. Let alone the confusion and flat down errors it'll cause amongst poorly-informed audiences, it'll also slide intermediate errors unnoticed to everyone.

Go back to the main exhibit hall