Report a bug
If you spot a problem with this page, click here to create a GitHub issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
mir.random.flex.internal.calc
- auto
arcmean
(S)(ref scope const Interval!Siv
); - Calculate the mean between two points using the arcmean:tan(0.5 * (atan(l) + atan(r))) In contrast to the normal mean (0.5 * (l + r)) being a geometric plane, the arcmean favors the mean region more.Parameters:
Interval!S iv
Interval with left point and right point Returns:Splitting point within the intervalSee Also:WolframAlpha visualization of the arc-mean.References Hormann, W., J. Leydold, and G. Derflinger. "Automatic Nonuniform Random Number Generation." (2004): Formula 4.23
Copyright © 2016-2021 by Ilya Yaroshenko | Page generated by
Ddoc on Tue Mar 23 21:30:37 2021