In Mesopotamia the first accounting systems arose out of the need to record and disperse temple commodities. Many of these early accounting scribes were women. As societies became more complex, arithmetical systems developed to accommodate trade, architecture, irrigation, and land division. Math and record-keeping were also necessary for the development of Mesopotamian astrology, which was the genesis for the Greek astrological system we use today. We’re not talking about grade school arithmetic at this point either: Mesopotamians had a base 60 counting system (it eased division), utilized square and cube root tables, calculated compound interest, and (by the later period) could calculate the time of an eclipse to within a few minutes. Both Mesopotamians and Egyptians understood triangular relationships long before Pythagoras, although the Greeks did provide the theorems.