bugGNU Astronomy Utilities - Bugs: bug #51536, Suspicious assignment


You are not allowed to post comments on this tracker with your current authentication level.

bug #51536: Suspicious assignment

Submitter:  Vladimir Markelov <vvm>
Submitted:  Sat 22 Jul 2017 04:48:28 AM UTC
Category:  Warp Severity:  2 - Minor
Item Group:  Source code Status:  Fixed
Privacy:  Public Assigned to:  vvm
Open/Closed:  Closed

Wed 26 Jul 2017 11:01:53 AM UTC, comment #3: 

Thanks a lot Vladimir, it has been pushed to main repo.

Mohammad Akhlaghi <makhlaghi>
Group administrator
Wed 26 Jul 2017 02:54:24 AM UTC, comment #2: 
Vladimir Markelov <vvm>
Sat 22 Jul 2017 09:58:05 AM UTC, comment #1: 

Thanks a lot Vladimir for noticing this, you are correct, this is a bug (typo).

Usually, its the first dimension that can have the opposite direction and that was the main motivation behind this correction (for the first dimension).

To be general, I also added a similar correction for the second dimension for completeness if such a case happens. But I missed this typo. Since I hadn't tested it on any actual dataset, I didn't notice it.

Could you make the correction commit?

Mohammad Akhlaghi <makhlaghi>
Group administrator
Sat 22 Jul 2017 04:48:28 AM UTC, original submission:  

Looking source code I found a strange ternary operator. I would have fixed it if I had been sure 100%.
So, I just add a bug and a person who knows algorithm better will fix it.

line #521

x[3] = w[3]>0 ? 1.0f : 1.0f;   /* Has to be positive. */

Both cases are the same. Looking at line #518 and taking into account that the condition is the opposite I suppose the correct line should be

x[3] = w[3]>0 ? 1.0f : -1.0f;   /* Has to be positive. */

I can be wrong.

Vladimir Markelov <vvm>


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

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Posted a comment)
  • -email is unavailable- added by vvm (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-07-26 makhlaghi StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2017-07-22 makhlaghi StatusNone In Progress
        Assigned toNone vvm

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code