Math and statistics algorithms dump