Jacques Lucke aec72c0a9a Fix #97685: very inaccurate mean computation in Attribute Statistic node
Numerical instability mainly comes from adding values together which have very
different magnitude. There are algorithms to keep the error small like "Kahan
Summation", however those are also slower because of additional code in the hot
loop. This patch implements a simpler approach that is slightly less accurate,
but still seems to solve the cases that people commonly run into while being
simpler and faster. The approach is to simply compute a couple partial sums
first, and to add those up in the end. The individual partial sums can also be
computed in parallel. Care has to be taken to maintain determinism with floating
point values.

If accuracy is still not enough for some use cases, we can revisit this later
and e.g. use doubles or a better summation algorithm.

Pull Request: https://projects.blender.org/blender/blender/pulls/132759
2025-01-17 12:20:42 +01:00
2025-01-16 22:56:53 +01:00
2023-12-08 13:28:13 +11:00
2025-01-08 16:42:50 +01:00
2025-01-02 16:01:17 +11:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.

Description
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%