Genetic algorithm applied to least squares curve fitting