home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   sci.math.symbolic      Symbolic algebra discussion      10,432 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,437 of 10,432   
   Rosario19 to All   
   Re: [Axiom] define a derivate of one fun   
   26 May 17 07:26:55   
   
   From: Ros@invalid.invalid   
      
   On Thu, 25 May 2017 19:55:25 +0000 (UTC), wrote:   
   >Rosario19  wrote:   
   >> In Axiom is it possible define one derivative function inside one   
   >> function?   
   >>   
   >> as exampl   
   >   
   >> g(f)==( h(y:Float):Float==numeric(eval(D(f(x),x),x,y));h(20))   
   >>   
   >> g(x+->x^2) or g(x^2) not give right return...   
   >   
   >You can not compute defivative of a function (that is code producing   
   >values), only derivatives of expressions.  Now, expression   
   >already contains its variables, so 'D(f(x),x)' is wrong   
   >when   
   >'f' is an expression, you need 'D(f, x)'.   
      
   yes but i thought f could be a function float->float than i understood   
   there is need one expression for doing the derivative not just a   
   function float->float   
   one way of resolve that is passing thru macro the derivative example   
      
   macro g(f)== gg((y)+->eval(D(f,x),x,y))   
   gg(f)==f(20)   
      
   or passing the expression and than compile it as a function   
      
   >Then there is question   
   >of evaluation order, IIUC you first want to get derivative and   
   >then use it in to compute values.  Then there is question of   
   >building new functions inside functions: for that Axiom uses   
   >'+->', see. Chapter 6.17 in Axiom book.  Or you can uses   
   >utilities like 'compiledFunction'.  But '==' inside a function   
   >is not going to work.   
      
   it is possible define one function in one function if all is declared   
   as   
      
   f(x:Float):Float==(etc)   
      
   i have one example in one file...   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca