# ConvertMode

`import { ConvertMode } from "destack:tensor";`

Conversion mode for tensor element conversion.

```ds title="ConvertMode"
export enum ConvertMode {
    Exact = 1,
    RoundTiesEven = 2,
    RoundTowardZero = 3,
    RoundFloor = 4,
    RoundCeil = 5,
    Saturate = 6,
}
```

[language/library/src/tensor/mode.ds:2:15](https://github.com/destack-sh/destack/blob/main/language/library/src/tensor/mode.ds#L2-L15)

## Variants

### `Exact = 1`

Require exact conversion.

### `RoundTiesEven = 2`

Round to nearest, ties to even.

### `RoundTowardZero = 3`

Round toward zero.

### `RoundFloor = 4`

Round toward negative infinity.

### `RoundCeil = 5`

Round toward positive infinity.

### `Saturate = 6`

Clamp overflow to the destination range.
