 He published many works and eventually retired to his native Baza.He spent seven years living in Tlemcen, where he studied under the local Berber scholars, the most important of which was a man named Ibn Zaghu.His works dealt with Algebra and contained the precise mathematical answers to problems in everyday life, such as the composition of medicaments, the calculation of the drop of irrigation canals and the explanation of frauds linked to instruments of measurement.