Skip to content

Commit 8a1d714

Browse files
committed
Remove redundant numerator/denominator call in padicValuation
We already do this for all valuations already, and this function is called after we split them.
1 parent 07dc69b commit 8a1d714

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

M2/Macaulay2/packages/Valuations.m2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,12 @@ countPrimeFactor (ZZ, ZZ) := (p, x) -> (
223223
)
224224

225225
-- p-adic Valuation valuation construction
226-
-- Allows for inputs to be rationals and computes difference of the
227-
-- valuations for the numerator and denominator
228226
padicValuation = method()
229227
padicValuation ZZ := p -> (
230228
if not isPrime p then error "expected a prime integer";
231229
func := x -> (
232230
if x == 0 then infinity
233-
else countPrimeFactor(p, numerator x_QQ) - countPrimeFactor(p, denominator x_QQ)
231+
else countPrimeFactor(p, x)
234232
);
235233
valuation(func,QQ,ZZ)
236234
)

0 commit comments

Comments
 (0)