r/learnprogramming 1d ago

Learning math through programming

Is there any good books or websites out there that teaches math at the trig and beyond level? I tried Google, but didn’t find anything.

I’m fairly experienced at programming, but my advanced math skills have always sucked. I find it hard to stick with the books I’ve tried in the past because I don’t see the immediate benefit. I figure it would help if I tied it to programming projects.

3 Upvotes

7 comments sorted by

2

u/serge-mv 1d ago

I don't know if it will be what you are looking for, but you can try programming some basic computer graphics algorithms, curves, z-buffering, basic AA, some classic computer vision algorithms (homography, edge merge, etc).

2

u/larryburd 22h ago

I ended up finding one book that covers basic math through linear algebra: From Mathematics to Generic Programming by Stepanov & Rose. It walks through the reasoning of each formula and then gives the algorithm in C++ (which isn't too difficult to convert to C).

3

u/serge-mv 20h ago

You can try checking out the book called Hacker's Delight by Henry Warren. It has nothing to do with hacking networks and is using the word "hacker" in the old-fashion term to mean "programmer". It is essentially a math book about low level operations.

1

u/larryburd 14h ago

Sounds fun. Thanks!

1

u/ffrkAnonymous 1d ago

Can you make mario jump in a gravity accurate parabolic arc?

Not really sure about programming teaching math. Usually it's math first, then programming implementation, having the program do the computations.

2

u/Substantial_Ice_311 12h ago

Hm, I don't know what you really mean by "immediate benefit." But why do you want to learn it in the first place if you don't see benefit?

1

u/larryburd 10h ago

I don't think I explained everything very well. I'm sick right now and not thinking straight.

It isn't so much that I don't see the immediate benefit; instead, it's more me getting frustrated when I can't grasp something (specifically, the unit circle and the use of pi in trig). I was hoping that if I could find something that teaches it in programming terms, I would start to understand it.

Ultimately, I want to learn DSA at a more fundamental level and work my way to building embedded systems with C.