Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Peter Vanroose <Peter.Vanroose@es...>  20011109 17:44:49

> > No, it is just acos( a.b / ab ), which is in general a complex > > number. > > How is acos( complex ) defined? Such a function does not exist in vcl, > so the template instantiations for vnl_vector<complex> fail. Since cos(complex) is well defined ( cos(a+ib) = cos(a)*cosh(b)  i sin(a)*sinh(b) if I did not make a mistake) also acos(complex) is well defined, e.g. by using the (Taylor) series expansion. I don't have an implementation at hand. And it's indeed a rather unusual function. We could of course decide to ensure it is defined in vcl, but that would probably not really be ANSI conformant. > > acos( a.b / ab ) cannot be correct since then the angle between > > (1,0) and (1,1) would be 45 degrees instead of 135 degrees. > > Certainly, for realvalued vectors. However, for complexvalued > vectors, perhaps it is "good enough"? No: it should be defined consistently for real and complex arguments. Doing it like this would not be consistent. Peter. 