On Fri, 9 Jul 2010, Grigory Sarnitskiy wrote:
Imagine I want to have a function that returns the derivative of real-valued 
function of one real variable, something like

Deriv  : ((Float) -> Float) -> ((Float) -> Float)
As Martin wrote, axiom only handles derivatives of expressions.
In Leibniz' times every function was an expression, nowadays this is not true anymore. In Axiom an object of type Float->Float is a function in the sense of programming, i.e., it takes an object of type float and returns an object of type float.
You can always turn an expression into a function in this sense:
(1) -> y:=sin x + 1

   (1)  sin(x) + 1
                                                    Type: Expression(Integer)
(2) -> function(y,f,x)

   (2)  f
                                                                 Type: Symbol
(3) -> f(u)
   Compiling function f with type Variable(u) -> Expression(Integer)

   (3)  sin(u) + 1
                                                    Type: Expression(Integer)
(4) -> f(1.0)
   Compiling function f with type Float -> Float

   (4)  1.8414709848 078965067
                                                                 Type: Float

regards,
Franz

_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to