bugpyFormex - Bugs: bug #36804, vectorPairAngle() may fail with...

 
 

bug #36804: vectorPairAngle() may fail with colinear vectors

Submitted by:  Tran Phuong Toan <phuotran>
Submitted on:  Sat 07 Jul 2012 01:32:40 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Functionality errorStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 10 Jul 2012 09:50:03 AM UTC, comment #3:

OK, Closing the bug.

Benedict Verhegghe <bverheg>
Project Administrator
Tue 10 Jul 2012 08:39:48 AM UTC, comment #2:

It seems to work properly now.

Tran Phuong Toan <phuotran>
Project Member
Sun 08 Jul 2012 09:05:54 AM UTC, comment #1:

Since Revision 2357 the result of vectorPairCosAngle is clipped to the region [-1.0,1.0]. Please check with this (or later) revision whether this problem still occurs. I expect not, because 1.0 is a floating point number that is represented exactly in the binary representation, and even promotion to other data types should keep that correct.

Benedict Verhegghe <bverheg>
Project Administrator
Sat 07 Jul 2012 01:32:40 PM UTC, original submission:

For some colinear vectors v1 and v2, a = vectorPairCosAngle(v1,v2) returns 1.0. In some cases, testing a > 1.0 returns True, probably because of rounding errors (http://mail.scipy.org/pipermail/numpy-discussion/2008-March/032274.html). Therefore, vectorPairAngle(v1,v2) fails since it uses arccos(a).

Using arctan2 solves the problem, but could be less efficient since the dot product and the cross product need to be computed.

Tran Phuong Toan <phuotran>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bverheg (Posted a comment)
  • -unavailable- added by phuotran (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 10 Jul 2012 09:50:03 AM UTCbverhegOpen/ClosedOpen=>Closed
    Tue 10 Jul 2012 08:39:48 AM UTCphuotranStatusNeed Info=>Fixed
    Sun 08 Jul 2012 09:05:54 AM UTCbverhegItem GroupFatal Error=>Functionality error
      StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1