v.20.5Improvement
Fix negative results in variance calculations for varSamp and varPop
Ensure thatvarSamp,varPopcannot return negative results due to numerical errors and thatstddevSamp,stddevPopcannot be calculated from negative variance. This fixes #10532. #10829 (alexey-milovidov).
Why it matters
This feature addresses the issue where due to floating-point numerical errors, variance functions (varSamp, varPop) could return negative results, which are mathematically invalid. It also prevents standard deviation functions (stddevSamp, stddevPop) from being computed on negative variances, ensuring reliable and accurate statistical calculations.