Implemented factorial and log2 + performace