> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sifr.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# SIFR-DECIMAL-0007: Decimal scale argument is invalid.

> Decimal scale argument is invalid.

`SIFR-DECIMAL-0007` belongs to the **Decimal arithmetic** diagnostic family. It means: decimal scale argument is invalid.

## Why It Happens

Sifr keeps decimal values exact. This diagnostic fires when decimal construction, scale handling, or mixed numeric operations would introduce ambiguity or precision loss.

<Info>
  Use `sifr --explain SIFR-DECIMAL-0007` locally to see the renderer's exact message template and any machine-applicable suggestions for the compiler version you are running.
</Info>

## Erroneous Code

```python theme={null}
amount = Decimal("1.25")
```

## How To Fix It

Keep exact decimal values out of binary floating point. Use exact literals or string construction, and do not mix Decimal and BigDecimal in one expression.

## Fixed Code

```python theme={null}
amount = Decimal("1.25")
```

## Details

| Field                  | Value                                                              |
| ---------------------- | ------------------------------------------------------------------ |
| Code                   | `SIFR-DECIMAL-0007`                                                |
| Family                 | `DECIMAL`                                                          |
| Severity               | Error                                                              |
| Stability              | stable                                                             |
| Owner                  | `sifr_lowering::lower::decimal_methods`                            |
| Representative fixture | `crates/sifr/tests/e2e/fail/decimal_round_scale_out_of_range.sifr` |

See the [Error Codes index](/diagnostics/error-codes) for the complete catalog.
