From 19d09db07e7faf65946282f3e08ad60135d109e3 Mon Sep 17 00:00:00 2001 From: Oscar Smith Date: Sun, 15 Dec 2024 01:22:28 -0500 Subject: [PATCH] fix --- src/Primes.jl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Primes.jl b/src/Primes.jl index b476759..23115bc 100644 --- a/src/Primes.jl +++ b/src/Primes.jl @@ -474,7 +474,7 @@ function find_relations(n::T, factor_base, I) where T nf = Float64(n) sqrtnf = Float64(sqrtn) xsf = LinRange(sqrtnf-I, sqrtnf+I, 2I+1) - bound(i) = exponent(abs(fma(xsf[i], xsf[i], - nf))) + bound(i) = exponent(abs(max(fma(xsf[i], xsf[i], - nf), eps(nf)))) sieve = Float64[bound(i) for i in 1:2I+1] # we can subtract lfb[end] since we know that we have checked for all smaller factors # this helps deal with the fact that we aren't sieving 2s or prime powers @@ -541,7 +541,6 @@ function QSfactor(n::T) where T if factored return only(xs) - isqrt(only(smooth_nums)) end - return # Gausian elimination rprime, marks, rrelations = gaussGF2(relations)