Inconsistent Evaluate numeric results

jm's picture

The attached .sci file illustrates what seem inconsistent results when I use Evaluate numeric in SWP 6.0.30. Can anybody explain why I get different results in each of these cases and how to get the correct one?

AttachmentSize
Lognormal.sci30.81 KB
John MacKendrick's picture

Looking at the log file shows

Looking at the log file shows that the "2×(0.10288)^2" in the numerator of the final exponent is only sending the initial 2 to the engine. Nothing past the × is getting parsed. It is not immediately clear why this is happening, but if you remove the × sign, the expression does get parsed correctly before being sent to the engine.

The reason the final answer is different is that the MuPAD engine is rounding the numerical expressions differently. Increasing the number of computations used in the display should minimize these differences.

jm's picture

Thanks for getting back to me

Thanks for getting back to me about this issue. As you say, removing the × sign makes a difference. But that this is crucial seems a serious trap for the unwary. Can you change this behavior?

How do I increase the number of computations in the display? But, even without this, it seems strange that, when asked to evaluate an expression of 1 minus an expression that MuPAD evaluates as 6.3778×10^-11, it gives the result of 0.00000. If this were just rounding, shouldn't MuPAD evaluate this as 1.00000?

Can you explain?

John MacKendrick's picture

It is possible to change the

It is possible to change the number of digits used in computations by choosing Tools, Preferences, Computation, Engine, and changing the Digits value. In your case, it does not appear to make a difference. 

It does appear that the correct string is being sent to the MuPAD engine, however. It is not clear why the engine is returning the value it does.

When I enter the second expression from scratch, I get the answer I would expect given the results of the first evaluation. That is, the inclusion of the × symbol does not ordinarily cause any difficulties. 

Do you recall the exact method you used when changing the first expression into the second?

jm's picture

Thanks for getting back to me

Thanks for getting back to me on this. I'm afraid I don't recall exactly what I did. The first expression came from something I was writing in a paper and was obviously wrong. I just copied it over to the file I attached to my post. My guess is that I did not change the first expression to the second but instead simply re-entered the second expression from scratch into the file I attached.

I now have another example but, for some reason, I don't seem able to attach it to my reply. When I click on File attachments and then on Choose file, nothing happens - it does not open a window with a list of files to choose from as it did with my original post. Is there a problem with the forum software? Or is something not working correctly on my MacBook?

John MacKendrick's picture

I have, at least, been able

I have, at least, been able to reproduce instances where a situation like what you described may happen. This will hopefully get remedied shortly.

Chris's picture

I seem to have the same issue

I seem to have the same issue with regards to the file upload. But I am sure it is of no relevant to this forum's file upload feature as I can't even do file upload in gmail. Apparently after the Safari updates not too long ago, this issue start to exist. Currently I have Microsoft Edge on my MacBook Pro and I can upload file from there. So in this case, I confirmed it is Safari issue.

Yes, could be the result of a

Yes, could be the result of a Safari update.  Found this with Google:  https://support.box.com/hc/en-us/articles/360043696274-Cannot-Upload-Folders-With-Safari-Browser

Regarding selecting a file to

Regarding selecting a file to upload:  I don't see a problem.  I tried Chrome on Windows and Safari on Macintosh and can use the Choose File button to open the dialog to select a file to attach.  There is a list of allowed file extensions, but that doesn't seem to be what you are reporting.  

jm's picture

The problem I'm having is

The problem I'm having is that nothing at all happens when I click on the Choose File button. In view of what you write, I guess it must be a problem with my setup (perhaps the result of a recent update to macOS Mojave because it wasn't a problem when I did my first post on this topic).

I can email my second example if that would be helpful. If so, what email address should I use?

You can always send technical

You can always send technical questions to support@mackichan.com.