fadd
Input Stack:
|
⇨ | Output Stack:
|
Floating point addition operator that follows strict IEEE 754 floating point arithmetic.
Compute a new time series where each interval has the value (ts1 + ts2)
where values
are the corresponding intervals in the input time series.
Parameters¶
- ts1: First time series expression (left operand)
- ts2: Second time series expression (right operand)
NaN Handling¶
Unlike :add, this operator follows standard floating point rules where any operation involving NaN produces NaN as the result:
:fadd | 3.0 | 0.0 | 1.0 | NaN | NaN |
---|---|---|---|---|---|
Input 1 | 2.0 | 0.0 | 1.0 | 1.0 | NaN |
Input 2 | 1.0 | 0.0 | 0.0 | NaN | NaN |
Warning
This can lead to confusing behavior when combining time series with missing data. If a time series has NaN values (e.g., from a node that started reporting mid-window), the result will be NaN. Use :add instead to treat NaN values as zero.
Examples¶
Adding a constant value:
Before | After |
name,sps,:eq, 30e3 | name,sps,:eq, 30e3,:fadd |
Adding two time series:
Before | After |
name,requestLatency,:eq, :sum, name,requestsPerSecond,:eq, :max, (,name,),:by | name,requestLatency,:eq, :sum, name,requestsPerSecond,:eq, :max, (,name,),:by, :fadd |