[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #10288] Implementation of Matlab function
From: |
Nicholas Jankowski |
Subject: |
[Octave-patch-tracker] [patch #10288] Implementation of Matlab function tensorprod |
Date: |
Mon, 24 Oct 2022 10:32:42 -0400 (EDT) |
Follow-up Comment #7, patch #10288 (project octave):
in matlab, A and B are restricted to singles and doubles. isnumeric allows
ints to pass as well. is that behavior desired? (I originally thought it would
be best to use isfloat() to check that, but now I can't of a case where two
ints would cause problems. Adding and multiplying should still result in an
int at output. What about if the types are mixed? would we want it to convert
to double and output the actual result, or preserve the int class and at some
point along the way truncate the results?
since this would be a superset of what matlab does, there's no immediate
compatibility concern with the choice. In the interest of avoiding any output
ambiguity, I would suggest issuing a warning and promoting the int to (double
or single) if A and B are not both int, then carrying on with the normal
calculations. (assuming we don't want to just limit to type float)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/patch/?10288>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-patch-tracker] [patch #10288] Implementation of Matlab function tensorprod, Kasper H. Filtenborg, 2022/10/20
- [Octave-patch-tracker] [patch #10288] Implementation of Matlab function tensorprod, Kai Torben Ohlhus, 2022/10/21
- [Octave-patch-tracker] [patch #10288] Implementation of Matlab function tensorprod, Nicholas Jankowski, 2022/10/21
- [Octave-patch-tracker] [patch #10288] Implementation of Matlab function tensorprod, John W. Eaton, 2022/10/21
- [Octave-patch-tracker] [patch #10288] Implementation of Matlab function tensorprod, Kasper H. Filtenborg, 2022/10/22
- [Octave-patch-tracker] [patch #10288] Implementation of Matlab function tensorprod, Nicholas Jankowski, 2022/10/23
- [Octave-patch-tracker] [patch #10288] Implementation of Matlab function tensorprod, Kasper H. Filtenborg, 2022/10/23
- [Octave-patch-tracker] [patch #10288] Implementation of Matlab function tensorprod, Kasper H. Filtenborg, 2022/10/23
- [Octave-patch-tracker] [patch #10288] Implementation of Matlab function tensorprod,
Nicholas Jankowski <=
- [Octave-patch-tracker] [patch #10288] Implementation of Matlab function tensorprod, Nicholas Jankowski, 2022/10/24
- [Octave-patch-tracker] [patch #10288] Implementation of Matlab function tensorprod, John W. Eaton, 2022/10/24
- [Octave-patch-tracker] [patch #10288] Implementation of Matlab function tensorprod, Markus Mützel, 2022/10/24
- [Octave-patch-tracker] [patch #10288] Implementation of Matlab function tensorprod, Nicholas Jankowski, 2022/10/24
- [Octave-patch-tracker] [patch #10288] Implementation of Matlab function tensorprod, Kasper H. Filtenborg, 2022/10/27