I am almost certain it is a bug with Heavy AA shells at this point.
I went through two wars and the years 1940-1966 with Heavy AA shells (in doctrines) turned off as a test, and did not get this error at all. Then I turned them on, the very next two battles every air attack against my ships gave the TAirUnit invalid floating point operation error.
Still not 100% sure though! I'll have to play another campaign and test again.