newRPL: Handling of units
|
05-09-2016, 12:41 AM
(This post was last modified: 05-09-2016 12:53 AM by Claudio L..)
Post: #15
|
|||
|
|||
RE: newRPL: Handling of units
(05-08-2016 09:06 PM)emece67 Wrote: Then the final temperature will be: \(T_0+\Delta T = 20 ºC + 2.989 \Delta K =\) Inconsistent units. I can't reproduce this. I put 20_ºC in the stack, 2.989_\(\Delta\)K and I get the expected 22.989_ºC Am I missing something? Update: Just to be sure, I did the whole calculation with the 25000 J, and the units are consistent. Are you sure you didn't use \(\Delta\)ºK or perhaps a small k instead of K? newRPL accepts user defined and undefined units as well. When a unit has no definition, it treats it as a stand-alone base unit, consistent with nothing else, but will otherwise operate on the unit normally. In newRPL you can do: 1_apple 1_orange + and you'll get an inconsistent unit error, until you do for example: 0.5_apple 'orange' UDEFINE Then try again the addition, to get 1.5_apple as expected. This is powerful but has one small drawback: it will carry on *ANY* typo and accept it as a unit, only until you need consistency in addition, or cancellation in a formula you will realize what's happening. In your example, if you had used 25000_j (small j), the formula would've produced units of: \(\Delta\)K*j/J |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)