Some mathematics functions implemented in golang