7 ms·
Very cool. Note that my C# version is fixed to use 128 segments based on George Marsaglia's original calculations; Calculating them dynamically for a given PDF
by redcalx 11y ago
Very cool. Note that my C# version is fixed to use 128 segments based on George Marsaglia's original calculations; Calculating them dynamically for a given PDF is an impressive achievement indeed. E.g. I did wonder if there was a more optimal number of segments, and of course yours isn't limited to the Gaussian.