login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for #150 To create a function from an expresion revision 1 of 1

1
Editor:
Time: 2007/11/17 21:58:32 GMT-8
Note:

changed:
-
I don't now how ...
If I enter:

\begin{axiom}
expr:= 3*x
f(x) == expr
f(5)
\end{axiom}

I get an output of $3x$; I would like an output of  15.
Is there a way to do it right? 



From MartinRubey Thu Apr 28 11:49:58 -0500 2005
From: Martin Rubey
Date: Thu, 28 Apr 2005 11:49:58 -0500
Subject: [#150 To create a function from an expresion]	(new) 
Message-ID: <17009.5116.793917.607691@seam101.local>
In-Reply-To: <20050428111446-0500@page.axiom-developer.org>

\begin{axiom}
)clear all
expr := 3*x
function(expr, f, x)
f(5)
\end{axiom}

Martin


From loli Thu Apr 28 21:53:36 -0500 2005
From: loli
Date: Thu, 28 Apr 2005 21:53:36 -0500
Subject: property change
Message-ID: <20050428215336-0500@page.axiom-developer.org>

Status: open => closed 



Submitted by : (unknown) at: 2007-11-17T21:58:32-08:00 (17 years ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

I don't now how ... If I enter:

fricas
(1) -> expr:= 3*x

\label{eq1}3 \  x(1)
Type: Polynomial(Integer)
fricas
f(x) == expr
Type: Void
fricas
f(5)
fricas
Compiling function f with type PositiveInteger -> Polynomial(Integer
      )

\label{eq2}3 \  x(2)
Type: Polynomial(Integer)

I get an output of 3x; I would like an output of 15. Is there a way to do it right?

fricas
)clear all
All user variables and function definitions have been cleared. expr := 3*x

\label{eq3}3 \  x(3)
Type: Polynomial(Integer)
fricas
function(expr, f, x)

\label{eq4}f(4)
Type: Symbol
fricas
f(5)
fricas
Compiling function f with type PositiveInteger -> PositiveInteger

\label{eq5}15(5)
Type: PositiveInteger?

Martin

property change --loli, Thu, 28 Apr 2005 21:53:36 -0500 reply
Status: open => closed