Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Well-defined expression
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Well-defined notation== For real numbers, the product <math>a \times b \times c</math> is unambiguous because <math>(a \times b)\times c = a \times (b \times c)</math>; hence the notation is said to be ''well defined''.<ref name="MathWorld"/> This property, also known as [[associativity]] of multiplication, guarantees the result does not depend on the sequence of multiplications; therefore, a specification of the sequence can be omitted. The [[subtraction]] operation is non-associative; despite that, there is a convention that <math>a-b-c</math> is shorthand for <math>(a-b)-c</math>, thus it is considered "well-defined". On the other hand, [[Division (mathematics)|Division]] is non-associative, and in the case of <math>a/b/c</math>, parenthesization conventions are not well established; therefore, this expression is often considered ill-defined. Unlike with functions, notational ambiguities can be overcome by means of additional definitions (e.g., rules of [[Operator precedence|precedence]], associativity of the operator). For example, in the programming language [[C (programming language)|C]], the operator <code>-</code> for subtraction is ''left-to-right-associative'', which means that <code>a-b-c</code> is defined as <code>(a-b)-c</code>, and the operator <code>=</code> for assignment is ''right-to-left-associative'', which means that <code>a=b=c</code> is defined as <code>a=(b=c)</code>.<ref>{{Cite web|url=https://www.geeksforgeeks.org/operator-precedence-and-associativity-in-c/|title=Operator Precedence and Associativity in C|date=2014-02-07|website=GeeksforGeeks|language=en-US|access-date=2019-10-18}}</ref> In the programming language [[APL (programming language)|APL]] there is only one rule: from [[APL (programming language)#Design|right to left]] β but parentheses first.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)