Changeset 7443:10ffb2e25cf6


Ignore:
Timestamp:
12/01/07 05:09:30 (5 years ago)
Author:
mabshoff@…
Branch:
default
Tags:
2.8.15.alpha0
Message:

fix odd mismerge with the minkowski bound patch (#1107) - very, very odd

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sage/rings/number_field/number_field_base.pyx

    r7437 r7443  
    159159            return d * n.factorial() / (n**n)             
    160160         
    161     def signature(self): 
    162         """ 
    163         Return (r1, r2), where r1 and r2 are the number of real embeddings 
    164         and pairs of complex embeddings of this field, respectively. 
    165         """ 
    166         raise NotImplementedError 
    167  
    168     def degree(self): 
    169         """ 
    170         Return the degree of this number field. 
    171         """ 
    172         raise NotImplementedError 
    173  
    174     def discriminant(self): 
    175         """ 
    176         Return the discriminant of this number field. 
    177         """ 
    178         raise NotImplementedError 
    179  
    180     def minkowski_bound(self): 
    181         r""" 
    182         Return the Minkowski bound associated to this number field. 
    183  
    184         EXAMPLES: 
    185         The Minkowski bound for $\QQ[i]$ tells us that the class 
    186         number is 1: 
    187             sage: K = QQ[I] 
    188             sage: B = K.minkowski_bound(); B 
    189             4/pi 
    190             sage: B.n() 
    191             1.27323954473516 
    192  
    193         We compute the Minkowski bound for $\QQ[\sqrt[3]{2}]$: 
    194             sage: K = QQ[2^(1/3)] 
    195             sage: B = K.minkowski_bound(); B 
    196             16*sqrt(3)/(3*pi) 
    197             sage: B.n() 
    198             2.94042077558289 
    199             sage: int(B) 
    200             2 
    201  
    202         We compute the Minkowski bound for $\QQ[\sqrt{10}]$, which 
    203         has class number $2$: 
    204             sage: K = QQ[sqrt(10)] 
    205             sage: B = K.minkowski_bound(); B 
    206             sqrt(10) 
    207             sage: int(B) 
    208             3 
    209             sage: K.class_number() 
    210             2 
    211  
    212         The bound of course also works for the rational numbers: 
    213             sage: QQ.minkowski_bound() 
    214             1 
    215         """ 
    216         _, s = self.signature() 
    217         n = self.degree() 
    218         d = self.discriminant().abs().sqrt() 
    219         from sage.functions.constants import pi 
    220         if s > 0: 
    221             return d * (4/pi)**s * n.factorial() / (n**n) 
    222         else: 
    223             return d * n.factorial() / (n**n)             
    224          
Note: See TracChangeset for help on using the changeset viewer.