Standard Deviation Bug/Error?

Hello Ignition Forums,

Not sure what's going on here but trying to calculate the standard deviation of a column of numbers from our db. In this case, we are returned with this

image

All the numbers that the standard deviation calculation is being done on are the same so the standard deviation should be 0 but Ignition gives me a value close to 0 but not completely.


image

When calculating the value we need, this only happens when the columns values are all the same. I have noticed that other collections seem to give the correct standard deviation but when they are all the same it does not.

(same code different numbers)
image
image

Are you sure they're all exactly 2.803 or are they being displayed as 2.803 after number formatting?

they are exactly 2.803 coming from the database.
image

I don’t know, that’s still just another view of them that could be subject to formatting.

I can plug a bunch of 2.803 values into the unit tests for this expression function and get 0 as expected, so I suspect somewhere along the chain here you don’t actually have the value you are seeing.