Correct way to store 360 doubles that need to be read fast on Arduino Nano

J-M-L:
Your equation feels weird. Are you taking the root square of a possibly negative number (after t seconds, w.t will be above PI/2 and your cos() is negative)

Seems also you have plenty of free time since you use delay for hundreds of ms...
Use millis and non blocking code and you have plenty of time to do the maths... see blink without delay

Thank you that's a great tip. The value for w= 0.0000000001 or something. It's going to take a while for a full revolution. The first value is about 320 and after an hour the last value is about 280. It's not going to be nagative any time soon