### In-Line Mathematical Expressions for Input Fields in Mathlets

The text input fields for expressions accept any combination of the following:

• Numbers:
In decimal format, e.g. 5.317
See below for information about decimal number format and locale setting,
• Constants:  pi π=3.1416... e Euler constant 2.7183... infty represents infinity -- commonly used with conditional expressions (see below) to delete part of a graph
• Binary Operations:  x + y addition x - y subtraction x * y multiplication x / y division x ^ y exponentiation (xy)
• Unary Operations:  - x negation (prefix operator) x ! factorial (postfix operator)
• Grouping:  ( ... ) parentheses
• Operator Precedence:
Standard rules of arithmetic operator precedence apply. For example, the expression 2*3^4+5 is equivalent to (2*(3^4))+5 -- exponentiation takes precedence, followed by multiplication, and finally addition. Function notation includes its own parentheses, so grouping is explicit with functions and their precedence is irrelevant. Negation has the same precedence as multiplication. The factorial operator takes higher precedence than exponentiation. Conditional expressions, Boolean relations, and logical connectives take lower precedence than addition.
• Implied Multiplication:  2pi number times constant 2x number times variable 2sin(x) number times function 2(x+y) number times parenthesis group Note: The first factor in the product must be a number (in decimal format). Examples above show what is allowed in the second factor. Expressions attempting to use implied multiplication between identifiers, such as "xy" or "xsin(x)," are incorrect, syntactically.
• Variables:
x, y, z, r, s, t, u, v, n
Availability depends on applet.
• Functions:  sin(x) sine function cos(x) cosine function tan(x) tangent function sec(x) secant function csc(x) cosecant function cot(x) cotangent function arcsin(x) arcsine function arccos(x) arccosine function arctan(x) arctangent function arcsec(x) arcsecant function exp(x) natural exponential function (with base e) ln(x) natural logarithm function (with base e) log(x) common logarithm function (with base 10) abs(x) absolute value function sqrt(x) square root function nrt(n,x) nth root function int(x) greatest integer function (returns greatest integer less than or equal to x) alt(x) sign alternation function (returns 1 if int(x) is even, -1 if int(x) is odd -- can be used to establish alternation of terms in series without using computationally expensive "(-1)^n" expression) max(x, y) maximum of x and y min(x, y) minimum of x and y
• Function Name Aliases:  asin for arcsin acos for arccos atan for arctan
• Defined Functions:
In certain applets, when an expression is entered into one field "f(x)=," the function "f(x)" can be used in other expression fields within that applet.
• Conditional Expression:  x ? y : z returns value y if x>0, z otherwise
• Boolean Relations:  x < y returns value 1.0 if x y returns value 1.0 if x>y, 0.0 otherwise x = y returns value 1.0 if x=y, 0.0 otherwise
• Logical Connectives:  x & y logical AND connective, returns value 1.0 if x>0 and y>0, 0.0 otherwise x | y logical OR connective (inclusive), returns value 1.0 if x>0 or y>0 (or both), 0.0 otherwise ~ x logical NOT operator, returns value 1.0 if not x>0, 0.0 otherwise
• Indicating Syntax Errors:
If the expression parser detects a syntax error (incuding use of a variable which is not available to the particular applet), the applet responds by highlighting the entire text within the input field.
• Number Format and Applet Locale:
The decimal number format is sensitive to the applet's locale, which can be set using HTML parameters. The separator between the integer part and the fraction part may be either a period ("."), as in American English decimal notation (if the locale is en_US), or a comma (","), as in French notation (if the locale is fr_FR). Multiple separators are recognized if they are syntactically correct, as with 12,345.6 in American English notation. However, the parser does not recognize a space as a separator, as with 12 345,6 in French notation; the parser does not generate a syntax error in this case, but only returns the number 12,0, treating the space as the end of the number.