- [Missing Values in Expressions](language/expressions/missing-values.md)
- [Grouping Operators](language/expressions/grouping.md)
- [Arithmetic Operators](language/expressions/arithmetic.md)
+ - [Logical Operators](language/expressions/logical.md)
+ - [Relational Operators](language/expressions/relational.md)
+ - [Functions](language/expressions/functions/index.md)
+ - [Mathemtical Functions](language/expressions/functions/mathematical.md)
# Developer Documentation
--- /dev/null
+# Functions
+
+PSPP functions provide mathematical abilities above and beyond those
+possible using simple operators. Functions have a common syntax: each
+is composed of a function name followed by a left parenthesis, one or
+more arguments, and a right parenthesis.
+
+ Function names are not reserved. Their names are specially treated
+only when followed by a left parenthesis, so that `EXP(10)` refers to
+the constant value e raised to the 10th power, but `EXP` by itself
+refers to the value of a variable called `EXP`.
--- /dev/null
+# Mathematical Functions
+
+Advanced mathematical functions take numeric arguments and produce
+numeric results.
+
+* `EXP(EXPONENT)`
+ Returns e (approximately 2.71828) raised to power `EXPONENT`.
+
+* `LG10(X)`
+ Takes the base-10 logarithm of `X`. If `X` is not positive, the
+ result is system-missing.
+
+* `LN(X)`
+ Takes the base-e logarithm of `X`. If `X` is not positive, the
+ result is system-missing.
+
+* `LNGAMMA(X)`
+ Yields the base-e logarithm of the complete gamma of `X`. If `X` is
+ a negative integer, the result is system-missing.
+
+* `SQRT(X)`
+ Takes the square root of `X`. If `X` is negative, the result is
+ system-missing.
+
--- /dev/null
+# Logical Operators
+
+The logical operators take logical operands and produce logical results,
+meaning "true or false." Logical operators are not true Boolean
+operators because they may also result in a system-missing value. *Note
+Boolean Values::, for more information.
+
+* `A AND B`
+ `A & B`
+ True if both `A` and `B` are true, false otherwise. If one operand
+ is false, the result is false even if the other is missing. If both
+ operands are missing, the result is missing.
+
+* `A OR B`
+ `A | B`
+ True if at least one of `A` and `B` is true. If one operand is
+ true, the result is true even if the other operand is missing. If
+ both operands are missing, the result is missing.
+
+* `NOT A`
+ `~A`
+ True if `A` is false. If the operand is missing, then the result is
+ missing.
+
--- /dev/null
+# Relational Operators
+
+The relational operators take numeric or string operands and produce
+Boolean results.
+
+ Strings cannot be compared to numbers. When strings of different
+lengths are compared, the shorter string is right-padded with spaces to
+match the length of the longer string.
+
+ The results of string comparisons, other than tests for equality or
+inequality, depend on the character set in use. String comparisons are
+case-sensitive.
+
+* `A EQ B`
+ `A = B`
+ True if `A` is equal to `B`.
+
+* `A LE B`
+ `A <= B`
+ True if `A` is less than or equal to `B`.
+
+* `A LT B`
+ `A < B`
+ True if `A` is less than `B`.
+
+* `A GE B`
+ `A >= B`
+ True if `A` is greater than or equal to `B`.
+
+* `A GT B`
+ `A > B`
+ True if `A` is greater than `B`.
+
+* `A NE B`
+ `A ~= B`
+ `A <> B`
+ True if `A` is not equal to `B`.
+