mixed type operations in Octave

Jaroslav Hajek highegg at gmail.com
Tue Sep 9 01:23:43 CDT 2008


On Tue, Sep 9, 2008 at 4:18 AM, John W. Eaton <jwe at bevo.che.wisc.edu> wrote:
> On  8-Sep-2008, Jaroslav Hajek wrote:
>
> | Mixed-integer operations are another question. Currently, they're not
> | allowed from within interpreter, but they're implemented in liboctave,
> | using "convert to double, do OP, convert back".
> | The question is, should they be allowed? And if yes, what meaning
> | should they have? If no, they should probably be removed from
> | liboctave, because they apparently consume a not quite negligible
> | amount of compilation time.
>
> Looking at the files like mx-i32-i16.cc, it seems that we only
> instantiate mixed comparison and boolean ops.  These are used in the
> interpreter, and are also allowed in Matlab.
>
> However, we seem to be missing the | and & operators for mixed type
> integer operations.  Oops.
>

What do you mean? int32(1) & int8(2) works, of course, but it does not
do bitwise operation.

> jwe
>



-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


More information about the Octave-maintainers mailing list