On Dec 24, 2012, at 3:59 PM, Charles Bouillaguet wrote:

> Hi,
> 
> By the way, I realized that membership in RDF and CDF is completely broken:
> 
> sage: vector( [1, 2, sqrt(-1)] ) in RDF^3
> True       # o_O
> 
> sage: R.<x> = QQ[]
> sage: vector( [1,x] ) in CDF^2
> True       # O_o

This happens because

<free_module.py> :

class RealDoubleVectorSpace_class(FreeModule_ambient_field):
….
def coordinates(self,v):
       return v

Membership testing relies on the coordinates() method complaining when the 
argument is not in the free module. Any reason why there is this special 
"coordinates" method in RealDoubleVectorSpace_class instead of the "normal" one 
that checks its argument? Performance reasons maybe? Anyone cares if this 
method checks its argument? (btw this coordinates method does not accept the 
"check" flag it is supposed to accept by inheriting from the parent classes…)

Charles

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to