[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #43551] Matlab incompatibility for gamma funct
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #43551] Matlab incompatibility for gamma function for negative integer arguments |
Date: |
Fri, 07 Nov 2014 16:37:26 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.0 |
Follow-up Comment #2, bug #43551 (project octave):
The example that resulted in someone pointing out the change to me was one in
which gamma(x) was in the denominator of an expression inside a summation.
Previously, these terms were then zero and not causing trouble. With the new
behavior, they are NaN and cause trouble because then the summation is NaN as
well.
If we choose Inf as compatible with Matlab and perhaps more useful, then I
think we can still treat -0 specially.
One more question: what is the purpose of the lines
if (xisinf (result) && (static_cast<int> (gnulib::floor (x)) % 2))
result = -octave_Inf;
now? Given the current checks at the top of the function, is this condition
ever met? And why would we make the result negative only at odd values?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43551>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #43551] Matlab incompatibility for gamma function for negative integer arguments, John W. Eaton, 2014/11/06
- [Octave-bug-tracker] [bug #43551] Matlab incompatibility for gamma function for negative integer arguments, Rik, 2014/11/07
- [Octave-bug-tracker] [bug #43551] Matlab incompatibility for gamma function for negative integer arguments,
John W. Eaton <=
- [Octave-bug-tracker] [bug #43551] Matlab incompatibility for gamma function for negative integer arguments, Rik, 2014/11/07
- [Octave-bug-tracker] [bug #43551] Matlab incompatibility for gamma function for negative integer arguments, John W. Eaton, 2014/11/07
- [Octave-bug-tracker] [bug #43551] Matlab incompatibility for gamma function for negative integer arguments, John W. Eaton, 2014/11/07
- [Octave-bug-tracker] [bug #43551] Matlab incompatibility for gamma function for negative integer arguments, Michael Godfrey, 2014/11/07
- [Octave-bug-tracker] [bug #43551] Matlab incompatibility for gamma function for negative integer arguments, Rik, 2014/11/07
- [Octave-bug-tracker] [bug #43551] Matlab incompatibility for gamma function for negative integer arguments, Michael Godfrey, 2014/11/08
- [Octave-bug-tracker] [bug #43551] Matlab incompatibility for gamma function for negative integer arguments, Rik, 2014/11/12