Dear all,

obviously Sage does not distinguish between precisions of power series:

sage: R.<t> = PowerSeriesRing(ZZ)
sage: O(t).is_zero()
True
sage: O(t) == O(t**2)
True

Similarly for p-adics:

sage: O(3).is_zero()
True
sage: O(3) == O(3^2)
True
sage:

This seems to be explicitly intended:


   def __nonzero__(self):
        """
        Return True if this power series is not equal to 0.

        EXAMPLES::

            sage: R.<q> = ZZ[[ ]]; R
            Power Series Ring in q over Integer Ring
            sage: f = 1 + 3*q + O(q^10)
            sage: f.is_zero()
            False
            sage: (0 + O(q^2)).is_zero()
            True
            sage: R(0).is_zero()
            True
            sage: (0 + O(q^1000)).is_zero()
            True
        """
        return not not self.polynomial()

Why?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/10981ee0-efea-4885-850c-7e4dcd0e4d32%40googlegroups.com.

Reply via email to