comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » accuracy problems
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Accuracy problem [message #47938 is a reply to message #19921] Sat, 11 March 2006 22:45 Go to previous messageGo to previous message
kehcheng is currently offline  kehcheng
Messages: 2
Registered: May 2004
Junior Member
A better solution is to use the formula ATAN( NORM(C), TRANSPOSE(A)#B),
where C is A cross B, for the angle between vectors A and B. There is
no need to limit the two arguments of ATAN, and you'll get a much more
accurate result when A and B are almost parallel (or antiparallel).
Example: A=[1.d0,0,0], B=[1.d0,0,1.d-9]. The ACOS formula gives 0.0
for the angle; the ATAN formula gives 1.d-9.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How can I find the central pixel?
Next Topic: Floats

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Dec 02 23:19:58 PST 2025

Total time taken to generate the page: 2.15943 seconds