After sleeping on this, I suspect you need to add a design layer to
your code with value procedures expressing Excel versions of all the AI2 trig blocks, for use with radians instead of degrees.
(Excel trig tutorial: Excel Tutorial on Trigonometry)
This would allow direct transliteration of the Excel formulas into AI2
formulas calling the new layer of value procedures.
Here's a package for you ...
Excel_trigonometry.aia (2.3 KB)
This is a trigonometry library for people trying to convert an Excel trigonometry formula to an AI2 trigonometry formula. Everywhere the Excel formula calls a trig function, replace that call in AI2 with a call to the equivalent function in this library. Abe Getzler

