-
Notifications
You must be signed in to change notification settings - Fork 2
Add logarithmic mean function #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
completed
Issue completed and committed to develop. To be closed on next release
enhancement
New feature or request
Comments
Version with non-negative Integer parameters: function LogarithmicMean(const X, Y: Cardinal): Double;
begin
Assert((X > 0) and (Y > 0));
if X = Y then
Result := X
else
Result := (Y - X) / (Ln(Y) - Ln(X));
end; Don't create a version with Integer parameters since both parameters must be > 0 anyway. |
Added Double parameter version of Implemented by merge commit 28b2b6f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
completed
Issue completed and committed to develop. To be closed on next release
enhancement
New feature or request
The logarithmic mean of two +ve numbers (not same as log-mean), is defined as:
Where x = y:
Where x ≠ y:
So:
This issue was extracted from issue #16
The text was updated successfully, but these errors were encountered: