# dec

## Call Signature

> **dec**(): [`Column`](https://stage.docs.arkiv.network/typescript-sdk/api-reference/main/type-aliases/column/)\<`"dec"`, `false`, `false`, `false`\>

Defined in: [src/schema/values.ts:244](https://github.com/Arkiv-Network/arkiv-sdk-js/blob/d464c8dce16c3b8c472479ac5aae9d14344eb067/src/schema/values.ts#L244)

A `dec` column, indexed for equality and range queries once `.indexed()`.

### Returns

[`Column`](https://stage.docs.arkiv.network/typescript-sdk/api-reference/main/type-aliases/column/)\<`"dec"`, `false`, `false`, `false`\>

## Call Signature

> **dec**(`value`): [`DecValue`](https://stage.docs.arkiv.network/typescript-sdk/api-reference/main/type-aliases/decvalue/)

Defined in: [src/schema/values.ts:262](https://github.com/Arkiv-Network/arkiv-sdk-js/blob/d464c8dce16c3b8c472479ac5aae9d14344eb067/src/schema/values.ts#L262)

A signed fixed-point decimal with exactly 18 decimal places.

Pass fractional values as **strings**. A JavaScript number cannot represent most decimals
exactly, so accepting `dec(0.1 + 0.2)` would quietly store `0.30000000000000004`; requiring the
string keeps what you write and what is stored the same thing. Excess precision is likewise an
error rather than a rounding.

### Parameters

#### value

A decimal string, or an integral `number` / `bigint`.

`string` | `number` | `bigint`

### Returns

[`DecValue`](https://stage.docs.arkiv.network/typescript-sdk/api-reference/main/type-aliases/decvalue/)

### Throws

If the value is malformed, has more than 18 fractional digits, or
falls outside the `int256` range.

### Example

```ts
dec("3.5")
dec("-0.000000000000000001")  // the smallest step
dec(5)                        // integers may be passed as a number
```