p_mac Posted February 28, 2019 Share Posted February 28, 2019 Parentheses Parentheses are used for groupings exactly as they would be in traditional mathematics. For example, take this equation line: R/(a*2) By putting a*2 in parentheses, it will be evaluated first before being divided by R. The statement as written describes the following (a*2)/R, that incidentally does not need parenthesis as multiplication and division have the same priority and the left to right rule applies. The words in Bold are incorrect. The example R/(a*2) has a*2 calculated first and then divided into R. carl123 and Patrick Connor 1 1 Link to comment Share on other sites More sharing options...
Nana Posted March 1, 2019 Share Posted March 1, 2019 Seriously, I don't think this is necessarily a mistake as even though multiplication and division have the same precedence, one can still use parenthesis to make it clear to the user the order of execution and for readability purposes. This is a very common practice in programming. Link to comment Share on other sites More sharing options...
carl123 Posted March 1, 2019 Share Posted March 1, 2019 13 hours ago, p_mac said: By putting a*2 in parentheses, it will be evaluated first before being divided by R. Agreed, that does not look correct To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time. Link to comment Share on other sites More sharing options...
Staff acapstick Posted March 1, 2019 Staff Share Posted March 1, 2019 Wrong of course - now fixed in docs. Link to comment Share on other sites More sharing options...
Recommended Posts