towerops/lib
mayor 4d980ed58a
Fix Dialyzer :exact_compare warnings for NaN/infinity checks
Fixes 3 Dialyzer warnings about impossible comparisons when checking for NaN
and infinity values in sensor validation.

Problem:
Dialyzer correctly identified that comparing a float with atoms (:nan,
:infinity, :neg_infinity) using == can never evaluate to true. The previous
code attempted to validate sensor values by comparing with these atoms, which
is incorrect in Erlang/Elixir.

Solution:
Use proper float comparison techniques:
- NaN detection: value != value (NaN is the only value that doesn't equal itself)
- Infinity detection: value > 1.0e308 or value < -1.0e308 (beyond max float range)

This approach correctly identifies special float values without impossible
comparisons that Dialyzer flags.

Dialyzer results:
- Before: Total errors: 509, Skipped: 506
- After: Total errors: 506, Skipped: 506
- Status: done (passed successfully), EXIT CODE: 0

All 3434 tests passing. Validation logic now correctly identifies NaN and
infinity values while satisfying Dialyzer type analysis.
2026-02-06 10:02:46 -06:00
..
mix/tasks Remove debugging logs, fix Mix.env call 2026-02-04 12:10:48 -06:00
snmpkit nif ci fixes and dialyzer fixes 2026-01-30 12:38:50 -06:00
towerops Fix Dialyzer :exact_compare warnings for NaN/infinity checks 2026-02-06 10:02:46 -06:00
towerops_web Fix all compilation warnings for --warnings-as-errors 2026-02-06 09:57:04 -06:00
snmp_lib.ex bring in snmpkit 2026-01-23 12:52:17 -06:00
snmp_mgr.ex credo fixes 2026-01-23 14:01:52 -06:00
snmpkit.ex complete overhaul of snmp engine 2026-01-30 10:41:07 -06:00
towerops.ex init 2025-12-21 11:10:43 -06:00
towerops_native.ex complete overhaul of snmp engine to C nif 2026-01-30 12:27:12 -06:00
towerops_web.ex feat: implement gettext infrastructure (Phase 1) 2026-02-02 09:40:32 -06:00