Separating arguments of a function: Difference between revisions

From Why start at x, y, z
No edit summary
No edit summary
 
Line 3: Line 3:
For example, \(f(x,y)\) is the application of a function \(f\) to two arguments, \(x\) and \(y\).
For example, \(f(x,y)\) is the application of a function \(f\) to two arguments, \(x\) and \(y\).


When the convention for number notation is to use a comma as the decimal separator, this can lead to an ambiguity when the arguments are numbers.
When the convention for number notation is to use a comma as the decimal separator, this can lead to an ambiguity when the arguments are numbers.<ref>[https://mathstodon.xyz/@christianp/107282002688892264 Toot by Christian Lawson-Perfect], [https://twitter.com/christianp/status/1460282403495284740 Tweet by Christian Lawson-Perfect]</ref>


For example, is \(f(1,2)\) the application of a function of one argument, or two?
For example, is \(f(1,2)\) the application of a function of one argument, or two?

Latest revision as of 13:00, 20 November 2021

In English, a comma normally separates components of a bracketed list, such as the arguments of a function.

For example, \(f(x,y)\) is the application of a function \(f\) to two arguments, \(x\) and \(y\).

When the convention for number notation is to use a comma as the decimal separator, this can lead to an ambiguity when the arguments are numbers.[1]

For example, is \(f(1,2)\) the application of a function of one argument, or two?

Instead, a common convention is to use a semicolon as the item separator.

For example, \(f(1;2)\) is unambiguously a function of two arguments.

Others use spacing to separate items, in addition to a comma, such as \(f(1,\, 2)\). (but Space is significant!)