News for hackers. Stuff that matters.
Re:From Philosophy to Program Size (2003) by Asooka on Friday February 10, 2017 @08:30AM (#13615199)
You can use a LUT, but that's not required to define sin and cos. You can define them perfectly fine as

sin(kπ) = 0 sin(kπ + ½π) = (-1)^k cos(kπ) = (-1)^k cos(kπ + ½π) = 0 dsin/dx = -cos dcos/dx = sin

Sine and cosine are the only smooth continuous functions that are solutions to that system of equations. There are also numerous geometric ways to define them. That's what's meant by "understanding". If all you had was the LUT and no other way to compute the value of sine, then you don't really understand what sine is.

Re:From Philosophy to Program Size (2003) by waynecolvin on Friday February 10, 2017 @04:03PM (#13618863)
Table lookup is a common solution when a FPU isn't available and speed is a higher priority than accuracy.

I've actually used formulas for trig functions before with IEEE double floating-point until the accuracy didn't improve.

(think it was a continued fraction or or some other technique I didn't understand, didn't -lm or something for builtin functions and worked around it lol...)

It was very slow! Makes your computer's fan spin faster, even changes the smell in the room while grinding away!