# Mathematical functions

This section describes functions for mathematical constants and Boolean values. These functions do not have any parameters, but the parentheses are still required.

All functions can be used in both the load script and in chart expressions.

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/MathConstantsAndParamFreeFunctions/mathematical-functions.htm)

#### e

The function returns the base of the natural logarithms, e ( 2.71828...).

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/MathConstantsAndParamFreeFunctions/mathematical-functions.htm)[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/MathConstantsAndParamFreeFunctions/mathematical-functions.htm)e( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/MathConstantsAndParamFreeFunctions/mathematical-functions.htm)

#### false

The function returns a dual value with text value 'False' and numeric value 0, which can be used as logical false in expressions.

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/MathConstantsAndParamFreeFunctions/mathematical-functions.htm)[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/MathConstantsAndParamFreeFunctions/mathematical-functions.htm)false( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/MathConstantsAndParamFreeFunctions/mathematical-functions.htm)

#### pi

The function returns the value of π (3.14159...).

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/MathConstantsAndParamFreeFunctions/mathematical-functions.htm)[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/MathConstantsAndParamFreeFunctions/mathematical-functions.htm)pi( )

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/MathConstantsAndParamFreeFunctions/mathematical-functions.htm)

#### rand

The function returns a random number between 0 and 1. This can be used to create sample data.

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/MathConstantsAndParamFreeFunctions/mathematical-functions.htm)[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/MathConstantsAndParamFreeFunctions/mathematical-functions.htm)rand( )

Example:

This example script creates a table of 1000 records with randomly selected upper case characters, that is, characters in the range 65 to 91 (65+26).

```
Load
     Chr( Floor(rand() * 26) + 65) as UCaseChar,
     RecNo() as ID
     Autogenerate 1000;
```

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/MathConstantsAndParamFreeFunctions/mathematical-functions.htm)

#### true

The function returns a dual value with text value 'True' and numeric value -1, which can be used as logical true in expressions.

[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/MathConstantsAndParamFreeFunctions/mathematical-functions.htm)[](https://help.qlik.com/en-US/qlikview/Subsystems/Client/Content/QV_QlikView/Scripting/MathConstantsAndParamFreeFunctions/mathematical-functions.htm)true( )