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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

How to control precision of explicit, ALL symbolic?

AndrewBond
4-Participant

How to control precision of explicit, ALL symbolic?

I am trying to display the results of a calculation using MathCAD PRIME 8's symbolics feature "explicit, ALL"

 

The results are shown accurate to with 14 decimal places - which is way too precis for my purposes. I have been unable to fina a way to contol the precision of this display - Math Formatting appears to apply only to the final result.

 

I attach two screenshots, one showing what I currently get from MathCAD and the other showing what I want.

 

Does anyone know how to achieve this?

 

Thanks in advance!

 

Andrew

6 REPLIES 6

You may try to add the "float,n" modifier where "n" is the number of significant digits to use. But you have to keep in mind that "float" does not only modifies the display of the result but affects the precision of the whole calculation. So you should use it with care.

AndrewBond
4-Participant
(To:Werner_E)

Thanks for your reply. However, I can't seem to get that to work (see screenshot).

 

float,2 changes the result of the variable in the display but does not seem to change its value going forward to later calcuations. So, NRd in my examples is still 2505.5134072697656 when I expand using explixit, ALL

 

Do you have an example showing how you have used float, 2 and explicit, ALL successfully?

It would always be better to attach a worksheet for us to play with rater than posting just a picture

 

You would have to use the float modifier in every evaluation where you want to see a certain number of significant digits.

Your first expression just evaluates and displays N.Rd but to change the variable you would have to redefine it.

Werner_E_0-1678976571204.png

But if this is what you want, I would rather suggest using the "round" function

Werner_E_1-1678976625081.png

 

Unfortunately it seems that the combination of "float" and "explicit" does not work as desired because "float" seems to overrule "expicit" and just the result is displayed

Werner_E_2-1678976772258.png

So of course you may redefine your variables using "round", but this can have significant impact on the accuracy of all your further calculations which make use of these variables:

Werner_E_3-1678976881857.png

BTW, the inline evaluation (= display of result) after round ist mandatory, otherwise you get

Werner_E_5-1678977007294.png

 

Fazit: There seems to be no easy way to display in low precision the values a variable was calculated with while at the same time preserving the precision of the calculation.

 

 

 

 

 

RantEng
12-Amethyst
(To:Werner_E)

There is a feature request to allow float to work with explicit all.  Be sure to vote for it.

I have a partial workaround.  When you define variables, you can express it with an equal sign after the definition.

RantEng_0-1678993505709.png

Then when you do the symbolics, the final value goes into the solution.

RantEng_1-1678993593975.png

I often use this to clean up the calculations. Notice 50/s not 3000*1/min in the result.  Still, you can be stuck with long values.   This method works for some things, but not all.

 

Bob

 

 

In my opinion its the wrong way to use the third party symbolic engine for that kind of calculation documentation.

There should be a way native to (numeric) Prime to achieve the desired display.

AndrewBond
4-Participant
(To:Werner_E)

Thanks you, Bob and Wener, for your time on this topic.

 

It appears I am not going to be able to display the result as I want without a convoluted reassignment of variables/variable names.

 

It seems to me that the ability to format the display of the explixcit, ALL result is a badly needed feature - one that I'm surprised that PRIME does not aready have (but then again, there are several other features that PRIME is badly missing)

Top Tags