moved more functions over to stdlib and added some mathematical functions

Signed-off-by: Alexander Skjolden <alex@plastboks.net>