[multiple] Single-precision float math, avoid double promotion (batch 2/4) (#17254)

This commit is contained in:
Jonathan Swoboda
2026-06-28 14:18:20 -04:00
committed by GitHub
parent 40820287f1
commit b7803cf9b5
17 changed files with 37 additions and 34 deletions
@@ -112,7 +112,7 @@ float BinarySensorMap::bayesian_predicate_(bool sensor_state, float prior, float
prob_state_source_false = 1 - prob_given_false;
}
return prob_state_source_true / (prior * prob_state_source_true + (1.0 - prior) * prob_state_source_false);
return prob_state_source_true / (prior * prob_state_source_true + (1.0f - prior) * prob_state_source_false);
}
void BinarySensorMap::add_channel(binary_sensor::BinarySensor *sensor, float value) {