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
Expression (mathematics)
(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!
===Computational expression=== {{Main|Expression (computer science)}} In [[computer science]], an ''expression'' is a [[Syntax (programming languages)|syntactic]] entity in a [[programming language]] that may be evaluated to determine its [[value (computer science)|value]]<ref>[[John C. Mitchell|Mitchell, J.]] (2002). Concepts in Programming Languages. Cambridge: Cambridge University Press, ''3.4.1 Statements and Expressions'', p. 26</ref> or fail to terminate, in which case the expression is undefined.<ref>Maurizio Gabbrielli, Simone Martini (2010). Programming Languages - Principles and Paradigms. Springer London, ''6.1 Expressions'', p. 120</ref> It is a combination of one or more [[Constant (programming)|constants]], [[variable (programming)|variable]]s, [[function (programming)|function]]s, and [[operator (programming)|operator]]s that the programming language interprets (according to its particular [[Order of operations|rules of precedence]] and of [[Associative property|association]]) and computes to produce ("to return", in a [[state (computer science)|stateful]] environment) another value. This process, for mathematical expressions, is called ''evaluation''. In simple settings, the [[return type|resulting value]] is usually one of various [[primitive data type|primitive types]], such as [[string (computer science)|string]], [[Boolean expression|Boolean]], or numerical (such as [[integer (computer science)|integer]], [[floating-point number|floating-point]], or [[complex data type|complex]]). In [[computer algebra]], formulas are viewed as expressions that can be evaluated as a Boolean, depending on the values that are given to the variables occurring in the expressions. For example <math>8x-5 \geq 3</math> takes the value ''false'' if {{mvar|x}} is given a value less than 1, and the value ''true'' otherwise. Expressions are often contrasted with [[Statement (computer science)|statements]]—syntactic entities that have no value (an instruction). [[File:Cassidy.1985.015.gif|thumb|400px|Representation of the expression {{math|(8 − 6) × (3 + 1)}} as a [[Lisp (programming language)|Lisp]] tree, from a 1985 Master's Thesis<ref>{{cite thesis | type=Master's thesis | url=https://commons.wikimedia.org/wiki/File:The_feasibility_of_automatic_storage_reclamation_with_concurrent_program_execution_in_a_LISP_environment._(IA_feasibilityofaut00cass).pdf | first=Kevin G. |last=Cassidy | title=The Feasibility of Automatic Storage Reclamation with Concurrent Program Execution in a LISP Environment | institution=Naval Postgraduate School, Monterey/CA | date=Dec 1985 |page=15 |id=ADA165184}}</ref>]] Except for [[number]]s and [[variable (mathematics)|variables]], every mathematical expression may be viewed as the symbol of an operator followed by a [[sequence]] of operands. In computer algebra software, the expressions are usually represented in this way. This representation is very flexible, and many things that seem not to be mathematical expressions at first glance, may be represented and manipulated as such. For example, an equation is an expression with "=" as an operator, a [[Matrix (mathematics)|matrix]] may be represented as an expression with "matrix" as an operator and its rows as operands. See: [[Computer algebra#Expressions|Computer algebra expression]]
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)