[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |

## 17.8 Mathematical Constants

__Built-in Function:__**e**__Built-in Function:__**e***(*`n`)__Built-in Function:__**e***(*`n`,`m`)__Built-in Function:__**e***(*`n`,`m`,`k`, …)__Built-in Function:__**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.When called with no arguments, return a scalar with the value

*e*. When called with a single argument, return a square matrix with the dimension specified. When called with more than one scalar argument the first two arguments are taken as the number of rows and columns and any further arguments specify additional matrix dimensions. The optional argument`class`specifies the return type and may be either "double" or "single".

__Built-in Function:__**pi**__Built-in Function:__**pi***(*`n`)__Built-in Function:__**pi***(*`n`,`m`)__Built-in Function:__**pi***(*`n`,`m`,`k`, …)__Built-in Function:__**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. Internally,

`pi`

is computed as ‘`4.0 * atan (1.0)`’.When called with no arguments, return a scalar with the value of pi. When called with a single argument, return a square matrix with the dimension specified. When called with more than one scalar argument the first two arguments are taken as the number of rows and columns and any further arguments specify additional matrix dimensions. The optional argument

`class`specifies the return type and may be either "double" or "single".

__Built-in Function:__**I**__Built-in Function:__**I***(*`n`)__Built-in Function:__**I***(*`n`,`m`)__Built-in Function:__**I***(*`n`,`m`,`k`, …)__Built-in Function:__**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).When called with no arguments, return a scalar with the value

*i*. When called with a single argument, return a square matrix with the dimension specified. When called with more than one scalar argument the first two arguments are taken as the number of rows and columns and any further arguments specify additional matrix dimensions. The optional argument`class`specifies the return type and may be either "double" or "single".

__Built-in Function:__**Inf**__Built-in Function:__**Inf***(*`n`)__Built-in Function:__**Inf***(*`n`,`m`)__Built-in Function:__**Inf***(*`n`,`m`,`k`, …)__Built-in Function:__**Inf***(…,*`class`)Return a scalar, matrix or N-dimensional array whose elements are all equal to the IEEE representation for positive infinity.

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

[1/0 e^800] ⇒ Inf Inf

When called with no arguments, return a scalar with the value ‘

`Inf`’. When called with a single argument, return a square matrix with the dimension specified. When called with more than one scalar argument the first two arguments are taken as the number of rows and columns and any further arguments specify additional matrix dimensions. The optional argument`class`specifies the return type and may be either "double" or "single".**See also:**isinf.

__Built-in Function:__**NaN**__Built-in Function:__**NaN***(*`n`)__Built-in Function:__**NaN***(*`n`,`m`)__Built-in Function:__**NaN***(*`n`,`m`,`k`, …)__Built-in Function:__**NaN***(…,*`class`)Return a scalar, matrix, or N-dimensional array whose elements are all equal to the IEEE 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 standard for floating point arithmetic. To find NaN values, use the

`isnan`

function.When called with no arguments, return a scalar with the value ‘

`NaN`’. When called with a single argument, return a square matrix with the dimension specified. When called with more than one scalar argument the first two arguments are taken as the number of rows and columns and any further arguments specify additional matrix dimensions. The optional argument`class`specifies the return type and may be either "double" or "single".**See also:**isnan.

__Built-in Function:__**eps**__Built-in Function:__**eps***(*`x`)__Built-in Function:__**eps***(*`n`,`m`)__Built-in Function:__**eps***(*`n`,`m`,`k`, …)__Built-in Function:__**eps***(…,*`class`)Return a scalar, matrix or N-dimensional array whose elements are all 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 is obviously system dependent. On machines that support IEEE floating point arithmetic,`eps`

is approximately 2.2204e-16 for double precision and 1.1921e-07 for single precision.When called with no arguments, return a scalar with the value

`eps(1.0)`

. Given a single argument`x`, return the distance between`x`and the next largest value. When called with more than one argument the first two arguments are taken as the number of rows and columns and any further arguments specify additional matrix dimensions. The optional argument`class`specifies the return type and may be either "double" or "single".

__Built-in Function:__**realmax**__Built-in Function:__**realmax***(*`n`)__Built-in Function:__**realmax***(*`n`,`m`)__Built-in Function:__**realmax***(*`n`,`m`,`k`, …)__Built-in Function:__**realmax***(…,*`class`)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 floating point arithmetic,

`realmax`

is approximately 1.7977e+308 for double precision and 3.4028e+38 for single precision.When called with no arguments, return a scalar with the value

`realmax("double")`

. When called with a single argument, return a square matrix with the dimension specified. When called with more than one scalar argument the first two arguments are taken as the number of rows and columns and any further arguments specify additional matrix dimensions. The optional argument`class`specifies the return type and may be either "double" or "single".

__Built-in Function:__**realmin**__Built-in Function:__**realmin***(*`n`)__Built-in Function:__**realmin***(*`n`,`m`)__Built-in Function:__**realmin***(*`n`,`m`,`k`, …)__Built-in Function:__**realmin***(…,*`class`)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 floating point arithmetic,

`realmin`

is approximately 2.2251e-308 for double precision and 1.1755e-38 for single precision.When called with no arguments, return a scalar with the value

`realmin("double")`

. When called with a single argument, return a square matrix with the dimension specified. When called with more than one scalar argument the first two arguments are taken as the number of rows and columns and any further arguments specify additional matrix dimensions. The optional argument`class`specifies the return type and may be either "double" or "single".

[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |