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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Mathcad vs Prime rounding

ppal
17-Peridot

Mathcad vs Prime rounding

In mathcad 15:

The answer is as expected. In Prime there are rounding issues. How do I eliminate this rounding?

PRIME VS MATHCAD.png

ACCEPTED SOLUTION

Accepted Solutions
MJG
18-Opal
18-Opal
(To:ppal)

Change the result formatting to decimal.

Formatting -> Results -> change "General" to "Decimal"

View solution in original post

12 REPLIES 12
Fred_Kohlhepp
23-Emerald I
(To:ppal)

I believe this is an artifact of "zero tolerance" setting; there is always calculation error, and a setting below which small numbers are not displayed.  10^-16 is pretty small!

Pretty small is not good enough. Zero is what we are after. Pretty small leaves a lot of clutter on the work sheet.

LucMeekes
23-Emerald III
(To:ppal)

This occurs due to differences in 'zero threshold' settings between Prime and Mathcad, like Fred indicated.

In Mathcad (no Prime) you can set the 'zero threshold' value to an exponent (of 10) and values that are within that distance from zero are displayed as 0. The range for 'zero threshold' is 0 to 307 and the default is 15, so values between + and - 10^-15 are displayed as 0.

In Prime (express) I can find no control to set a zero threshold, This means that any value different from 0 that can be reprepresented withing the floating point range is shown as is:

Success!
Luc

ppal
17-Peridot
(To:LucMeekes)

Roundpng.png

How do you display this complex part as zero? A^3 is = 1

LucMeekes
23-Emerald III
(To:ppal)

Set the complex threshold. But that too is only available in Mathcad, not in Prime.

Luc

LucMeekes
23-Emerald III
(To:LucMeekes)

maybe this helps:

Success!
Luc

LucMeekes
23-Emerald III
(To:LucMeekes)

I've taken it a little further.

For those that want to do it the hard way and work in Prime, but do need the Zero and Complex threshold facility, here's a format routine that will format just about everything based on two constants.

Success,

Luc

ppal
17-Peridot
(To:LucMeekes)

Wow, that's a lot of work. Appreciate you efforts.

MJG
18-Opal
18-Opal
(To:ppal)

Change the result formatting to decimal.

Formatting -> Results -> change "General" to "Decimal"

Fred_Kohlhepp
23-Emerald I
(To:MJG)

Yeah, but that has it's  own set of problems:

Understood.  Depending on OP's situation, it may or may not be helpful.  But I thought it was worth noting.

If this is a problem for OP, then Luc's "Complex(z)" function above is probably the best work-around.

ppal
17-Peridot
(To:MJG)

Too easy!! - thanks.

Announcements

Top Tags