Hacker News new | past | comments | ask | show | jobs | submit login

Lovely. In about 1974 I was paid to write a function, in IBM 360 assembly language, to compute square roots. I was asked to make it as efficient as possible. I was in my last year as an undergraduate student. I used a Chebyshev approximation for the initial guess (after scaling the input to lie between 0 and 1), and then used two (or was it three) unrolled iterations of Newton's method to get the solution. First money I ever received for writing code!



love this -- still recall how eye-opening my first course was on numerical solving and appreciating for the first time yet again the sheer potential of compute


Any good books on this?


Robin Green has some excellent material on the subject, which I am linking below.

Faster Math Functions:

https://basesandframes.files.wordpress.com/2016/05/fast-math...

https://basesandframes.files.wordpress.com/2016/05/fast-math...

Even faster math functions GDC 2020:

https://gdcvault.com/play/1026734/Math-in-Game-Development-S...


I am working on one with some more modern suggestions on polynomial approximation, but I think it's still at least 3-6 months away.


Nice! Any way to subscribe for updates?


twenty years back, numerical analysis or numerical methods or sometimes numerical optimization are good keywords for current trending texts on Amazon etc [1]

alternatively subset of the numerical analysi wikipedia page or these algorithms in the book is a good seed filter [2]

ideally covers some linalg like gaussian elim, power method, newton's root finding dynamic, and issues like approximating by discretization, recursion to reduce solve iterations, and things like convergence due to numerical instability due to IEEE 754 fp16 limits etc

1. https://en.wikipedia.org/wiki/Numerical_analysis

2. https://chatgpt.com/share/67002e8c-c5c4-8008-83f9-a6ebc603ad...





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: