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

Submitted by:  Vladimir Markelov <vvm>
Submitted on:  Sat 22 Jul 2017 04:48:28 AM UTC  
 
Category: WarpSeverity: 2 - Minor
Item Group: Source codeStatus: Fixed
Privacy: PublicAssigned to: Vladimir Markelov <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>
Project Administrator
Wed 26 Jul 2017 02:54:24 AM UTC, comment #2:

Sure Mohammad!

I've created a branch here:
https://github.com/VladimirMarkelov/gnuastro-vvm/tree/warp-ui-typo

The commit:
https://github.com/VladimirMarkelov/gnuastro-vvm/commit/6d0c6413957cff4fb0b76b74ad7e1e30769ce939

Vladimir Markelov <vvm>
Project MemberIn charge of this item.
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>
Project 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.

gnuastro\bin\warp\ui.c
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>
Project MemberIn charge of this item.

 

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 makhlaghi (Posted a comment)
  • -unavailable- added by vvm (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
    Wed 26 Jul 2017 11:01:53 AM UTCmakhlaghiStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Sat 22 Jul 2017 09:58:05 AM UTCmakhlaghiStatusNone=>In Progress
      Assigned toNone=>vvm

    Back to the top


    Powered by Savane 3.1-cleanup1