# Sema: Allow small integer types to coerce to floats · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/484cc15366eb2654be07e449c69ff9b4d04d5973)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 484cc15366eb2654be07e449c69ff9b4d04d5973

Requested commit: 484cc15366eb2654be07e449c69ff9b4d04d5973

Commit: 484cc15366eb2654be07e449c69ff9b4d04d5973

Tree: e0acce4416e3f6fd78c08cd5906d0284dc94ba26

Author: Jay Petacat

Committer: Andrew Kelley

## Message

```
Sema: Allow small integer types to coerce to floats

If the float can store all possible values of the integer without
rounding, coercion is allowed. The integer's precision must be less than
or equal to the float's significand precision.

Closes #18614

```

## Parents

- [5082e85de95d491b52fbff2c64cfd5b7190ddc10](https://git.cafe/gitcafe/zig/commit/5082e85de95d491b52fbff2c64cfd5b7190ddc10?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/484cc15366eb2654be07e449c69ff9b4d04d5973?format=markdown)
