Carmack even discusses this on the Lex Fridman podcast. Carmack basically had high school level math around that era and was a voracious reader of every scrap of game programming lore he could find. And outside of it. He is a very intellectually honest guy and it is refreshing to hear him talk about how he worked in those days. I came up similar to Carmack and he is my programming hero, so, I have a lot of admiration for how he managed to do things.