Angle between two vectors: 3D No magnitudes and/or sqrt()

338 Views Asked by At

Hey so I have a very efficient method to calculate the the components (x,y,z) of two vectors, and I want to calculate the angle between them. I am computing this for about 8 million individual entries.

My code is relatively fast, but the limiting point right now is the use of magnitudes, more specifically the sqrt function. I have explored some more efficient methods for computation of the sqrt but I wanted to see if there are more effecient methods unique to computation of the angle between two vectors. If I can be accurate to <1 degree that would be sufficient.