Hi! I am interested in computing orbits of vectors in a vector space using reflections.
More specifically, the vector space is equipped with a inner product given by a certain Coxeter group (B_4 for those interested...). Then, I compute some image using my defined reflections operation. At some point, I should stumble upon a vector that I've already seen or it's negative, but there is a very small difference between the image and my original vectors. Here is the simplified code: First, the definition of a reflection along a reflection_vector of a vector_reflected: -------------------------------------- sage: def Sigma(reflection_vector,vector_reflected): ... return vector_reflected-2*reflection_vector.inner_product(vector_reflected)*reflection_vector -------------------------------------- Then I define my vector space: -------------------------------------- sage: V=VectorSpace(RR,2,inner_product_matrix=[[1, -sqrt(2)/2], [- sqrt(2)/2, 1]]) -------------------------------------- And here is the computations: sage: a,b = V.basis() sage: r1=Sigma(a,b);r1 (1.41421356237310, 1.00000000000000) sage: r2=Sigma(r1,a);r2 (-1.00000000000000, -1.41421356237310) sage: r3=Sigma(r2,r1);r3 (-6.66133814775094e-16, -1.00000000000000) <---------------------------------------??? Why isn't the first coordinate 0??? In theory it should be... I tried to find where the approximation error comes from, but I wasn't successful! Does someone have an idea?? Thanks! J-P Labbé -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org