Subtracting Degrees Celsius
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Subtracting Degrees Celsius
When subtracting two thermodynamic temperatures, like 3°C from 5°C, I expect to get the result in Kelvins:
5 °C-3 °C→ 2 K
However, Mathcad gives
5 °C-3 °C→ 2•°C
and doesn't handle it any different than a thermodynamic temperature, while it should handle it as temperature difference and therefore in absolute units (which is K) rather than in relative units.
Is there any way around this problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I don't experience that effect. Mathcad gives me exactly the 2 K which you expect and of course I could format the result in Delta °C if I like to do so. Changing the unit to °C would be wrong, of course:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I can replicate the problem in MathCAD Prime 3.1. The behavior you describe would be the correct one. Which version of MathCAD are you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The former was from Mathcad 15, but the same applies to Prime:
Maybe you are doing something wrong when you insert °C ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Nothing wrong with the input. I am just using the symbolic solve „→“. The numeric solve „=“ get's it right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The symbolic solver is not unit-aware. It treats units as unknown variables.
The symbolics see this:
5°C - 3°C -> 2°C
the same as this:
5*x - 3*x -> 2*x
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
indeed. i guess the symbolic solver should be aware of units and dimensions, because they sometimes need special handling.
I can imagine that the °C (°F, °Re, etc.) get converted to K in an preprocessing step. After that it is totally ok to thread them as unknown variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
i guess the symbolic solver should be aware of units and dimensions, because they sometimes need special handling.
Maybe, maybe not. This has been discussed before, and there are arguments on both sides. Symbolic math is the algebraic rearrangement and solution of equations. If it is limited to that, then units are irrelevant. If E=m*c^2, then m=E/c^2, regardless of the units.
Anyway, it it not unit aware. As I said in my other post though, it should not produce a wrong or misleading result. This is what mathcad 15 gives:
Not exactly useful, but at least it's not misleading.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
the symbolic solver should be aware of units and dimensions,
Maybe, but I guess its rather hard to implement this or, for PTC staff, impossible to do. So I would not expect this to see in any version in the near or distant future.
After all, as Richard has shown, is °C not a simple scaling factor like most other units but, because of the necessary shifting, its a function used in postfix notation. At least this (being a function) is shown correctly by Mathcads (15 and below) symbolics but the symbolic output of Prime is simply wrong. So I agree to call it a bug in Prime.
We see this when we follow the symbolic evaluation by a numeric one. Normally this should give a satisfactory result but not in the case of temperatures:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
so the question that remains is how to report this bug in a way, such that the MathCAD developers will take notice?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I already did.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Anyway you can send your issue to PTC's tech support by using "Mathcad Support Center":
http://blogs.ptc.com/2011/09/22/how-to-use-the-brand-new-online-mathcad-support-center/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
because of my academic license, they only give me support for license files and installation. can't report any bugs there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
But in this case °C is not a variable, it is a function, and the answer is wrong.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I can reproduce this in Mathcad Prime when using symbolic evaluation. The symbolic processor does not understand units, so you should use only numeric evaluation. However, it should not show a wrong answer, so I consider this to be a bug.
