Library of Math functions

29 August 2016, 14:23
AlexEros
[Deleted]
0
139

This is an extract from production library of EAs "Graalino-Pro" and "Ocean Breeze".

There is a dosen of general math functions here.

Everything in this library is PUBLIC DOMAIN (and free).

Example:

//______________________________________________________________________________________
//                                                                                                                                                                                      |
//                      Array_Mean_Harmonic ()                                                                                          |
//___________________________________________________________________|
double Array_Mean_Harmonic
(
   double  &    Array[],
   int                  Start_Bar,
   int                  Array_Size
)
{
        int i;
        double Average ;
        Average = 0.0 ;
        for (i = 0; i < Array_Size; i++)
        {
                if (Array [i + Start_Bar] != 0.0)
                {
                        Average = Average + 1.0 / Array [i + Start_Bar];
                }
        }
        Average = Array_Size / Average;
        return (Average);
}
Files:
Share it with friends: