Searched hist:"87 d35115" (Results 1 – 3 of 3) sorted by relevance
/openbmc/phosphor-virtual-sensor/ |
H A D | exprtkTools.hpp | 87d35115 Mon Oct 24 00:54:25 CDT 2022 Lei YU <yulei.sh@bytedance.com> exprkt: Add sumIgnoreNaN to ignore the NaN value
Arithmetic with `nan` values is not expected in virtual sensor's case.
Adding a new exprkt function `sumIgnoreNaN` to handle this case, that it ignores all `nan` values. If all values are `nan` then it returns `nan`, otherwise it returns the sum of the valid values.
Example usage in json config: ``` "Expression": "sumIgnoreNaN(T0, T1, T2, T3)" ```
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I0cbd87f038499b4ea3ab722c003adc795a11c2b3
|
H A D | virtualSensor.hpp | 87d35115 Mon Oct 24 00:54:25 CDT 2022 Lei YU <yulei.sh@bytedance.com> exprkt: Add sumIgnoreNaN to ignore the NaN value
Arithmetic with `nan` values is not expected in virtual sensor's case.
Adding a new exprkt function `sumIgnoreNaN` to handle this case, that it ignores all `nan` values. If all values are `nan` then it returns `nan`, otherwise it returns the sum of the valid values.
Example usage in json config: ``` "Expression": "sumIgnoreNaN(T0, T1, T2, T3)" ```
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I0cbd87f038499b4ea3ab722c003adc795a11c2b3
|
H A D | virtualSensor.cpp | 87d35115 Mon Oct 24 00:54:25 CDT 2022 Lei YU <yulei.sh@bytedance.com> exprkt: Add sumIgnoreNaN to ignore the NaN value
Arithmetic with `nan` values is not expected in virtual sensor's case.
Adding a new exprkt function `sumIgnoreNaN` to handle this case, that it ignores all `nan` values. If all values are `nan` then it returns `nan`, otherwise it returns the sum of the valid values.
Example usage in json config: ``` "Expression": "sumIgnoreNaN(T0, T1, T2, T3)" ```
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: I0cbd87f038499b4ea3ab722c003adc795a11c2b3
|