The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

Advanced User's Manual and solution to the ambiguity of data types [HP-Prime xCAS]
Message #1 Posted by CompSystems on 11 Aug 2013, 10:47 p.m.

Perdon Google Translator

Hello, there are 2 adaptations or ports de xCAS en i-OS

1: [CAS Calc P11] - Scientific Graphing Calculator for Math and Science

2: [PocketCAS]

As yet we have not advanced user guide [HP-PrimeCAS], find documentation on the internet, reading the manuals seee how powerful the xcas, and talk about a multi-list data type using brackets, as well as CAS is a mathematical designed for experts, too complicated for beginners, and I think it will be confusing for the middle and high school student

for example

sets (set) requires a prefix before the bracket set[]

sequences (seq) requires a prefix before of the bracket seq[]

should also have prefixes for vectors and matrices

vector => vec[]

matrix => mat[]   So avoiding the ambiguity in data manipulation, are saying?

User's Manual

http://www.powerapp.ch/CasCalc/P11_en.pdf

http://pocketcas.com/PocketCAS-Manual.pdf

source:

http://www.powerapp.ch/en/support/ticketsystem/view-knowledgebase/8-cas-calc-p11

http://pocketcas.com/

Screenshot

My idea:

sample

set[1,2,3,4] intersect set[5,6,3,4] // Edit paste on "emulator"

lst[1,2,3,4] * lst[5,6,3,4] => { 5, 12, 9, 16 }

mat[1,2,3,4] * mat[5,6,3,4] => "Invalid Dimension"

...

Edited: 14 Aug 2013, 12:26 p.m. after one or more responses were posted

      
Re: [xcas] User's Manual and solution to the ambiguity of data types [HP-Prime]
Message #2 Posted by Joe Horn on 12 Aug 2013, 2:57 a.m.,
in response to message #1 by CompSystems

Would some kindly volunteer please translate CompSystems' postings into clear, discrete points? It would sure help. I get the feeling that he has valid points that deserve attention... but I can't figure out what they are. Thanks in advance.

-Joe-

            
Re: [xcas] User's Manual and solution to the ambiguity of data types [HP-Prime]
Message #3 Posted by deachp on 12 Aug 2013, 12:34 p.m.,
in response to message #2 by Joe Horn

CompSystems meant: **********************************

Hello everybody,

I see there are two xCAS ports for iOS

1: [CAS Calc P11] - Scientific Graphing Calculator for Math and Science

2: [PocketCAS]

And because of there are not [HP-PrimeCAS] Advanced User Guides, then I was looking for more information about xCAS, and found xCAS manuals that show how powerful it is, expecificly about multi-list type limited by brackets[], and then I think if HP Prime CAS was designed to be useful for experts and so complicated for beginners and high school students, maybe will be posible to use prefixes before brackets []:

Sets: it would be required "set" prefix: set[].

Sequences: it would be required "seq" prefix: seq[].

Vectors: it would be required "vec" prefix: vec[].

Matrices: it would be required "mat" prefix: mat[].

It would help to avoiding ambiguity on data manipulation, what do you think? (To make difference between sets, sequences, lists, matrices and vectors)

*****************************************************

Edited: 12 Aug 2013, 12:37 p.m.

      
Re: [xcas] User's Manual and solution to the ambiguity of data types [HP-Prime]
Message #4 Posted by CompSystems on 14 Aug 2013, 10:11 a.m.,
in response to message #1 by CompSystems

Perdon in castillian

Observen la 1er imagen de arriba, segun el xcas

(vector * vector) lo define como producto punto, (poder se puede, aunque sea antipedagógico), ahora si uso el comando

DOT( [ i, 1 ], [ i, 1 ] ) lo hace muy bien => 2 //OK // recuerde que i = v¬ -1, i^2 = -1

pero si uso la notación "facil" es decir para no escribir la palabra super larga DOT, si no el ( * ) como le gusta al autor del xCAS

[ i, 1 ] * [ i, 1 ] // lo hace muy mal => 0 //BUG // tiene que tener en cuenta que es un vector con números complejos y debe realizar la conjugada del vector antes de realizar el producto punto,

[Request] se requiere en programación un comando para detectar si un vector o matriz tiene entradas con números complejos, isComplexArray?(arg) => true/false

hay una incoherencia, primero dice que use ( * ) como reemplazo de DOT, pero no lo aplica, en lugar de facilitar las cosas las complica, yo quiero un CAS riguroso osea como debe ser, para el mundo real el mundo de la aula de clase

Como todo es un mismo tipo de dato, entonces lista * vector debe operarse

{ i, 1 } * [[ i, 1 ]] => [ -1, i ] ??????? // No se que tipo de operación esta realizando, no es producto punto, ni multiplicación elemento a elemento,buscando en los libros modernos de álgebra lineal, de pronto hay algún nuevo producto entre vectores que yo aun lo desconozca

Ahora como una matrix, es un vector y una lista a la ves (sopa de letras)

[[ i, 1 ]] * [[ i, 1 ]] es producto punto de vectores?/ multiplicacion de matrices?/ multiplicacion de listas?, supongo que es matrices por los dobles corchetes, o vector con un vector interno según el manual del CAS, si es un vector de vector debe hacer el producto punto o no, pero no lo hace, retorna vació [[]], es decir, no se que decir,

tengo que interpretar las respuesta, yo ya soy viejo, quiero ver la cara de un estudiante que al multiplicar vea una matriz vacia [ [ ] ]

[[ i, 1 ]] * [[ i, 1 ]] => [[]] significa que las entradas son matrices fila y como no son "compatibles" para el operador ( * ) entonces no hay respuesta o vector de vector vacio [[]], ahora dentro de un programa tengo que hacer un

if ... == [[]] then

"invalid dimension"

else

endif

y así para muchos comandos

es decir tengo que re-escribir o hacer una biblioteca de funciones nuevas para "acomodar" la mala filosofía del xCAS, no es que sea malo, si no que tiene un mal enfoque dentro de la versión para la HP-Prime

la HP-prime tambien es una calculadora ambigua en la utilización de nombres de ls comandos , aveces utiliza nombres con siglas otras veces completos, es el caso de TRN <conjugada> y transspose

[Request] HAY QUE RENOMBRAR muchos nombres de comandos, por ejemplo heredaron muchos malos nombres de la HP50G el comando TRN (transpose conjugate como transConj) hay que utilizar nombres nemotecnicos, recordemos que este producto va hacia el campo educativo

crossp => crossProd, y utilizar cambio de minúscula a Mayúscula en nombres compuestos dentro del catalogo

[Request] el # 2 como suena parecido a (to) entonces en ingles se usa como reemplazo,

mat2list => matToList // pero mejor se usa el # 2 para crear una 2da version de un comando

[Request] permitir asignar a la letra minúscula "i" como lo hace matlab, para que el usuario pueda definir a su gusto el valor de i y no restringirlo a la unidad imaginaria

si el usuario re-asigna 'i' matlab usa una 'i' interna (buena idea)

[Request for emulator]

Como hubo muchas correcciones entre la versión pre-release y la actual, sugiero que las próximas versiones del "emulador" de la HP-Prime sean bajo TRIAL de 1 mes, de lo contrario circularan por la RED versiones "muy malas", ademas que automáticamente detecte nuevas versiones para su actualización

Para diferenciar de una versión a otra recomiendo que en titulo de la ventana, se muestre (CAS V.-.-.-) en lugar de solo CAS

Gracias

y por que no vender una versión de la HP-Prime para i-OS o Android-OS

Edited: 14 Aug 2013, 12:45 p.m.

            
Re: [xcas] User's Manual and solution to the ambiguity of data types [HP-Prime]
Message #5 Posted by CompSystems on 15 Aug 2013, 5:11 p.m.,
in response to message #4 by CompSystems

AlgebraLineal Con CAS Computer Algebra System.pdf

http://jaimeza.org/Mathematic/HewlettPackard/HP_Prime_CAS/AlgebraLinealConCAS_ComputerAlgebraSystem.pdf

                  
Re: [xcas] User's Manual and solution to the ambiguity of data types [HP-Prime]
Message #6 Posted by Han on 20 Aug 2013, 10:45 a.m.,
in response to message #5 by CompSystems

Is there something I don't understand here? Why is DOT(u,u)=2 correct? This seems to be wrong. When I compute the dot product of two row vectors, I get:

DOT(u,u) = [ i 1 ] . [ i 1 ] = i^2 + 1^2 = -1 + 1 = 0

Why are the other systems getting 2? My guess is that 'i' here is not the imaginary number equivalent to sqrt(-1). In engineering, 'i' simply denotes a unit vector (though most textbooks use a bold 'i' or an 'i' with an arrow above it). Under this assumption, the the dot product would be correct as 2. However, if that is the case, then one must ask what the meaning is of the '1' within [i 1] -- because if 'i' is just a unit vector, then the '1' must be yet another unit vector (but without any designation such as 'j' or 'k' !?) This is confusing -- and this confusion makes for a terrible CAS. There needs to be some sort of consistency. Is this documented somewhere?

                        
Re: [xcas] User's Manual and solution to the ambiguity of data types [HP-Prime]
Message #7 Posted by Gilles Carpentier on 20 Aug 2013, 11:52 a.m.,
in response to message #6 by Han

I guess it's because we work here in a complex vectorial space C²

'u' is here a vector with complex scalars

and the way to calculate the dot product is not the same that in real vectorial space R².

For example :

u=[a+b.i , c+d.i]

dot(u,u) = a²+b²+c²+d²

                              
Re: [xcas] User's Manual and solution to the ambiguity of data types [HP-Prime]
Message #8 Posted by Han on 20 Aug 2013, 1:43 p.m.,
in response to message #7 by Gilles Carpentier

I see... thank you for the explanation. It does raise a concern though. Nothing on the HP Prime screen indicates that the operation is over C^2 and not R^2. Nor is there any obvious way to distinguish [ i 1 ] in C^2 from [ i 1 ] from R^2. I would expect some sort of annunciator or flag setting visible on the home screen to help users make the distinction.

            
Re: [xcas] User's Manual and solution to the ambiguity of data types [HP-Prime]
Message #9 Posted by Gilles Carpentier on 16 Aug 2013, 4:41 a.m.,
in response to message #4 by CompSystems

Hello,

what do you mean with the dot product of [i 1] by [i 1] ?

I understand this as a scalar product in a 2D complex vectorial space. It seems to me that scalar product only applies in euclidean space ( dot([1 1] [1 1]) or dot(1+i, 1+i) if you consider C as R²)

I'm not sure that the result '2' of the Prime means something here

What does Nspire with this ? edit : i mean a scalar product of 2 complex vectors

The 50G returns 0 for this but I dont understand what that means

[(0,1) (1,0)] DUP DOT

-> 0

or

['i' 1 ] DUP DOT -> 1+i*i EVAL -> 0

Edited: 16 Aug 2013, 9:00 a.m.

                  
Re: [xcas] User's Manual and solution to the ambiguity of data types [HP-Prime]
Message #10 Posted by CompSystems on 16 Aug 2013, 12:35 p.m.,
in response to message #9 by Gilles Carpentier

TI92/89/NSPIRE

DOT( [ i , 1 ], [ i , 1 ] ) => 2

Dot Product Source

http://books.google.com.co/books?id=FByELohRQd8C&printsec=frontcover&dq=inauthor:%22David+Poole%22&hl=es&sa=X&ei=9l4OUva7IoXb2QWdwIHYDQ&ved=0CDcQ6AEwAQ#v=onepage&q&f=false

HP50G

SIMPLIFY ( DOT( [ i , 1 ], [ i , 1 ] ) => 0 // =( Fortunately I have a HP50G calculator with upgradable ROM, but maybe launch a new ROMs in 201x

->V2( i, 1 ) // "Bad Argument Type" Why?

[HP-Prime request]

please pretty print for [[1,2],[3,4]]([1]) // get row # 1

idea

[[1,2],[3,4]]([NONE, 2]) // get col # 2 ~ MATLAB

thanks

Edited: 16 Aug 2013, 1:19 p.m.

            
Re: [xcas] User's Manual and solution to the ambiguity of data types [HP-Prime]
Message #11 Posted by Han on 20 Aug 2013, 10:35 a.m.,
in response to message #4 by CompSystems

From a mathematical point of view, a set has ALWAYS been denoted with {} for me -- not [] (which denotes a row vector). When you start straying from mathematical convention, then (in my opinion), the calculator starts to lose its purpose -- which is to be a mathematical computing machine.

The big problem I see here is that HP seems to be relying on an outside source for the core of their HP Prime. Perhaps I am simply misinformed, but HP should not just use xcas as is -- they should have their own developers create an in-house fork and build their own CAS that follows mathematical conventions as far as syntax goes. Perhaps they could even add in several mode flags for, say, engineers or any other field where the conventions for certain types of mathematical objects use a slightly different syntax.

                  
Re: [xcas] User's Manual and solution to the ambiguity of data types [HP-Prime]
Message #12 Posted by Gilles Carpentier on 20 Aug 2013, 12:10 p.m.,
in response to message #11 by Han

It's not obvious for me...

As far I remember, vectors are most of time between ()

V=(x;y;z)

or

/ x \ V= | y | \ z /

or

-> V

-> AB

by the way matrice should also be in ()

I agree about set {}

http://fr.wikipedia.org/wiki/Table_des_symboles_math%C3%A9matiques

Edited: 20 Aug 2013, 12:20 p.m.

                  
Re: [xcas] User's Manual and solution to the ambiguity of data types [HP-Prime]
Message #13 Posted by Thomas Klemm on 20 Aug 2013, 12:17 p.m.,
in response to message #11 by Han

Quote:
From a mathematical point of view, a set has ALWAYS been denoted with {} for me -- not [] (which denotes a row vector).

Too bad that Mathematica has a different convention.

Kind regards
Thomas

                        
Re: [xcas] User's Manual and solution to the ambiguity of data types [HP-Prime]
Message #14 Posted by Gilles Carpentier on 20 Aug 2013, 12:36 p.m.,
in response to message #13 by Thomas Klemm

Same for vector which are also between { } in Mathematica

                              
Re: [xcas] User's Manual and solution to the ambiguity of data types [HP-Prime]
Message #15 Posted by Han on 20 Aug 2013, 1:53 p.m.,
in response to message #14 by Gilles Carpentier

With respect to the Mathematica references:

Yes, and this is a shame too (esp. since Mathematica started its development at my Alma mater). I don't want to be pedantic, and as much as I love using Mathematica and appreciate that it is deployed over many institutions and research labs, Mathematica is not (and should not be) the standard for mathematics -- especially syntax.

We are not helping students (if that is indeed the intended target) in any way when our textbooks use one convention while our electronic tools use another convention that conflicts with those in our textbooks and classrooms. And yes, I am aware that vectors are also written as (a,b,c) or <a,b,c> or ai+bj+ck.

                                    
Re: [xcas] User's Manual and solution to the ambiguity of data types [HP-Prime]
Message #16 Posted by Thomas Klemm on 20 Aug 2013, 3:37 p.m.,
in response to message #15 by Han

The syntax of Mathematica has one advantage though: f(a + b) = fa + fb and f[a + b] (i.e. function call) can't be confused. The syntax might contradict the way we write mathematical formulas but at least it is consistent. I'd prefer a calculator with the exact Mathematica syntax to a slightly different one that you won't use after high school.

Cheers
Thomas


[ Return to Index | Top of Index ]

Go back to the main exhibit hall