[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45945] Missing Matlab's special support for i
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #45945] Missing Matlab's special support for integer literals |
Date: |
Fri, 19 Aug 2016 15:43:38 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0 |
Follow-up Comment #15, bug #45945 (project octave):
Rik and jwe: re your earlier comments about avoiding treating the function
name as a special token, and just looking at the number of digits in the
number, notice what is shown in comment #1. To be Matlab compatible, the
number should be treated as a int64/uint64 constant if and only if it is
appears as the only token within the int64/uint64 function.
Still I'd be curious for some more Matlab testing. WDMD:
@foo/foo.m:
classdef foo < handle
end
@foo/int64.m:
function z = int64(x, y)
disp(class(x));
disp(class(y));
z = y;
end
+mypkg/int64.m:
function z = int64(x)
disp(class(x));
z = x;
end
>> x = foo;
>> y = x.int64(9223372036854775806)
>> mypkg.int64(9223372036854775806)
>> import mypkg.int64
>> int64(9223372036854775806)
%% New session
>> int64 = @abs;
>> int64(9223372036854775806)
>> class(ans)
>> int64(-2)
>> class(ans)
>> fcn = @int64;
>> fcn(9223372036854775806)
>> class(ans)
>> fcn(-2)
>> class(ans)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45945>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45945] Missing Matlab's special support for integer literals, Ernst Reissner, 2016/08/18
- [Octave-bug-tracker] [bug #45945] Missing Matlab's special support for integer literals, Ernst Reissner, 2016/08/18
- [Octave-bug-tracker] [bug #45945] Missing Matlab's special support for integer literals,
Mike Miller <=
- [Octave-bug-tracker] [bug #45945] Missing Matlab's special support for integer literals, Mike Miller, 2016/08/19
- [Octave-bug-tracker] [bug #45945] Missing Matlab's special support for integer literals, Ernst Reissner, 2016/08/19
- [Octave-bug-tracker] [bug #45945] Missing Matlab's special support for integer literals, Mike Miller, 2016/08/19
- [Octave-bug-tracker] [bug #45945] Missing Matlab's special support for integer literals, Ernst Reissner, 2016/08/19
- [Octave-bug-tracker] [bug #45945] Missing Matlab's special support for int64/uint64 integer literals, Mike Miller, 2016/08/22
- [Octave-bug-tracker] [bug #45945] Missing Matlab's special support for int64/uint64 integer literals, John W. Eaton, 2016/08/22
- [Octave-bug-tracker] [bug #45945] Missing Matlab's special support for int64/uint64 integer literals, Amro, 2016/08/23
- [Octave-bug-tracker] [bug #45945] Missing Matlab's special support for int64/uint64 integer literals, Amro, 2016/08/23
- [Octave-bug-tracker] [bug #45945] Missing Matlab's special support for int64/uint64 integer literals, Amro, 2016/08/23
- [Octave-bug-tracker] [bug #45945] Missing Matlab's special support for int64/uint64 integer literals, Mike Miller, 2016/08/23