bugGNU Octave - Bugs: bug #47106, finding values in a vector with...

 
 

bug #47106: finding values in a vector with for-loop and if-statement

Submitted by:  santico jinotir <sanjin>
Submitted on:  Wed 10 Feb 2016 02:16:31 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: InvalidAssigned to: None
Originator Name: sanjinOpen/Closed: Closed
Release: 3.8.2Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Wed 10 Feb 2016 02:52:18 AM UTC, comment #1:

Thanks for taking the time to file a report, but this is not a bug, this is normal floating point precision at work.

Compare the results with your definition

and this one

And use this code to show the values of the elements that are not exactly what you think they are:

This is also documented in the manual: https://www.gnu.org/software/octave/doc/interpreter/Ranges.html

Mike Miller <mtmiller>
Project Administrator
Wed 10 Feb 2016 02:16:31 AM UTC, original submission:

Hello,

I am having problems finding values in a vector using a for-loop and an if-statement. I think this is a bug.

When I run the for loop below the if-statement does not find the value x=2.8 or x=2.4 and others...

*I am running openSUSE 13.2
*Octave version 3.8.2.
*Octave was configured for "x86_64-suse-linux-gnu"

santico jinotir <sanjin>

 

(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

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by sanjin (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 10 Feb 2016 02:52:18 AM UTCmtmillerStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1