(·) symbol as a synonym of (*)

Messages in english

Modérateur : xcasadmin

compsystems
Messages : 561
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

(·) symbol as a synonym of (*)

Message par compsystems » mar. mai 29, 2018 8:46 pm

Hi BP, there are many examples in the network that use in mathematical expressions, the ASCII character 183 (·) to represent the multiplication operator. So when you take those examples to the worksheet xcas, it is not interpreted as multiplication, and you have to change them one by one.

Please can you add the (·) symbol as a synonym of (*)

Thank you

Code : Tout sélectionner

x² => x^2
x³ => x^3

x+5·x²+7·x·y  => x+5*x²+7*x*y 
x·(1+5·x+7·y) => x*(1+5*z+7*y)

3·a+5·a²+6·a·d+b·d+b²+3·b  => 3*a+5*a²+6*a*d+b*d+b²+3*b
a·(3+5·a+6·d)+b·(d+b+3) => a*(3+5*a+6*d)+b*(d+b+3)  


5·z+z·y+2·z²+3·z·x+6 => 5*z+z*y+2*z²+3*z*x+6  
PD: The classpad calculator interprets · => *

Image

parisse
Messages : 5739
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re:

Message par parisse » mer. mai 30, 2018 3:14 pm

It does not work because · is not an ascii char, it is coded in UTF8 by more than 1 char, and considered by the lexer as a sequence of alphabetic characters. If I enable it in the lexer, it would only work if separated from other alpha chars by spaces. Therefore it's better not to support it at all to avoid mistakes.

compsystems
Messages : 561
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

Re:

Message par compsystems » sam. juin 02, 2018 2:09 pm

other applications give use to characters as ° ¹ ¼ ½ ¾. ≦ ≧ https://xrjunque.nom.es/rootfinder.aspx

Which ones could be incorporated on Xcas?

rad mode cos(45°) => 0.707106781187
x¹ => x
¼*a => a/4
½*a => a/2
¾*a => 3*a/4

Répondre