Sat 02 Jan 2016 08:18:09 PM UTC, comment #10:
I think we can remove the warning, but maybe we should keep and deprecate the gripe_divide_by_zero function? I don't care that much though. I guess it depends on how friendly we want to be to people who use the Octave libraries outside of Octave.
|
Sat 02 Jan 2016 06:33:28 PM UTC, comment #9:
This is implemented by gripe_divide_by_zero. Can we just remove this completely or do we need to go through a deprecation step and continuing to support this warning for two more releases?
|
Fri 11 Dec 2015 07:35:13 AM UTC, comment #8:
Correction: warning was removed sometime between 2009 and 2011.
http://www.mathworks.com/matlabcentral/answers/12677-dividebyzero-warning-does-not-show-up-when-dividing-by-zero
They also mention the remove of the logofzero warning, which octave doesn't have anyway.
|
Fri 11 Dec 2015 07:24:44 AM UTC, comment #7:
Matlab seems to have removed the warning after R2006b, according to this blog:
http://blogs.mathworks.com/loren/2006/10/18/controlling-warning-messages-and-state/
When I try some things in R2013a it seems the msgid is still valid but the warning is never shown.
>> 1/0
ans =
Inf
>> warning('on','MATLAB:divideByZero')
>> 1/0
ans =
Inf
>> warning('on','MATLAB:divide-by-zero')
Error using warning
Unknown setting or incorrect message identifier 'MATLAB:divide-by-zero'.
>> warning on
>> 1/0
ans =
Inf
>> warning('query','MATLAB:divideByZero')
The state of warning 'MATLAB:divideByZero' is 'on'.
>> 1/0
ans =
Inf
|
Thu 10 Dec 2015 07:39:32 PM UTC, comment #6:
Just to be clear, I'd be glad to see it disappear completely. It's kind of useless anyway, as it only applies to scalar division by zero in the scripting language, not other places where division by zero may occur.
|
Thu 10 Dec 2015 06:52:50 PM UTC, comment #5:
I'm pretty sure that Matlab used to warn by default as well. When did it change? Does it still have the MATLAB:divideByZero warning ID or was that completely eliminated?
|
Thu 10 Dec 2015 05:50:20 PM UTC, comment #4:
I don't personally see much value in debating defaults. The warning is documented and is completely user configurable. I don't think bug reports about changing the default value of something like this that is easily configurable tend to go anywhere, but I'll leave open for other comments.
|
Thu 10 Dec 2015 05:47:15 PM UTC, comment #3:
Hi Mike - yes, it's a defaults issue. On Matlab, there is no warning so people write code in loops like 1/x without bothering to check for 0. In Octave, this barfs out warnings which looks bad and runs slow, so I would go with the warning off as the default.
|
Thu 10 Dec 2015 04:25:07 PM UTC, comment #2:
And that turns off the warning, correct? The warning is on by default but is configurable using that warning ID, I think Octave is doing enough to make it behave how you want.
|
Thu 10 Dec 2015 04:17:45 PM UTC, comment #1:
Just for info, I added
warning("off","Octave:divide-by-zero")
to my .octaverc file to get rid of it.
|
Thu 10 Dec 2015 11:52:20 AM UTC, original submission:
When running some Matlab code in Octave, I get pages of warning about division by zero. Aparently Matlab does not warn about that.
octave:2> 1/0
warning: division by zero
ans = Inf
In Matlab:
>> 1/0
ans =
Inf
|