> ## Documentation Index
> Fetch the complete documentation index at: https://cantonfoundation-generated-reference-full-stack-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# DA.Math

> Reference documentation for Daml module DA.Math.

<div class="x2mdx-ref-page x2mdx-ref-page--collection" />

<span id="module-da-math-30023" />

<div class="x2mdx-ref-hero">
  <p class="x2mdx-ref-eyebrow">Daml module</p>

  <h1 class="x2mdx-ref-title">DA.Math</h1>

  <p class="x2mdx-ref-summary">Math - Utility Math functions for Decimal</p>

  <div class="x2mdx-ref-badges">
    <span class="x2mdx-ref-badge x2mdx-ref-badge--protocol">Daml</span>
  </div>

  <dl class="x2mdx-ref-meta-grid">
    <div class="x2mdx-ref-meta-item">
      <dt>Module</dt>
      <dd>DA.Math</dd>
    </div>

    <div class="x2mdx-ref-meta-item">
      <dt>Latest release</dt>
      <dd>3.5.7</dd>
    </div>
  </dl>
</div>

## Functions

<span id="function-da-math-starstar-89123" />

### `**`

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

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

<span id="function-da-math-sqrt-24467" />

### `sqrt`

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

Calculate the square root of a Decimal.

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

<span id="function-da-math-exp-84235" />

### `exp`

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

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

<span id="function-da-math-log-52192" />

### `log`

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

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

<span id="function-da-math-logbase-64267" />

### `logBase`

`logBase` : [`Decimal`](/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135) -> [`Decimal`](/appdev/reference/daml-standard-library/prelude#type-ghc-types-decimal-18135) -> [`Decimal`](/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`

<span id="function-da-math-sin-61636" />

### `sin`

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

`sin` is the sine function

<span id="function-da-math-cos-82859" />

### `cos`

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

`cos` is the cosine function

<span id="function-da-math-tan-54959" />

### `tan`

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

`tan` is the tangent function
