On a similar subject I recall Concrete Mathematics by Donald Knuth being my favourite book from school.
Concrete Mathematics
Ronald L. Graham, Donald E. Knuth, and Oren Patashnik
Concrete Mathematics
Ronald L. Graham, Donald E. Knuth, Oren Patashnik
4 readers recommend it across 3 discussions
Reader recommendations
After reading all the comments I am sharing my choices 1. The foundations of mathematics by Stewart and Tall 2. Problem Solving Strategies by Arthur Engels 3. Journey into Mathematics by Rotman 4. Concrete Mathematics by Knuth et al.
Also recommended in this reply
The other benefit is that all of the AoPS books have extremely complete solutions manuals so you'll get immediate feedback on the quality of your solution, or you can just look if you've been banging your head against something for a while. Solutions manuals are the autodidact's best friend. Other high quality books with complete solutions included or in separate solutions manuals include Spivak's Calculus, Hubbard and Hubbard's Vector Calculus, Tenenbaum and Pollard's Ordinary Differential Equations (a really cheap Dover text from the 60s!), and Knuth et. al's Concrete Mathematics. Going through the AoPS books and the above will give you an extremely solid foundation to learn any further math you might need as a software engineer as needed. If you have a career spanning 3-4 decades, spending a few years mastering this material can be extremely useful.
Also recommended in this reply
I'm starting to learn CS all over again at the old age of 40, and had the pleasure to rediscover mathematics thanks to: - Discrete Mathematics with Applications, by Susanna Epp, or - Discrete Mathematics and Its Applications, by Kenneth Rosen (both have the same content, choose the style that you prefer), and - Concrete Mathematics, by our lord and savior Donald Knuth. I don't plan on reading TAOCP anymore as I would be dead by the time I finish reading everything else, but those introductory books are very good for beginners.
Also recommended in this reply