News for hackers. Stuff that matters.
Re:Donut.c Without a Math Library by segfaultbuserr on Friday January 15, 2021 @06:02AM (#25789412)
> So, how do we get sines and cosines without using sin and cos? [...] So we don’t need to track the angle at all, we only need to start at cos=1, sin=0 and rotate a circle around the origin to generate all the sines and cosines we need.

It's the main idea of the classic CORDIC algorithm (as mentioned by the author), used to be the most popular way to implement sin() and cos() on early underpowered calculators. https://en.wikipedia.org/wiki/CORDIC#Rotation_mode

Re:Donut.c Without a Math Library by blue-dragonfly on Friday January 15, 2021 @01:40PM (#25794446)
Blinn's classic paper "How many ways can you draw a circle?" seems relevant (discusses CORDIC):

https://ieeexplore.ieee.org/document/4057251