# evm_sign

Returns -1 for a negative two's-complement INT256 value, 0 for zero, and 1 for a positive value. NULL input propagates to NULL.

Canonical HTML: <https://determica.com/docs/functions/evm_sign>

- Kind: scalar function
- Category: [EVM utilities](/docs/category/evm-utilities.md)
- Tags: Types, EVM

Returns -1 for a negative two's-complement INT256 value, 0 for zero, and 1 for a positive value. NULL input propagates to NULL.

## Overload 1: evm_sign(INT256)

```sql
evm_sign(INT256)
```

Returns -1, 0, or 1 for a signed INT256 input.

- Kind: scalar
- Execution context: Offline
- Behavior: Transform
- Execution modes: Offline
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: One Per Input
- Determinism: Deterministic
- Return shape: Scalar
- Schema stability: Fixed
- Stability: Stable
- Side effects: None documented

### Inputs

- `x` (INT256; required; positional) — Two's-complement INT256 value.

### Returns

Sign indicator

BIGINT -1, 0, or 1, or NULL for NULL input.

- `sign` (BIGINT)

Sign indicator. BIGINT -1, 0, or 1, or NULL for NULL input.

### Examples

_Local SQL · Local_

```sql
SELECT evm_sign((-42)::INT256) AS result;
-- => [{"result":-1}]
```
