Our modern lives are influenced by algorithms at every step. We can trace this influence back more than 1,200 years ago – to a Muslim mathematician.