bugGNU Octave - Bugs: bug #46650, disable warning about division by...

 
 

bug #46650: disable warning about division by zero by default

Submitted by:  Ceral Paquet <octavebugs>
Submitted on:  Thu 10 Dec 2015 11:52:20 AM UTC  
 
Category: InterpreterSeverity: 1 - Wish
Priority: 3 - LowItem Group: Matlab Compatibility
Status: Need InfoAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

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.

John W. Eaton <jwe>
Project Administrator
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?

Rik <rik5>
Project Administrator
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.

Ceral Paquet <octavebugs>
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

Ceral Paquet <octavebugs>
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.

John W. Eaton <jwe>
Project Administrator
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?

John W. Eaton <jwe>
Project Administrator
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.

Mike Miller <mtmiller>
Project Administrator
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.

Ceral Paquet <octavebugs>
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.

Mike Miller <mtmiller>
Project Administrator
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.

Ceral Paquet <octavebugs>
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

Ceral Paquet <octavebugs>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Digest:
   bug dependencies.

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by octavebugs (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Aug 2017 04:51:27 PM UTCmtmillerDependencies-=>bugs #51649 is dependent
    Thu 10 Dec 2015 05:50:20 PM UTCmtmillerSeverity3 - Normal=>1 - Wish
      Priority5 - Normal=>3 - Low
      Release4.0.0=>dev
      Operating SystemGNU/Linux=>Any
      SummaryDon\'t warn about division by zero=>disable warning about division by zero by default
    Thu 10 Dec 2015 04:25:07 PM UTCmtmillerCategoryNone=>Interpreter
      StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1