cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

floating point error

NM_10460738
4-Participant

floating point error

Weird one this...

I get random floating point errors in a quite intense worksheet. If I cut the offending formula and paste it, the error disappears.

The worksheet contains too much information to attach it. I just wondered whether anyone had come across this and whether there is a solution.

 

I've also had problems with some plots in the same worksheet as it says the matrix should have real numbers. I have added the Re() function which seems to deal with this problem most of the time. There are no imaginary numbers in my calculations that I am aware of. I'm reproducing calculations that run happily in Excel.

 

 

4 REPLIES 4

The exact error message is "Unknown error: floating_point_exception"

 

Cut and paste and the error disappears and the results are displayed.

 

I've removed the Re() functions and it is still working - again the detection of imaginary numbers seems to be a temporary glitch rather than anything wrong in the data or formulae.

 

 

When I cut and paste a broken formula, a little orange progress circle rotates for a couple of seconds at the corner of the formula, then the results display.

Its hard to say what the reason for the effects you describe could be. What exactly do you mean when you write about "floating point errors"? Is this the wording of a Prime (I suppose you are using Prime and not Mathcad!?) or do you experience what looks like a wrong result?

EDIT: Just noticed your follow up posts which clarify that its a Prime error message.
When you say that cutting the expression and repasting it again cures the problem, one reason may be that you place it at a slightly different position and so its above or below another region which the is reponsible for the different behaviour.

 

According the plot problem which can be cured by using the Re() function: It often can happen, especially when using more complex and long winding calculations, that, because of round off errors and hard to avoid numerical inaccuracies a result ends up with a very tiny imaginary part (maybe in the range of 10^-10 to 10^-15). With the usual display accuracy which normally is not set to show 15 decimals, you won't see this and the result appears to be a pure real number. Nonetheless the plot considers this a non-real value and will not plot. If all values are of that kind the plot throws the error you describe.

NM_10460738
4-Participant
(To:Werner_E)

I notice when I cut and paste without clicking that the formula goes back in exactly the same position. So that is not the issue.

I did wonder whether long calculations were generating spurious imaginary content. If that is the case, it makes Mathcad Prime a difficult thing to use. It doesn't appear to be consistent, so I am not convinced it is this simple.

Top Tags