Moving Average issue: "-0"

I have a moving average node in my workflow which is outputting “-0” for the moving average of 0, 0 and 0, which is breaking further steps in the workflow. I am completely stumped why this is happening.
image

Even if I go to full precision, I can see no reason for it.

image

If I manually take the group of three I want and group by average of count, I get 0! Can anyone suggest what is going on here? The workflow was really working well until this happened.

Hi @JWebb

This is really something strange. I created a loop moving_average_-0.knwf (60.3 KB) to see a what point the -0 gets introduced.

And I get the same result. At some point te -0 shows up. But I don’t now why.

gr. Hans

1 Like

Glad I’m not the only one! I’ve managed a temporary fix to change -1E-16 to 1E-16 - I am calculating a population rate, so that number is so tiny it doesn’t affect the outcome per 100,000 people.

Still very strange that it is occurring.

1 Like

It’s not just happening in your dataset. I generated some dummy sample data and there are also some -0 values ​​calculated.

afbeelding