Post Reply 
Plus42: incorrect behaviour in equation using temperature UOM
05-27-2024, 06:32 PM
Post: #6
RE: Plus42: incorrect behaviour in equation using temperature UOM
Plus42 handles subtraction of temperatures by assuming both inputs are absolute, and returning a relative result, and it handles addition of temperatures by assuming the first (level 2 or Y) is absolute, the second (level 1 or X) is relative, and the result is absolute. You can see this at work by comparing the results of 1_°C 1_°F + and 1_°F 1_°C +.

In the case of the numerical solver trying to deal with returned values with °C or °F units, it has no way to know whether those values represent relative or absolute temperatures, so it looks like the only safe thing to do is introduce the requirement that functions called by the numerical solver must either always return °C or never; and must either always return °F or never, so the conversion issues with those two units can be avoided.

The HP-48 series avoids these ambiguities by not allowing addition and subtraction of temperatures at all, or at least not using the + and - operators, but I chose a more permissive approach in Plus42, based on the idea that users just have to know what they are doing. But users are intelligent while SOLVE is not, so this needs fixing. I'll try to release a fix tomorrow.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Plus42: incorrect behaviour in equation using temperature UOM - Thomas Okken - 05-27-2024 06:32 PM



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