Ticket #6329: trac_6329.2.patch

File trac_6329.2.patch, 812 bytes (added by was, 10 years ago)

apply only this one

  • sage/rings/rational.pyx

    # HG changeset patch
    # User William Stein <wstein@gmail.com>
    # Date 1314077422 25200
    # Node ID ab82c416eb7d302225283f10b9579fb91285a721
    # Parent  b2c0ed2e09a453751e4b2fe092667487f530eac3
    sage converts rationals to Magma incorrectly
    
    diff --git a/sage/rings/rational.pyx b/sage/rings/rational.pyx
    a b  
    670670            sage: n._magma_init_(magma)
    671671            '-485/82847'
    672672        """
    673         s = self.numerator()._magma_init_(magma)
    674         if not self.is_integral():
    675             s += '/' + self.denominator()._magma_init_(magma)
    676         return s
    677 
     673        return self.numerator()._magma_init_(magma) + '/' + self.denominator()._magma_init_(magma)
     674   
    678675    property __array_interface__:
    679676        def __get__(self):
    680677            """