Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

unable to simplify to float approximation with a gamma function

I'm very new to Sage, so please forgive me if this is a trivial question. I've been trying to specify a function as follows:

p(x,a,b) =  x * math.gamma(a + b)

However, I get the following error message:

TypeError: unable to simplify to float approximation

How do I specify the function p() that contains a Gamma function? I was thinking I could create a Python function (i.e. starting with def(x,a,b)) and then put the code inside the function body, but I have a feeling I'm missing something.