Welcome Guest! To enable all features please Login. New Registrations are disabled.

Error

 Previous Topic Next Topic
 OchkovVF #1 Posted : 30 April 2023 21:55:23(UTC) Rank: Advanced MemberGroups: Registered, Advanced MemberJoined: 06/04/2023(UTC)Posts: 331Was thanked: 21 time(s) in 21 post(s)
 Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.
 Jean Giraud #2 Posted : 30 April 2023 23:18:37(UTC) Rank: GuestGroups: Registered Joined: 04/07/2015(UTC)Posts: 6,866Was thanked: 981 time(s) in 809 post(s) Mathsoft had this very sentence ... Watch where you thread.
 Kenny Lemens #3 Posted : 01 May 2023 18:04:42(UTC) Rank: Advanced MemberGroups: Registered Joined: 11/01/2018(UTC)Posts: 132Location: WisconsinWas thanked: 58 time(s) in 37 post(s) Greetings,It is important to note that temperature is a variable unit in SMath and not a function as it is in Mathcad.Regardless, the first line is converting 10°C --> 283.15K; and then applying the unary operator of minus (-) to the value; thus: -283.15K; Make sure you apply the unit °C to -10 and not just 10; use the space bar to group your operations correctly.When in doubt: use parenthesis for grouping your operations.May this be of Good Help,- SK Kenny Lemens, P.E. ᵂᴵ "No matter where you go, there you are." -Buckaroo Banzai Hotkeys: https://en.smath.com/for...rce.ashx?a=45771&b=2
 OchkovVF #4 Posted : 01 May 2023 18:41:51(UTC) Rank: Advanced MemberGroups: Registered, Advanced MemberJoined: 06/04/2023(UTC)Posts: 331Was thanked: 21 time(s) in 21 post(s) Originally Posted by: Kenny Lemens Greetings,It is important to note that temperature is a variable unit in SMath and not a function as it is in Mathcad.Regardless, the first line is converting 10°C --> 283.15K; and then applying the unary operator of minus (-) to the value; thus: -283.15K; Make sure you apply the unit °C to -10 and not just 10; use the space bar to group your operations correctly.When in doubt: use parenthesis for grouping your operations.May this be of Good Help,- SK Kenny Lemens, P.E. ᵂᴵ 2+2*2=82+(2*2)=6
 Kenny Lemens #5 Posted : 01 May 2023 18:56:33(UTC) Rank: Advanced MemberGroups: Registered Joined: 11/01/2018(UTC)Posts: 132Location: WisconsinWas thanked: 58 time(s) in 37 post(s) Greetings,Originally Posted by: OchkovVF 2+2*2=8I tried to duplicate this result, but was unsuccessful. However, the following will achieve '8':(2+2)*2=8or 2*(+2)*2=8On the larger issue, I would refer you to the following handbook; it can be downloaded via your Extension Manager (i.e., [Tools] -> [Plugins...] -> [Interactive books]): https://en.smath.com/view/interactivebook/There is a section that reviews the Priority of operators; you will see that units are level 1, whereas unary is level 2: thus the disconnect for negative numbers.Those respective sheets are as follows: Section math operators priority.sm (17kb) downloaded 4 time(s). Section math operators basics.sm (71kb) downloaded 4 time(s).May this be of Good Help,- Kenny Lemens, P.E. ᵂᴵEdited by user 03 May 2023 18:16:02(UTC)  | Reason: Original Post was incomplete; Added greeting, as well as links/resources (changes shown as brown tex "No matter where you go, there you are." -Buckaroo Banzai Hotkeys: https://en.smath.com/for...rce.ashx?a=45771&b=2
 mkraska #6 Posted : 01 May 2023 22:13:13(UTC) Rank: Advanced MemberGroups: Registered Joined: 15/04/2012(UTC)Posts: 1,986Was thanked: 1124 time(s) in 721 post(s) This issue is constantly confusing new users. The evil is in the design decision that the unary minus has the same priority as the binary plus and minus, both are less than multiply and divide. This is counter-intuitive. So you have to use parentesis in SMath where you would not expect to need them with pencil and paper. Changing these priority rules might fix the problem (and perhaps cause other ones). Martin Kraska Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
 Jean Giraud #7 Posted : 02 May 2023 02:17:27(UTC) Rank: GuestGroups: Registered Joined: 04/07/2015(UTC)Posts: 6,866Was thanked: 981 time(s) in 809 post(s) Originally Posted by: mkraska So you have to use parenthesis in SMathGolden rule from numerical priority rule(s)Not unique to this application.
 alyles #8 Posted : 21 June 2023 22:16:28(UTC) Rank: Advanced MemberGroups: Registered Joined: 23/03/2016(UTC)Posts: 276Was thanked: 91 time(s) in 57 post(s) I've gotten in the habit of using this function. This is probably dumb to do, but it forces me to use parenthesis for all temps. temperature.sm (5kb) downloaded 5 time(s).Edited by user 21 June 2023 22:22:08(UTC)  | Reason: Not specified Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
 alyles #9 Posted : 21 June 2023 22:29:58(UTC) Rank: Advanced MemberGroups: Registered Joined: 23/03/2016(UTC)Posts: 276Was thanked: 91 time(s) in 57 post(s) Also this function can be useful when variables are defined in Celsius but need to be used relatively. Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
 Miki_00 #10 Posted : 21 February 2024 01:10:50(UTC) Rank: NewbieGroups: Registered Joined: 21/02/2024(UTC)Posts: 1 Originally Posted by: Kenny Lemens Greetings,It is important to note that temperature is a variable unit in SMath and not a function as it is in Mathcad.Regardless, the first line is converting 10°C --> 283.15K; and then applying the unary operator of minus (-) to the value; thus: -283.15K; Make sure you apply the unit °C to -10 and not just 10; use the space bar to group your operations correctly.When in doubt: use parenthesis for grouping your operations.OkI put my negativ temp like t2=(-43), ant t1=20, all in degCNow I got this in Smath editort1-t2 = 63K it is OKbut t1-t2 = -210,15degCit works like this: t1-t2 = ((20+273) - (-43 + 273) - 273) = -210,15degC THIS IS WRONG. there should not be extra (-273) on the end when you enter degC in the placeholder of expresion for convert from K to degCWhat is rightt1-t2 = 20-(-43) = 63degCt1-t2 = (20+273) - (-43+273) = 63KDifference deltaT/deltat do not depend of scale (for degC and K for sure)so definitely there is a bug in conversion (adlist when conversion is done by manipulating placeholder behind result)
 overlord #11 Posted : 21 February 2024 05:12:54(UTC) Rank: Advanced MemberGroups: Registered Joined: 23/07/2013(UTC)Posts: 1,128Was thanked: 508 time(s) in 338 post(s) Originally Posted by: Miki_00 I put my negativ temp like t2=(-43), ant t1=20, all in degCNow I got this in Smath editort1-t2 = 63K it is OKbut t1-t2 = -210,15degCit works like this: t1-t2 = ((20+273) - (-43 + 273) - 273) = -210,15degC THIS IS WRONG. there should not be extra (-273) on the end when you enter degC in the placeholder of expresion for convert from K to degCWhat is rightt1-t2 = 20-(-43) = 63degCt1-t2 = (20+273) - (-43+273) = 63KDifference deltaT/deltat do not depend of scale (for degC and K for sure)so definitely there is a bug in conversion (adlist when conversion is done by manipulating placeholder behind result)This is not a bug, this is how SMath works.You have to use delta temperatures for that kind of calculations.Unfortunately there is no easier way.If you really need to calculate without delta temperatures,You can use a custom equation/function like this.RegardsEdited by user 21 February 2024 05:17:21(UTC)  | Reason: Not specified
 Users browsing this topic
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.