[Not sure if this belongs here or in sage-dev...]
I am trying to implement coercions between algebras that are related by
base change. For example,consider
A=CombinatorialFreeModule(ZZ['x'], ['1','2'])
B=CombinatorialFreeModule(ZZ, ['1','2'])
A.module_morphism(
lambda a: B._from_dict({b: c.s
When I do this:
*H = PermutationGroup([ [(1,2), (3,4)], [(5,6,7),(12,14,18)] ])kH =
H.algebra(GF(2))[a, b] = H.gens()x = kH(a) + kH(b) + kH.one(); print(x)x*x*
I get an error caused by the last computation: "RuntimeError: There is a
bug in the coercion code in Sage." (I was working in Cocal
RDF('0.0') is fine
QQ(RDF('0.0')) is fine
QQ('0') is fine
QQ(0.0) is fine
QQ('0.0') # boom
Any ideas, or should I not expect this to work in the first place?
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop
I assume you meant
sage: v = P(5)
sage: v(oo)
A positive finite number
This is because the elements of QQ coerce to the parent of oo, which
is the "signed infinity ring." This is so we have
sage: P. = PolynomialRing(QQ)
sage: w = x + 5
sage: v = w - x
w(1.0)
6.00
sage: v(1.0)
5.0
I recently sumbled at following behaviour:
sage: P. = PolynomialRing(QQ)
sage: w = x + 1
sage: w(oo)
+ Infinity
sage: v = 5
sage: v(oo)
A positive finite number
This behaviour is strange (altough works as desined). For nonconstant
polynomial it has the same effect as calculating limit, for consta
Hi all,
I'm using Sage-5.13 on Virtual Box 4.3.8 and I want to use the inbuilt
polynomial methods for testing irreducibility, factorizing and homogenizing
polynomials. I know that I need to coerce between univariate and
multivariate polynomial rings to do this, but whenever I try this the image
Hi,
as a newbie I am rather irritated about coercion working in 4.5.2 and
not working in 4.6.
In 4.5.2 the following works nicely and up to expectation
F.=GF(2^4);
for i in range(15):
a = x^i; print a,'with integer representation', int(a);
in 4.6 (on www.sagenb.org) or 4.6.2 I get
1 with in
Hi All,
Can anyone think why my binary install (Sage4.5.2 on Ubuntu10.04)
should start intermittently having a coercion problem "rank =
int(rank) in free_module.py" when I haven't tried to install anything
else in Sage's python or modify Sage itself.
eg. I had:
V = VectorSpace(RR, 2)
v = V([3.0,
On Tue, Dec 8, 2009 at 8:47 AM, Pierre wrote:
> this is definitely a bug, right ?
>
> sage: k= CyclotomicField(4, "i")
> sage: poly= PolynomialRing(k, "x")
> sage: x= poly.gen()
> sage: p= 3; K= NumberField(x^2 - p, "r")
> sage: i= K( k.gen() )
> sage: CDF(i)
> 2.31897834269e-14 - 1.0*I
>
> So i i
this is definitely a bug, right ?
sage: k= CyclotomicField(4, "i")
sage: poly= PolynomialRing(k, "x")
sage: x= poly.gen()
sage: p= 3; K= NumberField(x^2 - p, "r")
sage: i= K( k.gen() )
sage: CDF(i)
2.31897834269e-14 - 1.0*I
So i is converted to roughly -i... which can makes sense as it's just
a c
Hi,
See this:
sage: R.=PowerSeriesRing(QQ)
sage: P.=PolynomialRing(R)
sage: f=(x*t+t^2)/t
sage: f
x + t
sage: P(f)
---
TypeError Traceback (most recent call
last)
...
TypeError: Unable to coer
Hi all,
Is the following missing coercion known? I couldn't find anything on
trac, but there's a lot there related to coercion, so I may have missed it.
sage: a = float(1.0)
sage: QQ(a)
TypeError: Unable to coerce 1.0 () to Rational
Note that the following works:
Does anyone know what's up with this weird error? Sage can multiply a
symbolic variable and a constant of a polynomial ring R but not a
symbolic variable and an element of R.base_ring().
Alex
sage: var('t')
t
sage: K.= NumberField(t^2+2,'a')
sage: R.= PolynomialRing(K)
sage: t*R(a)
a*t
sage: t*
I'm running into a coercion problem. I'm trying to define a class
SteenrodAlgebra (based on the Algebra class); there should be one
Steenrod algebra for each prime number p, and it is an algebra over
GF(p). For example, you can do
sage: A5 = SteenrodAlgebra(5)
sage: A7 = SteenrodAlgebra(7)
I h
Hi:
Possibly this is a problem with coercion but I don't know.
Does anyone know why the following takes so long?
sage: p = 5
sage: F = GF(p)
sage: E. = GF(p^2,"a")
sage: G = GL(2,p)
sage: M = MatrixSpace(E,2,2)
sage: V = VectorSpace(E,2)
sage: g = G.random_element()
sage: v = V([1,a]); v; g; M(
Hi, all,
I do this, and get integers, but the types are rational:
sage: b1=0
sage: b2=2
sage: s=(b1+b2)/2
sage: n=(b1-b2)/2
sage: s
1
sage: n
-1
Then I do this:
sage: xgcd(s,n)
---
Traceback (most recent call last)
"long int too large to convert to int". Seems like a coercion bug?
Regards,
Ifti
===
sage: X = SupersingularModule(17)
sage: M = X.T(13).matrix()
---
Traceback (most recent call
last)
/home/burhanud/ssmod_new/ in
17 matches
Mail list logo