Post Reply 
Temperature Conversion
01-29-2014, 04:49 PM (This post was last modified: 01-29-2014 04:49 PM by Miguel Toro.)
Post: #13
RE: Temperature Conversion
(01-29-2014 04:31 PM)jgreenb2 Wrote:  
(01-29-2014 02:46 PM)Han Wrote:  Well, I do think that it is fair for the command to expect ()'s where needed. How would you expect the conversion to handle: 5_°F+13_°F▶_°C

Should the addition happen first or should the conversion happen first? In your original case, there is ambiguity in whether the negation should be attached to the Fahrenheit temperature or to the result after the conversion (though perhaps you may not have seen it that way). Your complaint is that the calculator cannot read your mind, and I would say your expectations make for one tall order.

Wow…this is making things a bit more complex than needed. It's just a precedence issue -- '_' has precedence over binary '-' or '+' but it should NOT have precedence over unary '-'. For temperatures things are bit more complex because of the additive constant. See the HP48 User Manual Pg 10-11 for a description of one (IMHO sensible) solution.

But your specific example doesn't make sense to me. The answer to 5_°F+13_°F▶_°C is that it's an error since ▶ is simply a macro for CONVERT and 5_°F+((CONVERT(13_°F,0_°C)) won't parse. This has nothing to do with the expected behavior of

-13_°F▶_°C

As per Tim comment, It may be more about the fact that 5_°F+13_°F will never get performed, so it never get converted:

(5_°F+13_°F)▶_°C ===> CONVERT((5_°F+13_°F),0_°C) ===> Error: Invalid input.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Temperature Conversion - jgreenb2 - 01-28-2014, 06:26 PM
RE: Temperature Conversion - jgreenb2 - 01-29-2014, 11:09 AM
RE: Temperature Conversion - Han - 01-29-2014, 02:46 PM
RE: Temperature Conversion - eried - 01-29-2014, 03:08 PM
RE: Temperature Conversion - Miguel Toro - 01-29-2014, 03:46 PM
RE: Temperature Conversion - Tim Wessman - 01-29-2014, 04:12 PM
RE: Temperature Conversion - Han - 01-29-2014, 04:00 PM
RE: Temperature Conversion - jgreenb2 - 01-29-2014, 04:31 PM
RE: Temperature Conversion - Miguel Toro - 01-29-2014 04:49 PM
RE: Temperature Conversion - Han - 01-29-2014, 05:23 PM
RE: Temperature Conversion - jgreenb2 - 01-29-2014, 07:01 PM
RE: Temperature Conversion - Han - 01-29-2014, 07:37 PM
RE: Temperature Conversion - toml_12953 - 01-29-2014, 01:01 PM
RE: Temperature Conversion - Tugdual - 01-29-2014, 01:14 PM
RE: Temperature Conversion - eried - 01-29-2014, 02:26 PM
RE: Temperature Conversion - Tugdual - 01-29-2014, 09:19 PM
RE: Temperature Conversion - CR Haeger - 01-29-2014, 10:23 PM
RE: Temperature Conversion - John Colvin - 01-30-2014, 12:58 AM
RE: Temperature Conversion - jgreenb2 - 01-30-2014, 02:07 AM



User(s) browsing this thread: 1 Guest(s)