I'm trying to find good books on the history of mathematics, dating as far back as possible.
There was a similar question here Good books on Philosophy of Mathematics, but mostly pertaining to Philosophy, and there were no good recommendations on books relating specifically to Math History.
It rather depends on what level you are aiming at. I found Morris Kline's Mathematical Thought from Ancient to Modern Times very impressive.
If you are prepared to stop in the 19th century, I enjoyed A Short Account of the History of Mathematics by W. W. Rouse Ball when I was young, blowing the dust off an inherited copy WWRB had given my grandfather.