### 17.9 Mathematical Constants ¶

`x =` e ¶
`x =` e `(n)` ¶
`x =` e `(m, n, …)` ¶
`x =` e `([m, n, …])` ¶
`x =` e `(…, class)` ¶

  Return a scalar, matrix, or N-dimensional array whose elements are all equal to the base of natural logarithms.

  The constant ‘`e`’ satisfies the equation `log` (e) = 1.

  If called with no arguments, return the scalar value e.

  If invoked with a single scalar integer argument n, return a square NxN matrix.

  If invoked with two or more scalar integer arguments, or a vector of integer values, return an array with the given dimensions.

  The optional argument class specifies the class of the return array. The only valid options are `"double"` (default) or `"single"`.

  See also: log, exp, pi, I.

`p =` pi ¶
`p =` pi `(n)` ¶
`p =` pi `(m, n, …)` ¶
`p =` pi `([m, n, …])` ¶
`p =` pi `(…, class)` ¶

  Return a scalar, matrix, or N-dimensional array whose elements are all equal to the ratio of the circumference of a circle to its diameter.

  If called with no arguments, return the scalar value pi.

  If invoked with a single scalar integer argument n, return a square NxN matrix.

  If invoked with two or more scalar integer arguments, or a vector of integer values, return an array with the given dimensions.

  The optional argument class specifies the class of the return array. The only valid options are `"double"` (default) or `"single"`.

  See also: e, I.

`x =` I ¶
`x =` I `(n)` ¶
`x =` I `(m, n, …)` ¶
`x =` I `([m, n, …])` ¶
`x =` I `(…, class)` ¶

  Return a scalar, matrix, or N-dimensional array whose elements are all equal to the pure imaginary unit, defined as `sqrt (-1)`.

  `I`, and its equivalents `i`, `j`, and `J`, are functions so any of the names may be reused for other purposes (such as `i` for a counter variable).

  If called with no arguments, return the scalar value `complex (0, 1)`.

  If invoked with a single scalar integer argument n, return a square NxN matrix.

  If invoked with two or more scalar integer arguments, or a vector of integer values, return an array with the given dimensions.

  The optional argument class specifies the class of the return array. The only valid options are `"double"` (default) or `"single"`.

  See also: e, pi, log, exp.

`x =` Inf ¶
`x =` Inf `(n)` ¶
`x =` Inf `(m, n, …)` ¶
`x =` Inf `([m, n, …])` ¶
`x =` Inf `(…, class)` ¶
`x =` Inf `(…, "like", var)` ¶

  Return a scalar, matrix or N-dimensional array whose elements are all equal to the IEEE 754 representation for positive infinity.

  Infinity is produced when results are too large to be represented using the IEEE 754 floating point format for numbers. Two common examples which produce infinity are division by zero and overflow.

      [ 1/0 e^800 ]
      ⇒  Inf   Inf

  If called with no arguments, return the scalar value `Inf`.

  If invoked with a single scalar integer argument n, return a square NxN matrix.

  If invoked with two or more scalar integer arguments, or a vector of integer values, return an array with the given dimensions.

  The optional argument class specifies the class of the return array. The only valid options are `"double"` (default) or `"single"`.

  If a variable var is specified after `"like"`, the output x will have the same data type, complexity, and sparsity as var.

  See also: isinf, NaN.

`x =` NaN ¶
`x =` NaN `(n)` ¶
`x =` NaN `(m, n, …)` ¶
`x =` NaN `([m, n, …])` ¶
`x =` NaN `(…, class)` ¶
`x =` NaN `(…, "like", var)` ¶

  Return a scalar, matrix, or N-dimensional array whose elements are all equal to the IEEE 754 symbol NaN (Not a Number).

  `NaN` is the result of operations which do not produce a well defined numerical result. Common operations which produce a `NaN` are arithmetic with infinity (Inf - Inf), zero divided by zero (0/0), and any operation involving another `NaN` value (5 + `NaN`).

  Note that `NaN` always compares not equal to `NaN` (`NaN != NaN`). This behavior is specified by the IEEE 754 standard for floating point arithmetic. To find `NaN` values, use the `isnan` function.

  If called with no arguments, return the scalar value `NaN`.

  If invoked with a single scalar integer argument n, return a square NxN matrix.

  If invoked with two or more scalar integer arguments, or a vector of integer values, return an array with the given dimensions.

  The optional argument class specifies the class of the return array. The only valid options are `"double"` (default) or `"single"`.

  If a variable var is specified after `"like"`, the output x will have the same data type, complexity, and sparsity as var.

  See also: isnan, Inf.

`d =` eps ¶
`d =` eps `(x)` ¶
`d =` eps `(m, n, …)` ¶
`d =` eps `([m, n, …])` ¶
`d =` eps `(…, class)` ¶

  Return a scalar, matrix or N-dimensional array whose elements are eps, the machine precision.

  More precisely, `eps` is the relative spacing between any two adjacent numbers in the machine’s floating point system. This number depends both on the system and where the number lies in the range representable by the floating point system. On machines that support IEEE 754 floating point arithmetic, `eps (1.0)` is approximately 2.2204e-16 for double precision and 1.1921e-07 for single precision.

  If called with no arguments, return the scalar value `eps (1.0)`.

  Given a floating point argument x, return an array d of the same size where each element is the distance between the element of x and the next largest value.

  If invoked with two or more scalar integer arguments, or a vector of integer values, return an array with the given dimensions whose elements are all the scalar value `eps`.

  The optional argument class specifies the class of the return array. The only valid options are `"double"` (default) or `"single"`.

  See also: realmax, realmin, intmax, flintmax.

`Rmax =` realmax ¶
`Rmax =` realmax `(n)` ¶
`Rmax =` realmax `(m, n, …)` ¶
`Rmax =` realmax `([m, n, …])` ¶
`Rmax =` realmax `(…, class)` ¶
`Rmax =` realmax `(…, "like", var)` ¶

  Return a scalar, matrix, or N-dimensional array whose elements are all equal to the largest floating point number that is representable.

  The actual value is system-dependent. On machines that support IEEE 754 floating point arithmetic, `realmax` is approximately 1.7977e+308 for double precision and 3.4028e+38 for single precision.

  If called with no arguments, return the scalar value `realmax (`"double"`)`.

  If invoked with a single scalar integer argument n, return a square NxN matrix.

  If invoked with two or more scalar integer arguments, or a vector of integer values, return an array with the given dimensions.

  The optional argument class specifies the class of the return array. The only valid options are `"double"` (default) or `"single"`.

  If a variable var is specified after `"like"`, the output Rmax will have the same data type, complexity, and sparsity as var.

  See also: realmin, intmax, flintmax, eps.

`Rmin =` realmin ¶
`Rmin =` realmin `(n)` ¶
`Rmin =` realmin `(m, n, …)` ¶
`Rmin =` realmin `([m, n, …])` ¶
`Rmin =` realmin `(…, class)` ¶
`Rmin =` realmin `(…, "like", var)` ¶

  Return a scalar, matrix, or N-dimensional array whose elements are all equal to the smallest normalized floating point number that is representable.

  The actual value is system-dependent. On machines that support IEEE 754 floating point arithmetic, `realmin` is approximately 2.2251e-308 for double precision and 1.1755e-38 for single precision.

  If called with no arguments, return the scalar value `realmin (`"double"`)`.

  If invoked with a single scalar integer argument n, return a square NxN matrix.

  If invoked with two or more scalar integer arguments, or a vector of integer values, return an array with the given dimensions.

  The optional argument class specifies the class of the return array. The only valid options are `"double"` (default) or `"single"`.

  If a variable var is specified after `"like"`, the output Rmin will have the same data type, complexity, and sparsity as var.

  See also: realmax, intmin, eps.