JCL Help:GeometricMean

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Calculates the geometric mean of an array of floats.


Pascal

 function GeometricMean(const X: TDynFloatArray): Float;


Parameters

Parameters Description
const X: TDynFloatArray The array of floats for which to calculate the geometric mean. The array may not contain elements with a value equal to or smaller than 0. The comparison to 0 is made based on the PrecisionTolerance global variable. If any of the elements do not conform to this constraint the function raises an EMathError exception.


Return Value

The geometric mean of the array of floats.


Description

GeometricMean calculates the geometric mean of an array of floats. The geometric mean is defined as the N-root (X^(1/N)) of the product of the elements. The array is not allowed to have 0 valued elements and cannot be empty. If either of these constraints are not met the function raises an EMathError exception.


About

Unit

JclStatistics


Donator

ESB Consultancy


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page