Working with units
|
04-05-2017, 04:40 PM
Post: #1
|
|||
|
|||
Working with units
Why can't i add or subtract from values with units?
Ex. I have 8_m on the stack and i want to add one minute. Also i can not add two temperatures even with corresponding units? |
|||
04-05-2017, 04:45 PM
Post: #2
|
|||
|
|||
RE: Working with units
Could it be because _m is meter and _min is minute?
|
|||
04-05-2017, 05:36 PM
Post: #3
|
|||
|
|||
RE: Working with units | |||
04-05-2017, 05:43 PM
Post: #4
|
|||
|
|||
RE: Working with units
Yes, you do. It is all tied up with the Prime concept of a measurement.
Pretend you are the calculator, you see 4_min + 3 What do you do? Should you assume that 3 is minutes and add them? Use a default time unit of fortnights and add that? Give an error saying that you don't have enough info to solve the problem? 1 and 3 are probably the most reasonable, the Prime chooses 3. If you don't want to use units, leave them off. If you want to work with them, they are required. |
|||
04-05-2017, 06:21 PM
Post: #5
|
|||
|
|||
RE: Working with units
(04-05-2017 05:43 PM)KeithB Wrote: Yes, you do. It is all tied up with the Prime concept of a measurement.Ok, it's just that this was never an issue with the 50g. How do i easily remove units from a value if i don't want to continue with units? Also, why won't it add 2 temperatures when they're both including the unit? |
|||
04-05-2017, 06:34 PM
Post: #6
|
|||
|
|||
RE: Working with units
Because it makes no physical sense.
Adding Kelvin temperatures is allowed. |
|||
04-05-2017, 07:35 PM
Post: #7
|
|||
|
|||
RE: Working with units
(04-05-2017 06:21 PM)tdh79 Wrote: Also, why won't it add 2 temperatures when they're both including the unit? This comes up quite often. Here's an example of why adding temperatures does not make too much sense. 1°C + 1°C = 2°C However, if we convert to an absolute scale and do: 1°C + 1°C = 274.15K + 274.15K = 548.3K = 275.15°C Clearly 2°C is not the same as 275.15°C. Almost all physical units have the common minimal value of 0. (For example, 0 degrees is the same as 0 radians, which is also the same as 0 gradians. And 0 meters is the same as 0 inches, or 0 feet, etc.) However, 0°C is not the same as 0°F, and neither are equal to 0K. This is why adding Kelvin temperatures is not a problem (it is an absolute scale with no temperature less than 0) but it will not work for °C or °F. The same can be said for scalar multiplication of a unit. Multiplication by scalars only make sense if there is some fixed notion of "0" -- there is no fixed "0" for the various temperature units. That said, if one of the two temperatures is a change in temperature, then the sum makes sense. But even then, the use of mixed units still requires a lot of care on the part of the user (which can be avoided by converting to Kelvin). Graph 3D | QPI | SolveSys |
|||
04-05-2017, 07:37 PM
Post: #8
|
|||
|
|||
RE: Working with units
(04-05-2017 06:34 PM)KeithB Wrote: Because it makes no physical sense. But I want to add 3 degrees Fahrenheit to 20 degrees Celsius to come up with a total of 18 meters, 4.7 inches. Tom L "If God had wanted us to use the Metric system, Jesus would've had 10 apostles" Tom L Cui bono? |
|||
04-05-2017, 07:58 PM
Post: #9
|
|||
|
|||
RE: Working with units
(04-05-2017 06:21 PM)tdh79 Wrote: Ok, it's just that this was never an issue with the 50g. I think you are remembering wrong. Trying to add 1_m and 1 returns an error. TW Although I work for HP, the views and opinions I post here are my own. |
|||
04-05-2017, 08:09 PM
Post: #10
|
|||
|
|||
RE: Working with units
(04-05-2017 07:58 PM)Tim Wessman Wrote:You're right, adding two values in Celsius however worked fine..(04-05-2017 06:21 PM)tdh79 Wrote: Ok, it's just that this was never an issue with the 50g. But I can see why it doesn't make that much sense by the post by Han. |
|||
04-06-2017, 05:52 AM
Post: #11
|
|||
|
|||
RE: Working with units
Hello,
>> add 1 to 3_m This hits into one of the major issue between math and computer science, human language and computers. Both math and human language are littered with non explicit-ed, contextually shared assumptions/understanding and loosely defined "items" (sometimes, even symbols/words like plus or minus have different meanings than the basic addition/subtraction ones) In the (rare) cases where there is a possible misunderstanding, then we see human using convoluted sentences to explicit their words... Unfortunately, the calculator does not have enough IA to deduce these "non explicit-ed, contextually shared assumptions/understanding" which would allow it to deduce what is meant by a user. It therefore forces you, the user, to explicitly state them, at the cost of extra typing time... One of the best example is users entering in the graphing app: F1(X)=sin(X) F2(X)=dF1(X)/dX and not understanding why it does not work... >> "If God had wanted us to use the Metric system, Jesus would've had 10 apostles" Now, this is such a quintessentially American statement that I had to clean all the coffee from my screen after reading it! Cyrille Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP. |
|||
04-06-2017, 07:09 AM
(This post was last modified: 04-06-2017 07:17 AM by klesl.)
Post: #12
|
|||
|
|||
RE: Working with units
"How do i easily remove units from a value if i don't want to continue with units?"
Well, you can divide the value with units by 1_unit, e.g. 10_m/1_m=10. My personal notice: Being chemist I also don't know how to calculate the example posted above- 4_min + 3. I used units for all values during my exams and calculations. If I forgot unit the teacher marked this mistake with explanation: How do I know what did you mean. |
|||
04-07-2017, 02:25 PM
Post: #13
|
|||
|
|||
RE: Working with units
(04-05-2017 08:09 PM)tdh79 Wrote: You're right, adding two values in Celsius however worked fine.. If you want to expand on Han's answer, there was a deeper discussion of temperature units not too long ago in the following thread: http://www.hpmuseum.org/forum/thread-4783.html |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 9 Guest(s)