[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45387] Matrix Product treats NaN times zero a
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #45387] Matrix Product treats NaN times zero as zero |
Date: |
Tue, 23 Jun 2015 20:44:38 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/600.5.17 (KHTML, like Gecko) Version/8.0.5 Safari/600.5.17 |
URL:
<http://savannah.gnu.org/bugs/?45387>
Summary: Matrix Product treats NaN times zero as zero
Project: GNU Octave
Submitted by: None
Submitted on: Tue 23 Jun 2015 08:44:35 PM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Pete
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 4.0.0
Operating System: GNU/Linux
_______________________________________________________
Details:
Start with this
x1 = [NaN, 2]
y = [0;1]
r1 = x1*y
Result is correct
r1 = NaN
But, if we instead use
x2 = [NaN, 2;1,1]
y = [0;1]
r2 = x2*y
The result is
r2 = [2;1]
which seems wrong (or at least inconsistent with result r1). I would have
expected
r2 = [NaN;1]
which is what Matlab produces.
To summarize,
x1*y = NaN times 0 plus 2 times 1 = NaN
but
x2*y = [NaN times 0 + 2 times 1; 1 times 0 + 1 times 1]
= [2;1]
instead of [NaN;1].
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45387>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45387] Matrix Product treats NaN times zero as zero,
anonymous <=