# Ticket #9054: trac_9054_doctest-2.patch

File trac_9054_doctest-2.patch, 1.6 KB (added by saraedum, 10 years ago)

fixes hash doctests for 32bit and a random doctest

• ## sage/rings/function_field/function_field.py

```exporting patch:
# HG changeset patch
# User Julian Rüth <julian.rueth@gmail.com>
# Date 1311353240 -7200
# Node ID 7f8cd27c02bd9dab4179c01dc5b011ab5b3ba744
# Parent  6be45617d3fd77916a605eb8c28966f5b47fe201
Trac 9054: fixes doctests

diff -r 6be45617d3fd -r 7f8cd27c02bd sage/rings/function_field/function_field.py```
 a sage: K. = FunctionField(QQ); R. = K[] sage: L = K.extension(y^5 - x^3 - 3*x + x*y); hash(L) 3183366741743088279             # 64-bit ?                               # 32-bit 2003022487                      # 32-bit """ return self._hash sage: K. = FunctionField(QQ); R. = K[] sage: L. = K.extension(y^2 - (x^2 + x)) sage: L.random_element() sage: L.random_element() # random ((x^2 - x + 2/3)/(x^2 + 1/3*x - 1))*w^2 + ((-1/4*x^2 + 1/2*x - 1)/(-5/2*x + 2/3))*w + (-1/2*x^2 - 4)/(-12*x^2 + 1/2*x - 1/95) """ return self(self._ring.random_element(degree=self.degree(), *args, **kwds)) sage: K. = FunctionField(QQ) sage: hash(K) 502145503910697533              # 64-bit ?                               # 32-bit -500688323                      # 32-bit """ return self._hash