Karim Belabas on Sat, 20 Jan 2024 12:35:45 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: forprimestep 50000 times slower than needed
|
- To: Ilya Zakharevich <nospam-abuse@ilyaz.org>
- Subject: Re: forprimestep 50000 times slower than needed
- From: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
- Date: Sat, 20 Jan 2024 12:35:40 +0100
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1705750542; c=relaxed/relaxed; bh=yndIYmMxrl/+yYLfxNzQNMpzmN6t82eLt9SeSHdJ9gU=; h=DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: Mail-Followup-To:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; b=R+B8fnGeUZwveZPOSDEYiT87vvuYacRXFz2mQDCIwG18pwiYEEjaV8s1/4djSCweW+4AYJpBZzf4dssj3Bql4qaYz3tre0cuH74PpSGqpyY3LsgNGs2SvAypo2MUB0RsL67uE6RReb6prwgbRDp5MoMD/sCrSIMKQV3Pbe7ptzcFqkLoqr3Tys5k3MmxkEKxcKnJa+eA0vuCL0qhiGvAYX25gFtn4bq6vcNSiBe8WMnAerVt62Tvl3e8xpCdJEck+st5nZPLyQSItJtc2rxvetRxuqDYpZlZlJWN17LBpm1O9Z4AG3lWtIVFOSmZAe5+vi84Y7wmCQFgtX7u6nSlkQZvs2cqEt2TGhrerx0Yvpco8jtF7KB/hNI8C0zwK3qIeRJ7fZANkIQJdfKOwyIVEg8NqXVMPcDKz7TiM9ig52mYA6XwhG0OGXzbpeXrMmDf2OCHPV2cFtwKx9CpyhU9DF9AuHOkClXM+NsF9ofYMnXNakUBEJ+6ZFWtOeogh2zjkZ7Rl5QF4sWUFtY3HDAOOdFAH1J2uM1CVL9DoxNcfCZjs6EEsVx2yxHw4bYXuoqB6U7g9jDe3HiQ+GTVVD2gF9k1jyFLgY2uUcxEqDCfYMHX7ofWWqC+fVUgMPsozdpvggYW9ToRNrGOzjDCzkyKo4GoHp61G1onXrVTSHo1TmM=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1705750542; cv=none; b=iAZ+PJRGwopvSXsFQktEfXC2yuP2b/cxLguRwvguBfYTaoI9ww+cS2zo9rKUxNVTFavQNayEoOwIuogbR1nP+YAA78cotXxhVVQbbQVZzDMQOTXGoAjbk9/ktJ6h0eJ7k3t7sVtT+lFpac3xu9TjwtsGuEfoLJRTztTSPtxV/EKKvGc/bG4oTyjF3qtB/BBehblQJfCJXemMVv49zADi+F0PLEXlL3svCg80AJW13Vt9JKULp8SLi60mPE4XEQn5qt+mQlPluqLdCIdhb4wsXC1JiLjTfEjdSi1uorxYPQYz+a6GBgQPVkqjAzYhgOwdf+6BCMTlijitbGMf7Jctcq5xFOzV+uXHEckMiiToEHEWl1vbsaAOFTLlW0zgGMnevOlrZO+++9UHOURmzlmMFUcQaxYm89dkKq3UVT7kMDr8+LIdAO4+8MVRyFAUWNx7UNqpKiDeSaboX1+NUWdxhkd+zkP4tiH/mCapULEFn3kfSa+3bYzm1q3zk5nE4U8EXJIzY3ZB20iLXPEEZ7Nfwj6IPH2r26bj9Y5VE1oKZHHpDL7epjTJNBfXypwexynCtx1Rlgfr0WWGQLYJXYcVk3Asy1TOM+QbcCjdH8kIBkgtrmm2C5dPCALpYt69UDNmQalOMFuIEOdOtGfCKuPdDd67IcaHcCZaI+nip+b4oBo=
- Authentication-results: smail; arc=none
- Cc: Pari Developers Mailing List <pari-dev@pari.math.u-bordeaux.fr>, 2531@pari.math.u-bordeaux.fr
- Delivery-date: Sat, 20 Jan 2024 12:35:45 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1705750542; bh=yndIYmMxrl/+yYLfxNzQNMpzmN6t82eLt9SeSHdJ9gU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pfMf3S6RY5kOfqELpA70PyfA7vL14I+10Lly+y/v6fpwIvUgPKcCxGq8RVBVecimE ev3LMmjSOMuWrv1LQ6soMsr2FUJWSEpoTfSNntN/3fUcq3ly6ectiIXGSiAW0KcQGj 9XBVVbCqJNjDIO6m+DQ1E+O7HxP44piDU5txoXrd9Z51oDKJbkVJRbDzaIPR3I86SB wawqJU+tcfvAISEouaawncLNEGPrDXBVr6zyiZE4KmvJ2Lv0cmjd5pbYWv3OG+ot5G sEMa6GBqWM8ifhS665ohn4GtEXTxhGIwZ+NhFi9T6DI18zL324Dpgn5+1F30coshxD 6oqkGGE0qTiHLADASYesWoITB5MgcIjjYv+l+EFTSXTBbKrUBDEgFYxNuWNGaxncIE S3kbva0rq6e+KUEC9HLsiNRlsvj2N5TyP0AivsUsuTDYCF0nyIS2BQ/FGUU77vWbdI Bw97Riqah0vZtxR0Onr/xYKK2s6iJdYye+N7jRItuXzhxvXnpTab5hf0MWsG+xLYVn TS9kX0Eck5pIR9O6bOfVJ3eLBqOAwWfNan2f+I/kngEeJztF8jhdcsrYYGL6yjlQ+9 anSJbrEImJbwPgn6vOM1R99CUIa3q81A5I7VO47h5wtt8KwA62+uuQKWLsz886o7Wx gup8zpLDIxrPYnnBttspMI9k=
- In-reply-to: <ZasiEPYEP1NlB/ml@login.math.berkeley.edu>
- Mail-followup-to: Ilya Zakharevich <nospam-abuse@ilyaz.org>, Pari Developers Mailing List <pari-dev@pari.math.u-bordeaux.fr>, 2531@pari.math.u-bordeaux.fr
- References: <ZZrb8SIOXs0+jfnF@login.math.berkeley.edu> <CAMLkfFSnA7eLVjt_UAnd4R4LZFPdt5wwisvF+-xBG4xQRMC9fQ@mail.gmail.com> <ZasiEPYEP1NlB/ml@login.math.berkeley.edu>
* Ilya Zakharevich [2024-01-20 02:30]:
> On Sun, Jan 07, 2024 at 10:51:55PM +0100, Loïc Grenié wrote:
> > On a related note, I observe that
> > ? my(n=8);forprimestep(p=nextprime(10^8),10^8+10^n,10^n,print(p))
> > 100000007
> > ? my(n=9);forprimestep(p=nextprime(10^8),10^8+10^n,10^n,print(p))
> > ?
> >
> > while I would have expected both lines to print 100000007.
>
> Oups — I did not recheck this — and I was hit by this bug on “the
> final pre-production step”!!! Fortunately, I had a (vague) memory of
> you reporting this, which helped to reduce debugging to ∼1 hour…
>
> Reported: https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2531
Had analyzed this last week (related to initial value being negative
or becoming negative during the initialization), but hadn't found a
good way to solve it then. Had another go at it today; the problem
should be fixed in master now
? my(n=8);forprimestep(p=nextprime(10^8),10^8+10^n,10^n,print(p))
100000007
? my(n=9);forprimestep(p=nextprime(10^8),10^8+10^n,10^n,print(p))
100000007
? my(p0=1500301459763,step=4907262314955);if(isprime(p0),print("Prime "p0));forprimestep(p=p0,2e14,step,print(p))
Prime 1500301459763
1500301459763
21129350719583
60387449239223
109460072388773
? my(p0=1500301459763,step=4907262314955);if(isprime(p0),print("Prime "p0));forprimestep(p=p0-step,2e14,step,print(p))
Prime 1500301459763
1500301459763
21129350719583
60387449239223
109460072388773
Cheers,
K.B.
--
Pr. Karim Belabas, U. Bordeaux, Vice-président en charge du Numérique
Institut de Mathématiques de Bordeaux UMR 5251 - (+33) 05 40 00 29 77
http://www.math.u-bordeaux.fr/~kbelabas/