Jump to content

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.

 

Share this post


Link to post
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.

Share this post


Link to post
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


Due to the fact that Boris Johnson is now our Prime Minister, punctuation, spelling and grammar will never be worried about ever again.  We now have far bigger problems to be concerned about.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

These are the Terms of Use you will be asked to agree to if you join the forum. | 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.