| 1 | initial version |
When you write:
sage: f(x)=0^x
You define a "symbolic function":
sage: type(f)
<type 'sage.symbolic.expression.Expression'>
sage: f.parent()
Callable function ring with argument x
This is a kind of mathematical formula (like exp(cos(pi)) + log(x)). This is an object you can derivate, integrate, and so on.
Instead you can define a Python function:
sage: def f(x):
....: return 0^x
sage: f(0)
1
sage: type(f)
<type 'function'>
For such easy-to-define function, you can be shorter, by typing:
sage: f = lambda x : 0^x
sage: f(0)
1
sage: type(f)
<type 'function'>
| 2 | No.2 Revision |
When you write:
sage: f(x)=0^x
You define a "symbolic function":
sage: type(f)
<type 'sage.symbolic.expression.Expression'>
sage: f.parent()
Callable function ring with argument x
This is a kind of mathematical formula (like exp(cos(pi)) + log(x)). This is an object you can derivate, integrate, and so on.
Instead you can define a Python function:
sage: def f(x):
....: return 0^x
sage: f(0)
1
sage: type(f)
<type 'function'>
For such easy-to-define function, you can be shorter, by typing:
sage: f = lambda x : 0^x
sage: f(0)
1
sage: type(f)
<type 'function'>
EDIT
According to your comment, it seems i misunderstood your question. So, the problem is not about evaluating f but about SR(0)^SR(0) being not defined. @kcrisman opened trac ticket 18088.
| 3 | No.3 Revision |
When you write:
sage: f(x)=0^x
You define a "symbolic function":
sage: type(f)
<type 'sage.symbolic.expression.Expression'>
sage: f.parent()
Callable function ring with argument x
This is a kind of mathematical formula (like exp(cos(pi)) + log(x)). This is an object you can derivate, integrate, and so on.
Instead you can define a Python function:
sage: def f(x):
....: return 0^x
sage: f(0)
1
sage: type(f)
<type 'function'>
For such easy-to-define function, you can be shorter, by typing:
sage: f = lambda x : 0^x
sage: f(0)
1
sage: type(f)
<type 'function'>
EDIT
According to your comment, it seems i misunderstood your question. So, the problem is not about evaluating f but about SR(0)^SR(0) being not defined. Thanks for reporting, @kcrisman opened trac ticket 18088.
| 4 | No.4 Revision |
When you write:
sage: f(x)=0^x
You define a "symbolic function":
sage: type(f)
<type 'sage.symbolic.expression.Expression'>
sage: f.parent()
Callable function ring with argument x
This is a kind of mathematical formula (like exp(cos(pi)) + log(x)). This is an object you can derivate, integrate, and so on.
Instead you can define a Python function:
sage: def f(x):
....: return 0^x
sage: f(0)
1
sage: type(f)
<type 'function'>
For such easy-to-define function, you can be shorter, by typing:
sage: f = lambda x : 0^x
sage: f(0)
1
sage: type(f)
<type 'function'>
EDIT
According to your comment, it seems i misunderstood your question. So, Actually, the problem is not about evaluating the symbolic function f but about SR(0)^SR(0) being not defined. Thanks for reporting, @kcrisman opened trac ticket 18088.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.