[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #62239] Wrong order of warning information printed from arithmetic_
From: |
Mohammad Akhlaghi |
Subject: |
[bug #62239] Wrong order of warning information printed from arithmetic_binary_int_sanity_check |
Date: |
Sat, 2 Apr 2022 11:17:52 -0400 (EDT) |
Update of bug #62239 (project gnuastro):
Item Group: Source code => Output not reasonable
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #2:
Thanks a lot for reporting this Pedram. The confusion seems to have been
caused by the wording because the warning is correct. Let me explain:
As described in the Reverse polish notation
<https://www.gnu.org/software/gnuastro/manual/html_node/Reverse-polish-notation.html>
section of Gnuastro's book, the "first" popped operand is the one that is
closest to the operator. So for example in "2 3 +", the first popped operand
is 3, and the second is 2.
To discuss more clearly, let me use the same code you sent me privately:
astarithmetic 200 200 2 makenew 5 mknoise-sigma uint16
--output=int-noise.fits
astarithmetic int-noise.fits set-i i i 20000 gt nan where --output test.fits
'20000' will be interpreted as a signed 16-bit integer, and 'int-noise.fits'
is an unsigned integer of the same width. The warning says: "... the first
popped operand has type 'int16' and the second has type 'uint16' ...". So
given the discussion above, the order is correct ;-).
To avoid future confusions, I tried to edit the warning message in Commit
fe81ab192c0
<https://git.savannah.gnu.org/cgit/gnuastro.git/commit/?id=fe81ab192c0>. Let
me know if its still not clear ;-).
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62239>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #62239] Wrong order of warning information printed from arithmetic_binary_int_sanity_check,
Mohammad Akhlaghi <=