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

 
 

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

Submitted by:  None
Submitted on:  Thu 02 Feb 2017 09:21:29 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Other
Status: InvalidAssigned to: None
Originator Name: B. SnoekOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.2.0
Operating System: Microsoft Windows

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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>
Project 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 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 jwe (Posted a comment)
  • -unavailable- added by None (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
    Thu 02 Feb 2017 10:14:17 PM UTCjweStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1