Ok, I had too many imodiums by now.

I am going to explain what I am planning to do, so any suggestion will be appreciated.
My project requires me to calculate power factor of an inductive load. I am thinking of getting the values for V & I from the hall effect sensors.
I am still struggling to know how to get value for real power. Once I have these three values, I can calculate the power factor. Now suppose I get the power factor to be 0.4.

How do I calculate Cos-1(0.4) or Sin-1(0.4)? A little starting point with the code will go a long way. Thanks