> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canton.network/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# DA.Math

> Reference documentation for Daml module DA.Math.

Daml module

# DA.Math

Math - Utility Math functions for Decimal

Daml

Module
DA.Math

Latest release
3.7.5

## Functions

### `**`

`**` : [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135) -> [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135) -> [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135)

Take a power of a number Example: `2.0 ** 3.0 == 8.0`.

### `sqrt`

`sqrt` : [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135) -> [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135)

Calculate the square root of a Decimal.

```
>>> sqrt 1.44
1.2
```

### `exp`

`exp` : [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135) -> [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135)

The exponential function. Example: `exp 0.0 == 1.0`

### `log`

`log` : [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135) -> [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135)

The natural logarithm. Example: `log 10.0 == 2.30258509299`

### `logBase`

`logBase` : [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135) -> [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135) -> [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135)

The logarithm of a number to a given base. Example: `log 10.0 100.0 == 2.0`

### `sin`

`sin` : [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135) -> [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135)

`sin` is the sine function

### `cos`

`cos` : [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135) -> [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135)

`cos` is the cosine function

### `tan`

`tan` : [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135) -> [`Decimal`](https://docs.canton.network/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135)

`tan` is the tangent function
