Bug wrt 'i Index' & Complex

Bug wrt 'i Index' & Complex - Bug wrt 'i Index' & Complex - Messages

#1 Posted: 2/21/2018 11:41:28 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

BugComplex.PNG

2D Parametric Plot [Descartes Loop].sm (37 KiB) downloaded 43 time(s). ... SS 6179
#2 Posted: 2/22/2018 6:12:20 AM
Davide Carpi

Davide Carpi

1415 likes in 2873 posts.

Group: Moderator

Thank you Jean, confirmed. In your example the iterator variable i replaces in the results the imaginary unit.
Have to investigate a little more because as for now I can't replicate it in a simpler case.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Posted: 2/22/2018 8:06:32 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

I think that the missing protection of e, i and pi against re-definition just causes confusion without having any benefit.

However I could not find a feature request for changing this, thus I submitted one.

See SS 3507.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#4 Posted: 2/22/2018 12:50:19 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Thank you Jean, confirmed. In your example the iterator variable i replaces in the results the imaginary unit.
Have to investigate a little more because as for now I can't replicate it in a simpler case


Trust me Davide, on that one, I had to shoveled the clouds for quite a while !
"I can't replicate it in a simpler case"
It does not appear for a single case, it reveals for next and successive use.
Explained from observation in the attached.
All my other use in InverseLaplace are single cases and compatible.

Cheers Davide ... test your sandbox ... Jean

2D Parametric Plot [Descartes Loop].sm (43 KiB) downloaded 32 time(s). ... SS 6179


#5 Posted: 2/22/2018 4:56:08 PM
Davide Carpi

Davide Carpi

1415 likes in 2873 posts.

Group: Moderator

Ok, simplified enough to have a clear test case

The behavior under loops is the same that you can experience on the canvas, when i is used as part of a function or of a dependant variable (a variable that contains undefined variables).

Therefore is not bug about loops, but the general behavior of the program (that might be discussed starting from the BTS filled by Martin in the post above)

imaginary.sm (23 KiB) downloaded 31 time(s).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#6 Posted: 2/23/2018 2:33:50 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

... this bug concerns SS 6179.
Easy to test SS newer than 6179 ... follows the last guidance.
==================================================
The worst cases are in [d2, d3, d4] above.
1. 'i' in d2 is OK ... "imaginary unit" is ignored.
2. set 'i' in [d3, d4] to destroy the project.
==================================================

If you destroy the project by setting 'i' in d3, d4
there is urgent need to repair. Make 'i' imaginary unit
bold, red ... whatever distinguishable. Providing not
so stupid than Maple 'I'.
Mathematica 4.0 'i' is such a glorious horror !

2D Parametric Plot [Descartes Loop].sm (54 KiB) downloaded 33 time(s).
#7 Posted: 2/23/2018 5:02:36 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote



.... Make 'i' imaginary unit
bold, red ... whatever distinguishable. Providing not
so stupid than Maple 'I'.
Mathematica 4.0 'i' is such a glorious horror !



I agree with Jean, that the option to protect i and make it useless for programming could be an error. Guess that a good workaround is using units:

Clipboard05.jpg

Best regards.

Alvaro
#8 Posted: 2/23/2018 9:11:15 AM
frapuano

frapuano

13 likes in 115 posts.

Group: User

Not easy to understand what is happening in all these steps...and all these changes of font for the same name of ...what? ( constant,variable ...)

Franco
#9 Posted: 2/23/2018 9:36:25 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

Guess that a good workaround is using units:

Clipboard05.jpg



That is part of the feature request SS-3507

If you like it, you might vote for it.
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#10 Posted: 2/23/2018 9:57:53 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote


That is part of the feature request SS-3507

If you like it, you might vote for it.



Well, talking about features, I vote for having different styles for the same variable name, like in mathcad:

Clipboard06.jpg

Best regards.

Alvaro.

#11 Posted: 2/23/2018 11:33:00 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

That is part of the feature request SS-3507

If you like it, you might vote for it.



My vote [typical]

Vote.PNG

#12 Posted: 2/23/2018 12:55:27 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

I agree that protection of imaginary unit and euler number should not prevent the user from using e and i as names of variables.

There are two challenges:

1. Clear visual distinction between protected constants and variables of the same name. The basic approach is to just use italic and non-italic black font. I prefer this because this would not require changes for complex result formatting and would be consistent to the general format rules in SMath (built-ins upright, user-defined italic).

2. Unambiguous and simple way to input either constant or variable using the keyboard. If you enter i or e, then this refers to the constants, as long nothing has been defined by the user. Once custom e or i are defined, then the selection could be done using the dynamic assistant. Alternatively, you might generally input the constants i as CTRL-SHIFT-I and e as CTRL-SHIFT-E just like CTRL-SHIFT-P gives pi.

Protecting pi is less important but would not harm and would add to consistant formatting.

Not directly related but being mentioned above in the discussion:

Markup as vector e.g. by underlining or bold face would enable sort of type declaration. This could be used to identify the correct type of multiplication (commutative or non-commutative) in symbolic manipulations.

Here we would have to discuss, if the markup has to be removed if element indices are used (as in paper and pencil handcalc).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
  • New Posts New Posts
  • No New Posts No New Posts