From 7f2d945bf2827bd55739987138eb338e8127b17d Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 28 Oct 2024 21:45:14 +0800 Subject: [PATCH] Fix Ginac cast error ../src/sage/symbolic/ginac/upoly-ginac.cpp(219): error C2440: '': cannot convert from 'size_t' to 'GiNaC::numeric' ../src/sage/symbolic/ginac/upoly-ginac.cpp(219): note: 'GiNaC::numeric::numeric': ambiguous call to overloaded function --- src/sage/symbolic/ginac/upoly-ginac.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/symbolic/ginac/upoly-ginac.cpp b/src/sage/symbolic/ginac/upoly-ginac.cpp index b51ec3be8f8..3c45c686e82 100644 --- a/src/sage/symbolic/ginac/upoly-ginac.cpp +++ b/src/sage/symbolic/ginac/upoly-ginac.cpp @@ -216,12 +216,12 @@ std::pair quo_rem(const ex &a, const ex &b, const ex &x, bool check_args) } for (size_t i=0; i(i))); if (avec.size() > bdeg) avec.resize(bdeg); for (size_t i=0; i(i))); return std::make_pair(add(qvec), add(avec)); } @@ -565,7 +565,7 @@ ex parfrac(const ex & a, const ex & x) return a; size_t expo = ex_to(ee).to_int(); for (size_t j=1; j<=expo; ++j) { - ex eee = power(e.op(0), numeric(j)); + ex eee = power(e.op(0), numeric(static_cast(j))); factor.push_back(eee); cofac.push_back((facmul/eee).expand()); } @@ -582,7 +582,7 @@ ex parfrac(const ex & a, const ex & x) return a; size_t expo = ex_to(facmul.op(1)).to_int(); for (size_t j=1; j<=expo; ++j) { - ex ee = power(facmul.op(0), numeric(j)); + ex ee = power(facmul.op(0), numeric(static_cast(j))); factor.push_back(ee); cofac.push_back((facmul/ee).expand()); }