Jump to content
You must now use your email address to sign in [click for more info] ×

Recommended Posts

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.

 

Link to comment
Share on other sites

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

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

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.