bugGNU Octave - Bugs: bug #46554, max() does not work intermitted

 
 

bug #46554: max() does not work intermitted

Submitter:  Xuegong Deng <ddeng903>
Submitted:  Fri 27 Nov 2015 02:39:00 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Works For Me Assigned to:  None
Originator Name:  Daniel Open/Closed:  * Closed
Release:  * 4.0.0 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 29 Nov 2015 06:27:11 PM UTC, comment #8: 

max() is a core function used hundreds of times in Octave.  If there were a pervasive problem with it we would know instantly.  I agree that it is most likely caused by either shadowing (a variable or a local file name max.m) or a bad installation.

Try 'which max' to verify that the max() function you are getting is from Octave.  Upload an example of failing code if 'which max' doesn't resolve the issue.


Rik <rik5>
Group administrator
Sun 29 Nov 2015 10:30:19 AM UTC, comment #7: 

From what you showed below (without revealng the values
in the array passed to max()) that your system has not been installed
at all correctly.

A useful next step would be for you to remove all traces of
Octave from your system and reinstall. Be sure to remove
any .octaverc files as well.

Then if the problem still exists, please report what system
type you are using, how the install was done and the complete
set of instructions that you issued from the point of
typing octave to the failure report.

A trace would also help since what you reported shows that
Octave code which has nothing to do with the max() function
is being referenced in your system. This cannot be reproduced
on other installations of Octave.


Michael Godfrey <godfrey>
Group Member
Sun 29 Nov 2015 12:01:48 AM UTC, comment #6: 

It would help if you provided the command that
you used, as requested in comment #1

For example: max([1 2 3 4 1])

Michael Godfrey <godfrey>
Group Member
Sat 28 Nov 2015 10:55:35 PM UTC, comment #5: 

Did you type 'mean' instead of 'max'? That would explain it.

Ceral Paquet <octavebugs>
Sat 28 Nov 2015 12:50:15 AM UTC, comment #4: 

Did you define a function in your program called "max"? Is it defined in your .octaverc startup code? Does the problem go away if you do "clear all"?

Anonymous
Fri 27 Nov 2015 11:38:59 PM UTC, comment #3: 

There was no "max" variable used. The error comes and goes.

Xuegong Deng <ddeng903>
Fri 27 Nov 2015 04:31:53 PM UTC, comment #2: 

Did you accidentally create a variable with the name "max"?

John W. Eaton <jwe>
Group administrator
Fri 27 Nov 2015 02:49:58 PM UTC, comment #1: 

Could you provide a code example that produces the error you observe?

Juan Pablo Carbajal <juanpi>
Group Member
Fri 27 Nov 2015 02:39:00 PM UTC, original submission:  

max() - unstable, sometimes take argument as index, report errors, and sometimes return wrong results.

Checked min(), looks more stable than max(). A very strange implementation. 

Xuegong Deng <ddeng903>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by godfrey (Posted a comment)
  • -email is unavailable- added by octavebugs (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by juanpi (Posted a comment)
  • -email is unavailable- added by ddeng903 (Submitted the item)
  • -email is unavailable- added by ddeng903
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-01 rik5 Open/ClosedOpen Closed
    2015-11-29 rik5 StatusNone Works For Me
    2015-11-27 ddeng903 Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code