> For the complete documentation index, see [llms.txt](https://developers.polymath.network/polymath/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.polymath.network/polymath/api/decimalmath.md).

# DecimalMath.sol

View Source: [contracts/libraries/DecimalMath.sol](https://github.com/PolymathNetwork/polymath-core/tree/096ba240a927c98e1f1a182d2efee7c4c4c1dfc5/contracts/libraries/DecimalMath.sol)

**DecimalMath**

## Contract Members

**Constants & Variables**

```javascript
uint256 internal constant e18;
```

## Functions

* [mul(uint256 x, uint256 y)](/polymath/api/decimalmath.md#mul)
* [div(uint256 x, uint256 y)](/polymath/api/decimalmath.md#div)

### mul

This function multiplies two decimals represented as (decimal *10\**&#x44;ECIMALS)

```javascript
function mul(uint256 x, uint256 y) internal pure
returns(z uint256)
```

**Returns**

uint256 Result of multiplication represented as (decimal *10\**&#x44;ECIMALS)

**Arguments**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| x    | uint256 |             |
| y    | uint256 |             |

### div

This function divides two decimals represented as (decimal *10\**&#x44;ECIMALS)

```javascript
function div(uint256 x, uint256 y) internal pure
returns(z uint256)
```

**Returns**

uint256 Result of division represented as (decimal *10\**&#x44;ECIMALS)

**Arguments**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| x    | uint256 |             |
| y    | uint256 |             |
