bugGNU Octave - Bugs: bug #50212, pi is defined as a variable and...

 
 

bug #50212: pi is defined as a variable and can be changed.

Submitter:  None
Submitted:  Thu 02 Feb 2017 09:21:29 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  B. Snoek Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.2.0
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 02 Feb 2017 10:14:17 PM UTC, comment #1: 

"pi" is a function.

You've just defined a variable called "pi" that hides the function.

If you do "clear pi", you'll remove the variable definition and the "pi" will refer to the function again.

This is just the way Matlab and Octave work.  It's not a bug.

John W. Eaton <jwe>
Group administrator
Thu 02 Feb 2017 09:21:29 PM UTC, original submission:  

The value of pi can be changed:

>> pi=2*pi

pi =  6.2832

>> pi

pi =  6.2832

Suggestion: make pi a constant


Anonymous

 

(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 jwe (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    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 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-02 jwe StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code