[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53128] Warn about implicit casts from int to
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #53128] Warn about implicit casts from int to double |
Date: |
Mon, 12 Feb 2018 14:16:01 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
Follow-up Comment #2, bug #53128 (project octave):
In any case, I believe the reason that Matlab (and, therefore, Octave) treats
mixed double/int operations as int is because a constant like "2" is actually
a double precision object (and it's highly unlikely that's going to change).
So, it would be really inconvenient to not be able to write "some_int8_value *
2" and have the result be double instead of int8.
However, maybe we could have a warning for mixed double/int operations when
the value of the double is not an exact integer. Is that what you are asking
for? Or do you really want a warning for any mixed int/double operations?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53128>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/