@@ -218,7 +218,7 @@ cdef class NumberFieldElement(NumberFieldElement_base):
218
218
cdef type t = type (self )
219
219
cdef NumberFieldElement x = < NumberFieldElement> t.__new__ (t)
220
220
x._parent = self ._parent
221
- x.__fld_numerator = self .__fld_numerator
221
+ x._fld_numerator = self ._fld_numerator
222
222
x._fld_denominator = self ._fld_denominator
223
223
return x
224
224
@@ -317,7 +317,7 @@ cdef class NumberFieldElement(NumberFieldElement_base):
317
317
True
318
318
"""
319
319
FieldElement.__init__ (self , parent)
320
- self .__fld_numerator , self ._fld_denominator = parent.absolute_polynomial_ntl()
320
+ self ._fld_numerator , self ._fld_denominator = parent.absolute_polynomial_ntl()
321
321
322
322
cdef ZZ_c coeff
323
323
if isinstance (f, (int , Integer_sage)):
@@ -417,7 +417,7 @@ cdef class NumberFieldElement(NumberFieldElement_base):
417
417
cdef type t = type (self )
418
418
cdef NumberFieldElement x = < NumberFieldElement> t.__new__ (t)
419
419
x._parent = < ParentWithBase> new_parent
420
- x.__fld_numerator , x._fld_denominator = new_parent.polynomial_ntl()
420
+ x._fld_numerator , x._fld_denominator = new_parent.polynomial_ntl()
421
421
x._denominator = self ._denominator
422
422
cdef ZZX_c result
423
423
cdef ZZ_c tmp
@@ -427,7 +427,7 @@ cdef class NumberFieldElement(NumberFieldElement_base):
427
427
for i from 0 <= i <= ZZX_deg(self ._numerator):
428
428
tmp = ZZX_coeff(self ._numerator, i)
429
429
ZZX_SetCoeff(result, i* rel, tmp)
430
- ZZX_rem(x._numerator, result, x.__fld_numerator .x)
430
+ ZZX_rem(x._numerator, result, x._fld_numerator .x)
431
431
return x
432
432
433
433
def __reduce__ (self ):
@@ -966,7 +966,7 @@ cdef class NumberFieldElement(NumberFieldElement_base):
966
966
# set the denominator
967
967
mpz_set_si(denom_temp.value, 1 )
968
968
mpz_to_ZZ(& self ._denominator, (< Integer> denom_temp).value)
969
- for i from 0 <= i < ZZX_deg(self .__fld_numerator .x):
969
+ for i from 0 <= i < ZZX_deg(self ._fld_numerator .x):
970
970
tmp_integer = < Integer> (ZZ.random_element(x = num_bound,
971
971
distribution = distribution))
972
972
mpz_to_ZZ(& ntl_temp, (< Integer> tmp_integer).value)
@@ -977,7 +977,7 @@ cdef class NumberFieldElement(NumberFieldElement_base):
977
977
mpz_set_si(denom_temp.value, 1 )
978
978
tmp_integer = Integer.__new__ (Integer)
979
979
980
- for i from 0 <= i < ZZX_deg(self .__fld_numerator .x):
980
+ for i from 0 <= i < ZZX_deg(self ._fld_numerator .x):
981
981
tmp_rational = < Rational> (QQ.random_element(num_bound = num_bound,
982
982
den_bound = den_bound,
983
983
distribution = distribution))
@@ -992,7 +992,7 @@ cdef class NumberFieldElement(NumberFieldElement_base):
992
992
mpz_to_ZZ(& self ._denominator, (< Integer> denom_temp).value)
993
993
994
994
# now the coefficients themselves.
995
- for i from 0 <= i < ZZX_deg(self .__fld_numerator .x):
995
+ for i from 0 <= i < ZZX_deg(self ._fld_numerator .x):
996
996
# calculate the new numerator. if our old entry is
997
997
# p/q, and the lcm is k, it's just pk/q, which we
998
998
# also know is integral -- so we can use mpz_divexact
@@ -2572,14 +2572,14 @@ cdef class NumberFieldElement(NumberFieldElement_base):
2572
2572
# MulMod doesn't handle non-monic polynomials.
2573
2573
# Therefore, we handle the non-monic case entirely separately.
2574
2574
ZZ_mul(x._denominator, self ._denominator, _right._denominator)
2575
- if ZZ_IsOne(ZZX_LeadCoeff(self .__fld_numerator .x)):
2576
- ZZX_MulMod(x._numerator, self ._numerator, _right._numerator, self .__fld_numerator .x)
2575
+ if ZZ_IsOne(ZZX_LeadCoeff(self ._fld_numerator .x)):
2576
+ ZZX_MulMod(x._numerator, self ._numerator, _right._numerator, self ._fld_numerator .x)
2577
2577
else :
2578
2578
ZZX_mul(x._numerator, self ._numerator, _right._numerator)
2579
- if ZZX_deg(x._numerator) >= ZZX_deg(self .__fld_numerator .x):
2579
+ if ZZX_deg(x._numerator) >= ZZX_deg(self ._fld_numerator .x):
2580
2580
ZZX_mul_ZZ( x._numerator, x._numerator, self ._fld_denominator.x )
2581
- ZZX_mul_ZZ( temp, self .__fld_numerator .x, x._denominator )
2582
- ZZ_power(temp1,ZZX_LeadCoeff(temp),ZZX_deg(x._numerator)- ZZX_deg(self .__fld_numerator .x)+ 1 )
2581
+ ZZX_mul_ZZ( temp, self ._fld_numerator .x, x._denominator )
2582
+ ZZ_power(temp1,ZZX_LeadCoeff(temp),ZZX_deg(x._numerator)- ZZX_deg(self ._fld_numerator .x)+ 1 )
2583
2583
ZZX_PseudoRem(x._numerator, x._numerator, temp)
2584
2584
ZZ_mul(x._denominator, x._denominator, self ._fld_denominator.x)
2585
2585
ZZ_mul(x._denominator, x._denominator, temp1)
@@ -2835,7 +2835,7 @@ cdef class NumberFieldElement(NumberFieldElement_base):
2835
2835
# but may fail if NTL runs out of FFT primes.
2836
2836
x = self ._new()
2837
2837
sig_on()
2838
- ZZX_XGCD(x._denominator, x._numerator, temp, self ._numerator, self .__fld_numerator .x, 1 )
2838
+ ZZX_XGCD(x._denominator, x._numerator, temp, self ._numerator, self ._fld_numerator .x, 1 )
2839
2839
ZZX_mul_ZZ(x._numerator, x._numerator, self ._denominator)
2840
2840
x._reduce_c_()
2841
2841
sig_off()
@@ -5322,7 +5322,7 @@ cdef class OrderElement_absolute(NumberFieldElement_absolute):
5322
5322
cdef OrderElement_absolute x = < OrderElement_absolute> t.__new__ (t)
5323
5323
x._parent = self ._parent
5324
5324
x._number_field = self ._parent.number_field()
5325
- x.__fld_numerator = self .__fld_numerator
5325
+ x._fld_numerator = self ._fld_numerator
5326
5326
x._fld_denominator = self ._fld_denominator
5327
5327
return x
5328
5328
@@ -5443,7 +5443,7 @@ cdef class OrderElement_relative(NumberFieldElement_relative):
5443
5443
cdef OrderElement_relative x = < OrderElement_relative> t.__new__ (t)
5444
5444
x._parent = self ._parent
5445
5445
x._number_field = self ._parent.number_field()
5446
- x.__fld_numerator = self .__fld_numerator
5446
+ x._fld_numerator = self ._fld_numerator
5447
5447
x._fld_denominator = self ._fld_denominator
5448
5448
return x
5449
5449
0 commit comments