0/0 is not always consider as Nan

Bug #128479 reported by flo
4
Affects Status Importance Assigned to Milestone
scilab (Ubuntu)
Invalid
Undecided
Brian Murray

Bug Description

Hi

I wrote a scilab function wich create vector with several terms are the result of the division 0/0. Sometimes scilab allow to do this operation and this terms are Nan. Thus I can use functions like nanmean. But sometimes scilab say error division by 0. I don't know why whith the same code and the same parameters, scilab don't have the same reaction. If someone know how make scilab to consider 0/0 as a Nan, please help me.

Thanks

Flo

Revision history for this message
Brian Murray (brian-murray) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in recently. We were wondering if this is still an issue for you? Thanks in advance.

Revision history for this message
Brian Murray (brian-murray) wrote :

We are closing this bug report as it lacks the information, described in the previous comments, we need to investigate the problem further. However, please reopen it if you can give us the missing information and feel free to submit bug reports in the future.

Revision history for this message
Sylvestre Ledru (sylvestre) wrote :

Hello

I am part of the Scilab team. Could you provide some code which reproduce the problem ?

thx

William Grant (wgrant)
Changed in scilab:
status: Invalid → Incomplete
Revision history for this message
Brian Murray (brian-murray) wrote :

We are closing this bug report as it lacks the information, described in the previous comments, we need to investigate the problem further. However, please reopen it if you can give us the missing information and feel free to submit bug reports in the future.

Changed in scilab:
status: Incomplete → Invalid
Revision history for this message
robartsd (robartsd) wrote :

I think the user who submitted this bug is unaware of the ieee() function.

Use ieee(0) to make division by zero an error.
Use ieee(1) to be warned when dividing by zero.
Use ieee(2) to silently allow division by zero.

If division by zero is not an error x/0 yeilds:
%nan if x=0
%inf if x>0
-%inf if x<0

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.