A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Why is addition left-associative?

Best Answers

So, addition and subtraction have to have the same precedence. Operators of the same precedence level must have the same associativity. Since subtraction is left associative, so is addition. Probably the argument can be made tighter, but this is how I would motivate making addition left-associative. read more

Finally, addition and multiplication are commutative and associative, so it does not matter in what order they are applied. Claiming that subtraction is left associative may be incomplete, depending on how you define subtraction. read more

In mathematics, addition and multiplication of real numbers is associative. By contrast, in computer science, the addition and multiplication of floating point numbers is not associative, as rounding errors are introduced when dissimilar-sized values are joined together. read more

Encyclopedia Research

Related Question Categories

Image Answers

Roadmap Ch. 1 Classification of languages What make a ...
Source: slideplayer.com