Ticket #1772: 1772-bug.patch

File 1772-bug.patch, 919 bytes (added by rlm, 12 years ago)

Fixes the one doctest failure in constant.py

  • sage/rings/real_double.pyx

    # HG changeset patch
    # User Robert L. Miller <rlm@rlmiller.org>
    # Date 1200789267 28800
    # Node ID 5d60449e5fe84af7f07bee1fc70a94f3490b8784
    # Parent  a4ef8ad118cbcaaa423ef82ac3123f12f0842b16
    return NaN for RDF itself
    
    diff -r a4ef8ad118cb -r 5d60449e5fe8 sage/rings/real_double.pyx
    a b cdef class RealDoubleField_class(Field): 
    348348            return self(-1)
    349349        raise ValueError, "No %sth root of unity in self"%n
    350350
    351 
     351    def NaN(self):
     352        """
     353        EXAMPLES:
     354            sage: RDF.NaN()
     355            nan
     356        """
     357        return self(0)/self(0)
     358   
     359    def nan(self):
     360        """
     361        EXAMPLES:
     362            sage: RDF.nan()
     363            nan
     364        """
     365        return self(0)/self(0)
    352366
    353367def new_RealDoubleElement():
    354368    cdef RealDoubleElement x