Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
I queried Mathcad Prime 3.0 for the number of cubic inches in a gallon and got 231. I wondered to myself if this was an exact conversion so I increased the displayed decimal points to 15 and realized it is not exact. I did some internet research to find where this weird number came from and found that it should be exactly 231 in^3. Is this a mistake in Mathcad or am I missing something?
Solved! Go to Solution.
The numeric part of Mathcad already/always uses 'double precision', you cannot tell it to do less, you cannot tell it to do more.
If you want more precision, you must use the symbolics of Mathcad. But there's a downside: The symbolics don't know about units. And defining one in terms of the other will not help, since 231 is not a third power of an integer. Note that 1 foot is (defined to be exactly) 12 inches. The relation between gallons and inches is not exact, instead there, apparently, is a (defined) relation between gallons and cubic inches, your number 231...You could define 1 inch as the 3rd power root of (1gallon/231), but where does that leave 1 inch as 0.0254 metre?
Conclusion: you'll have to learn to live with finite precision, and abandon using non-international units: just use SI.
Success!
Luc
You are overlooking the point that mathcad internally represents any physical quantity that it knows units for, using SI unit values to represent them.
So the gallon is internally represented in cubic metres, and the inch in metres (being 0.0254).
These decimal numbers cannot be represented to infinite accuracy in binary data. So you get small digitization errors, somewehere at the 15 or 16 significant digit.
Success!
Luc
Is there a way to specify a worksheet to use double precision? (or some higher precision?)
We can do it in Mathcad 11.
Luc, check please!
The numeric part of Mathcad already/always uses 'double precision', you cannot tell it to do less, you cannot tell it to do more.
If you want more precision, you must use the symbolics of Mathcad. But there's a downside: The symbolics don't know about units. And defining one in terms of the other will not help, since 231 is not a third power of an integer. Note that 1 foot is (defined to be exactly) 12 inches. The relation between gallons and inches is not exact, instead there, apparently, is a (defined) relation between gallons and cubic inches, your number 231...You could define 1 inch as the 3rd power root of (1gallon/231), but where does that leave 1 inch as 0.0254 metre?
Conclusion: you'll have to learn to live with finite precision, and abandon using non-international units: just use SI.
Success!
Luc
I feel like error at the 5th decimal place (8th significant digit) is too large to be binary truncation error at double precision, but I don't have time to prove it to myself right now. So you win this round.
Thank you for your help. I appreciate your time and expertise.