I think there's a special operation called "function" that does it correctly
(1) -> exp (-x)
- x
(1) %e
Type: Expression Integer
(2) -> function(%,'f,'x)
(2) f
Type: Symbol
(3) -> f
(3) f x == exp(- x)
Type: FunctionCalled f
(4) -> f a
Compiling function f with type Variable a -> Expression Integer
- a
(4) %e
Type: Expression Integer
On Monday 06 October 2008, Martin Rubey wrote:
> Martin Rubey <[EMAIL PROTECTED]> writes:
> > At least, it seems to me that from a user's perspective
> >
> > f: EXPR INT -> EXPR INT := x +-> res
> >
> > and
> >
> > f: EXPR INT -> EXPR INT := x +-> exp(-x)
> >
> > are equal. I'll look a little more into it.
>
> Oh no, they are not!!! Sorry about my confusion:
>
> (2) -> deq := differentiate(y x, x) + y x
>
> ,
> (2) y (x) + y(x)
>
> Type:
> Expression(Integer) (3) -> res := first(solve(deq, y, x).basis)
>
> - x
> (3) %e
> Type:
> Expression(Integer) (4) -> f: EXPR INT -> EXPR INT := x +-> res
>
> (4) theMap(*1;anonymousFunction;0;frame0;internal)
> Type: (Expression(Integer) ->
> Expression(Integer)) (5) -> f a
>
> - x
> (5) %e
> Type:
> Expression(Integer)
>
> So, my problem actually has nothing at all to do with eval! Happy again.
>
> Martin
>
>
>
> >
>
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star.
> ________________________________________________________________________
________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---