Algorithm to calculate the fractal dimension and numerical integration of fluctuating continuous functions