Added math algorithms (simple)