bugJACAL symbolic mathematics program - Bugs: bug #17704, function definition doesn't...

 
 

bug #17704: function definition doesn't "see" all bound variables

Submitter:  None
Submitted:  Mon 11 Sep 2006 08:44:53 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  jaffer
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 23 Sep 2009 05:50:27 AM UTC, comment #1: 

FWIW, it looks like this is still happening in 1c1.

Wim Lewis <wiml>
Mon 11 Sep 2006 08:44:53 PM UTC, original submission:  

For example, defining a funcion to return one of the roots of a quadratic equation,

qf(a,b,c) := ( -b + (b^2 - 4*a*c)^(1/2) ) / (2*a);

and then applying it, the variables inside the root do not get bound to the lambda's arguments. Example (using outgrammar standard):

e1 : qf;
qf: lambda([@1, @2], (%i ((- b^2) + 4 a c)^(1/2) - @2)/(2 @1))

e1 : qf(p,q,r);

e1: ((- q) + %i ((- b^2) + 4 a c)^(1/2))/(2 p)

e2 : qf(1,0,0);

e2: %i ((- b^2) + 4 a * c)^(1/2)/2


JACAL's behavior seems to be the same in 1b5 and 1b6 wrt this problem.

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 jaffer (Updated the item)
  • -email is unavailable- added by wiml (Posted a comment)
  •  

    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 logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-10-12 jaffer Assigned toNone jaffer
    2006-09-11 wiml Carbon-Copy- Added wiml

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code