Searched hist:c77b6b3f (Results 1 – 3 of 3) sorted by relevance
/openbmc/phosphor-virtual-sensor/ |
H A D | exprtkTools.hpp | c77b6b3f Thu Jun 08 07:02:05 CDT 2023 Lei YU <yulei.sh@bytedance.com> exprkt: Add ifNan to ignore the NaN value
Arithmetic with `nan` values is not expected in virtual sensor's case.
Adding a new exprkt function `ifNan` to handle this case, that if a value is `nan`, then use the other value.
Example usage in json config: ``` "Expression": "ifNan(maxIgnoreNaN(T0, T1), T2)" ```
The above expression get max value of T0, T1 ignoring nan, and if it's still nana, it uses the value T2.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: Ib323f6e18ef9f3317437753018857ad53732f54b
|
H A D | virtualSensor.hpp | c77b6b3f Thu Jun 08 07:02:05 CDT 2023 Lei YU <yulei.sh@bytedance.com> exprkt: Add ifNan to ignore the NaN value
Arithmetic with `nan` values is not expected in virtual sensor's case.
Adding a new exprkt function `ifNan` to handle this case, that if a value is `nan`, then use the other value.
Example usage in json config: ``` "Expression": "ifNan(maxIgnoreNaN(T0, T1), T2)" ```
The above expression get max value of T0, T1 ignoring nan, and if it's still nana, it uses the value T2.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: Ib323f6e18ef9f3317437753018857ad53732f54b
|
H A D | virtualSensor.cpp | c77b6b3f Thu Jun 08 07:02:05 CDT 2023 Lei YU <yulei.sh@bytedance.com> exprkt: Add ifNan to ignore the NaN value
Arithmetic with `nan` values is not expected in virtual sensor's case.
Adding a new exprkt function `ifNan` to handle this case, that if a value is `nan`, then use the other value.
Example usage in json config: ``` "Expression": "ifNan(maxIgnoreNaN(T0, T1), T2)" ```
The above expression get max value of T0, T1 ignoring nan, and if it's still nana, it uses the value T2.
Signed-off-by: Lei YU <yulei.sh@bytedance.com> Change-Id: Ib323f6e18ef9f3317437753018857ad53732f54b
|