Is sum() has a WYSIWYG bug?

Is sum() has a WYSIWYG bug? - sum() misleading display - Messages

#1 Posted: 5/9/2019 12:27:56 PM
Guy Payeur

Guy Payeur

2 likes in 21 posts.

Group: User

Hello,

I was writing an example of Fourier series when I encounter a misleading display with the sum() function. Here is the setup:
2019-05-09 11_30_56-SMath Studio - [ISERROR QUESTION MARK_B.sm_].png

Look at the attached file for full setup and findings.
ISERROR QUESTION MARK_B.sm (17 KiB) downloaded 43 time(s).

I understand the case, and I don't have a solution for that. I just wanted others to save time finding what is happening here.

One way I discovered this behavior was by trying to select only the right part of the formula, the action always selected this part:
2019-05-09 11_32_22-SMath Studio - [ISERROR QUESTION MARK_B.sm].png

Best regards
Guy
#2 Posted: 5/9/2019 1:07:45 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

S(0)≡S1(0)≡S2(0)≡0 ... No error wrt the 3 different constructions.
Try save under another name, close PC, open new session.
As you report it looks there is shadow in the construction context.

ISERROR QUESTION MARK_B.sm (18 KiB) downloaded 36 time(s).
#3 Posted: 5/9/2019 1:20:11 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

As you report it looks there is shadow in the construction context.


Shadow during the construction context is often encountered wrt SUM.
Fourier integral is more generally understood as a fitting method
for discontinuous functions as exemplified in there.

Jean

Fourier Integral.sm (45 KiB) downloaded 39 time(s).

#4 Posted: 5/10/2019 6:39:09 AM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

It's a quite common problem. One solution software-side is to add automated parenthesis (and we are able to do it, look for example at booleans); enforcing this approach however has as drawback that in quite simple math you might end to have an huge amount of useless or unwanted parenthesis due to the interaction of enforced rules to different operators and functions. It's something quite delicate to handle; don't force them leave the doors open to some mistake, but even the choice to the user to handle them.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
frapuano 5/10/2019 8:19:00 AM
#5 Posted: 5/10/2019 8:41:30 AM
Guy Payeur

Guy Payeur

2 likes in 21 posts.

Group: User

Thank you Jean and Davide. I understand that is difficult to really make everyone happy. Nevertheless, without adding automated parenthesis (personally I prefer to add them myself), certain things could be done. For example, in Excel when you are in a formula, the corresponding parenthesis flashes on the other side of the formula:
2019-05-10 07_17_41-Fourier_Dynamic.xls  -  Compatibility Mode - Excel.png
2019-05-10 07_17_21-Fourier_Dynamic.xls  -  Compatibility Mode - Excel.png
Look after "sum", in Excel, moving the cursor over the first (or the last) parenthesis highlight the other one for a moment.

In sMath, one solution could be to flash a set of parenthesis that is not apparent while your are not editing formulas. So that something like this:
2019-05-10 07_27_13-SMath Studio - [ISERROR QUESTION MARK_B.sm].png

could look like this for a brief moment when you enter in edit mode (similar behavior as in Excel):
2019-05-10 07_28_16-SMath Studio - [ISERROR QUESTION MARK_B.sm].png

The user then see visually (WYSIWYG) how sMath is himself seeing the formula.

Best regards
Guy

#6 Posted: 5/10/2019 8:54:18 AM
Guy Payeur

Guy Payeur

2 likes in 21 posts.

Group: User

There is a behavior that I realized while playing with sMath. When you place the cursor in front of the operator, sMath underlined the operator and all of its operants:
2019-05-10 07_45_56-SMath Studio - [ISERROR QUESTION MARK_B.sm].png

2019-05-10 07_46_25-SMath Studio - [ISERROR QUESTION MARK_B.sm].png

If I were attentive enough, I could of found what was happening a lot faster...

When you are inside a operator, sMath underline only the inside operator:
2019-05-10 07_47_22-SMath Studio - [ISERROR QUESTION MARK_B.sm].png

For the sake of intuitivity, I guest adding the "Excel parenthesis" behavior would of enlightened me

Best regards
Guy
1 users liked this post
sergio 5/10/2019 12:15:00 PM
#7 Posted: 5/10/2019 10:31:12 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

In sMath, one solution could be to flash a set of parenthesis


Oh ! NEVER-ever that, Smath is as it must be, you will soon get used.
No possible mistake, as you open ( it closes as well, then plug-in stuff.
Mathematica 4.0 opens ( and shows were to close in color.
Never used Excel for last 20 years.
Mathcad only opens ( then close anywhere even in the blue.
OriginLab like Mathcad, open ( close were desired

The document I returned: does it work ?
Don't hesitate for any question. Often, doctoring is few clicks.

Cheers ... Jean
#8 Posted: 5/10/2019 12:48:06 PM
Guy Payeur

Guy Payeur

2 likes in 21 posts.

Group: User

Hello Jean,

Yes I did download your file. The file worked fine.

You are right, S(0)=S1(0)=S2(0)=0

2019-05-10 11_44_19-SMath Studio - [ISERROR QUESTION MARK_B.sm_].jpg

Best regards
Guy
  • New Posts New Posts
  • No New Posts No New Posts