# Sema: clean up cmpNumeric · gitcafe/zig

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

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

Visibility: public

Requested revision: 4650e5b9fcaa74b724a51458f5cf8952f3c734de

Requested commit: 4650e5b9fcaa74b724a51458f5cf8952f3c734de

Commit: 4650e5b9fcaa74b724a51458f5cf8952f3c734de

Tree: 3d3b16bb86bff91c115f6778102995ac1d0e40a7

Author: mlugg

Committer: mlugg

## Message

```
Sema: clean up cmpNumeric

There is one minor language change here, which is that comparisons of
the form `comptime_inf < runtime_f32` have their results comptime-known.
This is consistent with comparisons against comptime NaN for instance,
which are always comptime known. A corresponding behavior test is added.

This fixes a bug with int comparison elision which my previous commit
somehow triggered. `Sema.compareIntsOnlyPossibleResult` is much cleaner
now!

```

## Parents

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

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