This is what I gather as well from a bit of reading. It seems that most innovation in mathematics of the time came from Persian, but obviously this then became part of Islamic empire, and it seems under those for a time they were still friendly to people continuing to learn about and advance those pre-islamic sciences. The Madrasas might have helped fund for further people to learn about and push those sciences, so the institutions put in place during some of the Islamic empires also do seem to have helped invest in them.
> Muslims distinguished disciplines inherited from pre-Islamic civilizations, such as philosophy and medicine, which they called "sciences of the ancients" or "rational sciences", from Islamic religious sciences.[50] Sciences of the former type flourished for several centuries, and their transmission formed part of the educational framework in classical and medieval Islam.[50] In some cases, they were supported by institutions such as the House of Wisdom in Baghdad, but more often they were transmitted informally from teacher to student.
This has to be commended at least, I'm not sure all strongly religious empires supported teaching people non-religious sciences/philosophies and invested in their further study.
> Muslims distinguished disciplines inherited from pre-Islamic civilizations, such as philosophy and medicine, which they called "sciences of the ancients" or "rational sciences", from Islamic religious sciences.[50] Sciences of the former type flourished for several centuries, and their transmission formed part of the educational framework in classical and medieval Islam.[50] In some cases, they were supported by institutions such as the House of Wisdom in Baghdad, but more often they were transmitted informally from teacher to student.
This has to be commended at least, I'm not sure all strongly religious empires supported teaching people non-religious sciences/philosophies and invested in their further study.