What would Matlab users think of having to learn the habit of putting "." behind their integers in Sage, e.g.?
sage: matrix([[1.,2],[3,4]]).base_ring() Real Field with 53 bits of precision sage: matrix([[1/1,2],[3,4]]).base_ring() Rational Field This would be a possible warning to engineers: "Make sure numbers contain "." even if they are integers, e.g., type 2. instead of 2 when you want the number 2. The reason: Sage is used by many kinds of users. For example, if you type an integer, then Sage may assume that you are interested only in integers and that you want (slow) exact arithmetic. Sage will even reply "False" to [1,2;3,4].is_invertible(). Typing a "." behind your integers makes them into nice fast floating point numbers, so that [1.,2;3,4].is_invertible() does return "True" as expected." Do we have good "introduction to Sage for Matlab users", "introduction to Sage for Maple users", etc.? Those would be a good place for warnings of this form and "good habits". It would be hard to explain in the documentation when to use [[1,2;3,4]] versus "matrix([[1,2],[3,4]])". And if we want a default for [1,2;3,4], would it be QQ or RDF? QQ may become inefficient as numbers become large, but how do we know whether users want exact arithmetic or not? Also, maybe the docstring of "is_invertible" could have a big warning so that people use "is_singular" instead if they are not interested in ZZ, but only in fields. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org