Skip to main content
1-Visitor
March 9, 2020
Solved

Gallons to Cubic Inches (in^3)

  • March 9, 2020
  • 1 reply
  • 3603 views

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?  

Best answer by LucMeekes

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

1 reply

23-Emerald IV
March 9, 2020

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

tvanrhein1-VisitorAuthor
1-Visitor
March 9, 2020

Is there a way to specify a worksheet to use double precision?  (or some higher precision?)

24-Ruby IV
March 9, 2020

We can do it in Mathcad 11.

Luc, check please!