[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-math] if-expression and variables
From: |
Stefan Karrmann |
Subject: |
[Axiom-math] if-expression and variables |
Date: |
Sat, 30 Apr 2011 20:40:28 +0200 |
Dear all,
I'm new to axiom and have a problem with piecewise functions.
test1 (x | x < 10) == 2*x
test1 (x | x < 10) == 5*x^2
test1
->
test1 (x | x < 10) == 2x
test1 (x | ^ x < 10) == 5x
Type: FunctionCalled
test1 y
->
2
5y
I expected something like (if y < 10 then 2*y else 5*y**2).
How is it possible to pass a Variable to a piecewise function respecting
the pieces?
PS: Using a block and => or explicit if-then-else does not help.
--
Kind regards,
Stefan
- [Axiom-math] if-expression and variables,
Stefan Karrmann <=
- Re: [Axiom-math] if-expression and variables, Bill Page, 2011/05/02
- Re: [Axiom-math] if-expression and variables, William Sit, 2011/05/02
- Re: [Axiom-math] if-expression and variables, Bill Page, 2011/05/02
- Re: [Axiom-math] if-expression and variables, Bill Page, 2011/05/03
- Re: [Axiom-math] if-expression and variables, William Sit, 2011/05/03
- Re: [Axiom-math] if-expression and variables, Bill Page, 2011/05/03
- Re: [Axiom-math] if-expression and variables, Ralf Hemmecke, 2011/05/03
- Re: [Axiom-math] if-expression and variables, William Sit, 2011/05/04
Re: [Axiom-math] if-expression and variables, William Sit, 2011/05/02
Re: [Axiom-math] if-expression and variables, Ralf Hemmecke, 2011/05/03