Skip to content

Commit d5511aa

Browse files
author
Release Manager
committed
sagemathgh-41018: Fix some typos in p-adic code and a few other miscellaneous fix. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#41018 Reported by: user202729 Reviewer(s):
2 parents 2982163 + 924cd04 commit d5511aa

File tree

8 files changed

+10
-13
lines changed

8 files changed

+10
-13
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ __pycache__/
157157
# C header generated by Cython
158158
/src/sage/modular/arithgroup/farey_symbol.h
159159
# List of C and C++ files that are actual source files,
160-
# NOT generated by Cython. The same list appears in src/MANIFEST.in
160+
# NOT generated by Cython
161161
!/src/sage/graphs/base/boost_interface.cpp
162162
!/src/sage/graphs/cliquer/cl.c
163163
!/src/sage/graphs/graph_decompositions/sage_tdlib.cpp
@@ -170,7 +170,7 @@ __pycache__/
170170
!/src/sage/rings/bernmm/bern_modp_util.cpp
171171
!/src/sage/rings/bernmm/bern_rat.cpp
172172
!/src/sage/rings/bernmm/bernmm-test.cpp
173-
!/src/sage/rings/padics/transcendantal.c
173+
!/src/sage/rings/padics/transcendental.c
174174
!/src/sage/rings/polynomial/weil/power_sums.c
175175
!/src/sage/schemes/hyperelliptic_curves/hypellfrob/hypellfrob.cpp
176176
!/src/sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_ntl.cpp

src/sage/graphs/base/boost_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ class BoostGraph
241241
try {
242242
boost::dijkstra_shortest_paths(graph, vertices[s], distance_map(boost::make_iterator_property_map(distances.begin(), index))
243243
.predecessor_map(boost::make_iterator_property_map(predecessors.begin(), index)));
244-
} catch (boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::negative_edge> > e) {
244+
} catch (boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::negative_edge> > const&) {
245245
return to_return;
246246
}
247247

src/sage/rings/padics/padic_capped_absolute_element.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ include "CA_template.pxi"
2525
from sage.libs.pari.convert_gmp cimport new_gen_from_padic
2626
from sage.rings.finite_rings.integer_mod import Mod
2727

28-
cdef extern from "transcendantal.c":
28+
cdef extern from "transcendental.c":
2929
cdef void padiclog(mpz_t ans, const mpz_t a, unsigned long p, unsigned long prec, const mpz_t modulo)
3030
cdef void padicexp(mpz_t ans, const mpz_t a, unsigned long p, unsigned long prec, const mpz_t modulo)
3131
cdef void padicexp_Newton(mpz_t ans, const mpz_t a, unsigned long p, unsigned long prec, unsigned long precinit, const mpz_t modulo)

src/sage/rings/padics/padic_capped_relative_element.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ from sage.libs.pari.convert_gmp cimport new_gen_from_padic
2929
from sage.rings.finite_rings.integer_mod import Mod
3030
from sage.rings.padics.pow_computer cimport PowComputer_class
3131

32-
cdef extern from "transcendantal.c":
32+
cdef extern from "transcendental.c":
3333
cdef void padiclog(mpz_t ans, const mpz_t a, unsigned long p, unsigned long prec, const mpz_t modulo)
3434
cdef void padicexp(mpz_t ans, const mpz_t a, unsigned long p, unsigned long prec, const mpz_t modulo)
3535
cdef void padicexp_Newton(mpz_t ans, const mpz_t a, unsigned long p, unsigned long prec, unsigned long precinit, const mpz_t modulo)

src/sage/rings/padics/padic_fixed_mod_element.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ include "FM_template.pxi"
2727
from sage.libs.pari.convert_gmp cimport new_gen_from_padic
2828
from sage.rings.finite_rings.integer_mod import Mod
2929

30-
cdef extern from "transcendantal.c":
30+
cdef extern from "transcendental.c":
3131
cdef void padiclog(mpz_t ans, const mpz_t a, unsigned long p, unsigned long prec, const mpz_t modulo)
3232
cdef void padicexp(mpz_t ans, const mpz_t a, unsigned long p, unsigned long prec, const mpz_t modulo)
3333
cdef void padicexp_Newton(mpz_t ans, const mpz_t a, unsigned long p, unsigned long prec, unsigned long precinit, const mpz_t modulo)

src/sage/rings/padics/padic_floating_point_element.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ from sage.libs.pari import pari
2525
from sage.libs.pari.convert_gmp cimport new_gen_from_padic
2626
from sage.rings.finite_rings.integer_mod import Mod
2727

28-
cdef extern from "transcendantal.c":
28+
cdef extern from "transcendental.c":
2929
cdef void padicexp(mpz_t ans, const mpz_t a, unsigned long p, unsigned long prec, const mpz_t modulo)
3030
cdef void padicexp_Newton(mpz_t ans, const mpz_t a, unsigned long p, unsigned long prec, unsigned long precinit, const mpz_t modulo)
3131

src/sage/rings/padics/transcendantal.c renamed to src/sage/rings/padics/transcendental.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* C helper functions for the computation
3-
* of p-adic transcendantal functions
3+
* of p-adic transcendental functions
44
*
55
*********************************************/
66

@@ -23,7 +23,7 @@ void padiclog(mpz_t ans, const mpz_t a, unsigned long p, unsigned long prec, con
2323
3. we compute each log(1 - a_i*p^(v*2^i)) using Taylor expansion
2424
and a binary splitting strategy. */
2525

26-
unsigned long i, v, e, N, saveN, Np, tmp, trunc, step;
26+
unsigned long i, v, e, N, Np, tmp, trunc, step;
2727
double den = log(p);
2828
mpz_t f, arg, trunc_mod, h, hpow, mpz_tmp, mpz_tmp2, d, inv, mod2;
2929
mpz_t *num, *denom;

src/sage/rings/polynomial/polynomial_rational_flint.pyx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,10 +1502,7 @@ cdef class Polynomial_rational_flint(Polynomial):
15021502
3
15031503
"""
15041504
cdef Integer den = Integer.__new__(Integer)
1505-
if fmpq_poly_denref(self._poly) is NULL:
1506-
mpz_set_ui(den.value, 1)
1507-
else:
1508-
fmpz_get_mpz(den.value, <fmpz *> fmpq_poly_denref(self._poly))
1505+
fmpz_get_mpz(den.value, <fmpz *> fmpq_poly_denref(self._poly))
15091506
return den
15101507

15111508
def _derivative(self, var=None):

0 commit comments

Comments
 (0)