octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #49832] power operator produces different resu


From: Rik
Subject: [Octave-bug-tracker] [bug #49832] power operator produces different results between Matlab & Octave
Date: Tue, 9 Mar 2021 13:46:19 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36

Follow-up Comment #9, bug #49832 (project octave):

macOS backend library may be slightly different.

I went through the results of the power operator more carefully and I see
these differences (M = Matlab, O = Octave).


1.^NaN = (NaN for M, 1 for O)
0.^-Inf = (Inf for M, NaN for O sometimes when done in matrix operations, but
not for individual operation or scalar-by-matrix)
0.^0 = (1 for M, NaN for O sometimes when done in matrix operations, but not
for individual operation or scalar-by-matrix)
0.^Inf = (0 for M, NaN for O sometimes when done in matrix operations, but not
for individual operation or scalar-by-matrix)
(-eps(0)).^(-Inf) = (Inf for M, NaN for O)
(-eps(0)).^(-realmax) = (Inf for M, NaN for O)
(-eps(0)).^(realmax) = (0 for M, NaN for O)
(-eps(0)).^(Inf) = (0 for M, NaN for O)
(-realmin).^(-Inf) = (Inf for M, NaN for O)
(-realmin).^(-realmax) = (Inf for M, NaN for O)
(-realmin).^(realmax) = (0 for M, NaN for O)
(-realmin).^(Inf) = (0 for M, NaN for O)
-1.^(-realmax) = (1 for M, NaN for O)
-1.^(realmax) = (1 for M, NaN for O)
(-realmax).^realmax = (Inf for M, NaN for O)
(-realmax).^Inf = (Inf for M, NaN for O)
(-Inf) .^ (-Inf) = (0 for M, NaN for O)
(-Inf) .^ (-realmax) = (0 for M, NaN for O)
(-Inf).^0 = (1 for M, NaN for O, but not for individual operator)
(-Inf).^realmax = (Inf for M, NaN for O)
(-Inf).^Inf = (Inf for M, Nan for O)



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?49832>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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