octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Operations with int and single


From: John W. Eaton
Subject: Re: Operations with int and single
Date: Tue, 18 Sep 2012 12:01:24 -0400

On 18-Sep-2012, Israel Herraiz wrote:

| Excerpts from John W. Eaton's message of Tue Sep 18 17:15:41 +0200 2012:
| > Seriously though, I think the reason is because no one has implemented
| > the warnings yet.  Do you want the warnings?  Would you like to work
| > on implementing them?
| 
| Yes. Any hint about where to start? I have been having a look, and I
| believe the warning should be inside "do_binary_op" in
| libinterp/octave-value/ov.cc

Either that or in each function that implements a mixed type
operation.  I'm not sure what is better.  I might do it in the
individual functions since I don't like the idea of checking for
specific types in the generic do_binary_op function.  But inserting
the warning in a lot of functions is messy.  So, I would probably just
not warn.  What's the harm?

| Please excuse if my question seems silly, but the same happens when
| mixing ints and singles/doubles, isn't it? My point was that given
| that the behavior was implemented for singles, the same reasoning
| could be used to justify the implementation for other int classes.

Yes, the same happens for mixed int/double and int/single operations.
But there, compatibility made the priority higher for implementing
mixed int/double operations, and mixed int/single is not much
different from mixed int/double, so those were done too.

| I don't have a very strong motivation for this.

I think you've found the reason that no one else has done this job.
It's just not that important and no one else has been motivated to do
it either.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]