[Dev] Strange error message from cross product

[Dev] Strange error message from cross product - Сообщения

#1 Опубликовано: 20.08.2017 18:12:37
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

Hi,

The expression a*(vectorize(λ* b )†c) displays correctly, if directly written to a math region, also if it is wrapped in Maxima(). Maxima doesn't do a lot here, all is done on the SMath side.

However, if it is used in a definition, then SMath complains about wrong arguments for the cross product.

How can I avoid this?

2017-08-20 22_36_36-SMath Studio 0.98.6398 - [Plugin Maxima Test.sm_].png
Plugin Maxima Test.sm (450 КиБ) скачан 38 раз(а).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#2 Опубликовано: 20.08.2017 21:38:24
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Assuredly, the 1rst expansion is correct in the Smath native vector algebra.
It reminds me Tom G. [Mathsoft Collab] reported Mthacad 11 x product was
different than in previous Mathcad 2000.
#3 Опубликовано: 23.08.2017 07:11:18
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

As for my point of view, the wrong thing is the result given in (vectorize(λ*a))†b; since λ is unknown (and there fore type of λ), vectorize() it should be hold in the formula until will be defined.
Just think if I'd like to use a vector as λ:

2017-08-23 12_09_07-SMath Studio 0.98.6398 - [Documento5_].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#4 Опубликовано: 23.08.2017 07:50:11
Martin Kraska

Martin Kraska

1222 сообщений из 2150 понравились пользователям.

Группа: Moderator

I think the given symbolic engine of SMath assumes scalars for all variables unless they have a non-skalar value. It would be convenient to have some type declaration objects (along with some symbol decoration), but as long as we don't have them, we can't expect symbolic vector equations to be handled correctly.

Section matrix operations symbolic.sm (16 КиБ) скачан 32 раз(а).
2017-08-23 12_46_39-SMath Studio 0.98.6398 - [Section matrix operations symbolic.sm].png
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#5 Опубликовано: 23.08.2017 08:24:02
Davide Carpi

Davide Carpi

1416 сообщений из 2873 понравились пользователям.

Группа: Moderator

Wrote

I think the given symbolic engine of SMath assumes scalars for all variables unless they have a non-skalar value.


Maybe, but here is some side effect of the evaluation operator (=) RHS evaluation logic (just a guess, I have to check it with the debugger).
A normal assignments works as I'd expect:
2017-08-23 13_17_11-SMath Studio - [Page1_].png


Wrote

It would be convenient to have some type declaration objects (along with some symbol decoration), but as long as we don't have them, we can't expect symbolic vector equations to be handled correctly.


I agree with you, maybe a dedicated multiplication operator for matrices (standard multiplication = 1 or both the arguments are assumed as scalars; matrix multiplication = both the arguments are matrices/vectors).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений