axiom-math
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]