TCCMaths.cc

Summary
TCCMaths.cc
Functions
f__maxIL Return an IntegerList with the highest number found at index 0 and the index of ilist where it’s found at index 1
f__minIL Return an IntegerList with the lowest number found at index 0 and the index of ilist where it’s fond at index 1
f__maxFL Return an FloatList with the highest number found at index 0 and the index of flist where it’s fond at index 1
f__minFL Return an FloatList with the highest number found at index 0 and the index of flist where it’s fond at index 1
f__averageFL Return the average of flist
f__averageIL Return the average of ilist
f__stdFL Return the normalized standard deviation of float list (so the average square distance from the center of elements in the list)
f__stdFLL Return the normalized standard deviation of float list using custom center (so it is the average square distance from a user defined central value)
f__updateFL Append tail to the end of head (head return as inout)
f__updateIL Append tail to the end of head (head return as inout)
f__stdIL Return the normalized standard deviation of integer list (so the average square distance from the center of points)
f__stdILL Return the normalized standard deviation of integer list using custom center (so it is the average square distance from a user defined central value)
f__sinVL Return the values of the sin function
f__cosVL Return the values of the cos function
f__sin Return the sine of angle radians
f__cos Return the cosine of angle radians
f__asin Return the arc sine of value in [-pi/2, +pi/2]
f__acos Return the arc cosine of value in [0, pi]
f__powFF Raise to power (float to float power)
f__powII Raise to power (integer to integer power)
f__powIF Raise to power (integer to float power)
f__powFI Raise to power (float to integer power)
f__sqrF Raise a float value to square
f__sqrI Raise an integer value to square
f__sqrtF Square root of float value
f__sqrtI Square root of integer value
f__ceil Return the smallest integer value that is not less then value
f__floor Return the largest integer value that is not greater then value
f__exp Return the exponential value of the argument
f__log Return the natural logarithm of the argument

Functions

f__maxIL

Purpose

Return an IntegerList with the highest number found at index 0 and the index of ilist where it’s found at index 1

Parameters

ilist in IntegerList - integer array

Return Value

<IntegerList> integer array: { <max>, <max index> }

Errors

-

Detailed description

-

f__minIL

Purpose

Return an IntegerList with the lowest number found at index 0 and the index of ilist where it’s fond at index 1

Parameters

ilist in IntegerList - integer array

Return Value

<IntegerList> integer array: { <min>, <min index> }

Errors

-

Detailed description

-

f__maxFL

Purpose

Return an FloatList with the highest number found at index 0 and the index of flist where it’s fond at index 1

Parameters

flist in FloatList - integer array

Return Value

<FloatList> float array: { <max>, <max index> }

Errors

-

Detailed description

-

f__minFL

Purpose

Return an FloatList with the highest number found at index 0 and the index of flist where it’s fond at index 1

Parameters

flist in FloatList - integer array

Return Value

<FloatList> float array: { <min>, <min index> }

Errors

-

Detailed description

-

f__averageFL

Purpose

Return the average of flist

Parameters

flist in FloatList - integer array

Return Value

float average of float numbers

Errors

-

Detailed description

-

f__averageIL

Purpose

Return the average of ilist

Parameters

ilist in IntegerList - integer array

Return Value

float average of integer numbers

Errors

-

Detailed description

-

f__stdFL

Purpose

Return the normalized standard deviation of float list (so the average square distance from the center of elements in the list)

Parameters

flist in FloatList - float list

Return Value

float normalized, standard derivate

Errors

-

Detailed description

E.g.  list = {2.0, 4.0}

u = (2.0 + 4.0) / 2 <- center of elements in the list

len = sizeof(list)

[ ( (2.0-u)^2 + (4.0-u)^2 ) / len ] ^ (0.5)

f__stdFLL

Purpose

Return the normalized standard deviation of float list using custom center (so it is the average square distance from a user defined central value)

Parameters

u in float - user defined central value
flist in FloatList - float list

Return Value

float normalized, standard derivate

Errors

-

Detailed description

Note: u is the average value of flist and has to be calculated before a call to this function

E.g.  list = {2.0, 4.0}

u <- user input

len = sizeof(list)

[ ( (2.0-u)^2 + (4.0-u)^2 ) / len ] ^ (0.5)

f__updateFL

Purpose

Append tail to the end of head (head return as inout)

Parameters

head in FloatList - first part of the float list
tail in FloatList - second part of the float list

Return Value

-

Errors

-

Detailed description

-

f__updateIL

Purpose

Append tail to the end of head (head return as inout)

Parameters

head in IntegerList - first part of the integer list
tail in IntegerList - second part of the integer list

Return Value

-

Errors

-

Detailed description

-

f__stdIL

Purpose

Return the normalized standard deviation of integer list (so the average square distance from the center of points)

Parameters

ilist in IntegerList - integer list

Return Value

float normalized, standard derivate

Errors

-

Detailed description

E.g.  list = {2.0, 4.0}

u = (2.0 + 4.0) / 2 <- center of elements in the list

len = sizeof(list)

[ ( (2.0-u)^2 + (4.0-u)^2 ) / len ] ^ (0.5)

f__stdILL

Purpose

Return the normalized standard deviation of integer list using custom center (so it is the average square distance from a user defined central value)

Parameters

u in float - user defined central value
ilist in IntegerList - integer list

Return Value

float normalized, standard derivate

Errors

-

Detailed description

Note: u is a user defined value

E.g.  list = {2.0, 4.0}

u <- user input

len = sizeof(list)

[ ( (2.0-u)^2 + (4.0-u)^2 ) / len ] ^ (0.5)

f__sinVL

Purpose

Return the values of the sin function

Parameters

freq in float - the frequency of the sine curve
altitude in float - the altitude of the sine curve
start_val in float - the starting value passed to the sine function
len in integer - the wanted number of points of the sine curve
step in float - the length between the points on the sine curve

Return Value

<FloatList> the wanted points in a float list

Errors

-

Detailed description

Generation of one sin value:

altitude * sin(2 * pi * freq * start_val)

start_val := start_val + step

f__cosVL

Purpose

Return the values of the cos function

Parameters

freq in float - the frequency of the sine curve
altitude in float - the altitude of the sine curve
start_val in float - the starting value passed to the sine function
len in integer - the wanted number of points of the sine curve
step in float - the length between the points on the sine curve

Return Value

<FloatList> the wanted points in a float list

Errors

-

Detailed description

Generation of one cos value:

altitude * cos(2 * pi * freq * start_val)

start_val := start_val + step

f__sin

Purpose

Return the sine of angle radians

Parameters

angle in float - angle in radians

Return Value

float the sine value of angle radians

Errors

-

Detailed description

-

f__cos

Purpose

Return the cosine of angle radians

Parameters

angle in float - angle in radians

Return Value

float the cosine value of angle radians

Errors

-

Detailed description

-

f__asin

Purpose

Return the arc sine of value in [-pi/2, +pi/2]

Parameters

val in float - value

Return Value

float the arc sine value of val

Errors

-

Detailed description

-

f__acos

Purpose

Return the arc cosine of value in [0, pi]

Parameters

val in float - value

Return Value

float the arc cosine value of val

Errors

-

Detailed description

-

f__powFF

Purpose

Raise to power (float to float power)

Parameters

base in float - base value
expo in float - exponent value

Return Value

float base raised to power expo

Errors

-

Detailed description

-

f__powII

Purpose

Raise to power (integer to integer power)

Parameters

base in integer - base value
expo in integer - exponent value

Return Value

integer base raised to power expo

Errors

-

Detailed description

-

f__powIF

Purpose

Raise to power (integer to float power)

Parameters

base in integer - base value
expo in float - exponent value

Return Value

float base raised to power expo

Errors

-

Detailed description

-

f__powFI

Purpose

Raise to power (float to integer power)

Parameters

base in float - base value
expo in integer - exponent value

Return Value

float base raised to power expo

Errors

-

Detailed description

-

f__sqrF

Purpose

Raise a float value to square

Parameters

base in float - base value

Return Value

float square of base

Errors

-

Detailed description

-

f__sqrI

Purpose

Raise an integer value to square

Parameters

base in integer - base value

Return Value

integer square of base

Errors

-

Detailed description

-

f__sqrtF

Purpose

Square root of float value

Parameters

base in float - base value

Return Value

float square root of base

Errors

-

Detailed description

-

f__sqrtI

Purpose

Square root of integer value

Parameters

base in integer - base value

Return Value

float square root of base

Errors

-

Detailed description

-

f__ceil

Purpose

Return the smallest integer value that is not less then value

Parameters

val in float - float value

Return Value

integer ceil value of val

Errors

-

Detailed description

-

f__floor

Purpose

Return the largest integer value that is not greater then value

Parameters

val in float - float value

Return Value

integer floor value of val

Errors

-

Detailed description

-

f__exp

Purpose

Return the exponential value of the argument

Parameters

val in float - float value

Return Value

float exp value of val

Errors

-

Detailed description

-

f__log

Purpose

Return the natural logarithm of the argument

Parameters

val in float - float value

Return Value

float ln value of val

Errors

-

Detailed description

-

type record of integer IntegerList
List of integer
type record of float FloatList
List of float