Karim Belabas on Sat, 20 Jan 2024 17:08:42 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Bug#2531: the bug in forprimestep()
|
- To: Ilya Zakharevich <nospam-abuse@ilyaz.org>, 2531@pari.math.u-bordeaux.fr
- Subject: Re: Bug#2531: the bug in forprimestep()
- From: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
- Date: Sat, 20 Jan 2024 17:08:37 +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=1705766919; c=relaxed/relaxed; bh=bgOiQa0nkNcRF5f2h0BOGRFuUyPO5a4eH6XBqrAAXnI=; 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=f2l/jzI3flbQi2lovYgZekZgdyW0hyB/bQwwbT+qBXXpwRZXVqEpMBEUUdCUYCzF5nfqH4Eq5NAuvGAjrAdsqMz2YiiHBZRMvtAKDTckyioHU7kGqCyNJdN20znqLv61/wcfH/OJujZXwz02PgTM2R26mz3oEBhaSI+aRO9Q23of61ikmySdcT7XqvZupNc4sjAaN0U1zEMrYlF4NahftRs1ZxDYHw25xWmIiu7MYpGgcDDpqs+M1kjwMBb9LtuPS1Z1ByzKYwL0bUQ8a/lb9L69Ut72ARyZ4CBUtzaZ8OHVuM13gteFOpUem8QaAQl5jQ8lIxI3PslLkokmJh//usX2OU7giwhG9uLlwuHJrfrdyVcuodtNAWEt5RKlwJrGCW1801vUgcR250jgKfR+imOKWAlXGAhdALwXrPfTptT6ICPi3ITqKMJreNCp2d9U31FjOfbFrs5boZO3lr7J9SyQV8OyFvzZlMBAlV4Ej8k2T2n4D7YPf3waW1sPcWNX8P9Q5MqZBe4qrO6rD4ftcc22ERAL1iMAaMKH/JeDQDe5sZghGp/gY8uaSz7yJIZEGDp7Cm18XP+MC/GlOAVL54inaM0kPiXr0/F67td7HakZ8QnxnK9+caRIgkhIKWh/n7Jd1g+ER6811I5EQZoAVcuvAxa9tGX9EjsqueYb0KQ=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1705766919; cv=none; b=1P1X/AahHgJ0Quu9dMkWvcy/h6e1p599+SfSOdCSrb5F0o6ZgV4TtZllTx7A1vkIBtib0PxOuFGK0IQo8f0TUOYmA/d/UVzmti/fQ4YNw6QwlmK+TtNWyC9q8TKqIykkSmEo8FyfbkPE6g7EsnKNv5Esx5hJfbiRROThGJwwn9jF0e6cj41VG3iqydp3vmwE4P8trUd4YEa6jnJHJ3nzCBuO0lpsrkswBY89waM/8qx+4qlBJScgUg930mQwYPxEmsTg+bfnqD98jVBAorO3MkaBq0/0ghQ7T83NM+ktrwnYDT00zDUG98ShMj4fewBibpwI0t24TGZAqy6AlTDReMzys1s+CwFDwgLX94AsPecfty61kvMxWzCH9yOe+LD6YHYnqJugdJ6qlCnJZPLOCFWkrc8N3WxgbbncvL4G70rL4uD9tzfPpXuwso7C/Q/Q1k1g2yublZrWWFxMR/PkVPg92WGJVTh+1eQcSdicYOPiXCDxMa93SLddU8Htgp0yHmdX3luGBnHeFlOj2vg3gZSGy/fiXiao9YzopsIfMt+RwSed7LQrgwHY+hg1p6w9FAgmTzL3PqDwWQ72dIKqAwIX23RYQ0OIuSi0Q4ag+74Qq1mF3x5KU4asigVcMvBtJcbho9TxeKGlE6uv2jt70dbLvoLLfsEnO5sXV6WDNR4=
- Authentication-results: smail; arc=none
- Cc: Pari Developers Mailing List <pari-dev@pari.math.u-bordeaux.fr>
- Delivery-date: Sat, 20 Jan 2024 17:08:42 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1705766919; bh=bgOiQa0nkNcRF5f2h0BOGRFuUyPO5a4eH6XBqrAAXnI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=a0lxSEgBelih10aZlcc2rWyo5NrZkZcJ1QP1UbtCZhacJo1hdU2LDdy3S0Gr4mKq9 8jxGyA7GlwSC7BThw9v/Wgtwz4hftJNgrUCybhAkd536tUxxWimsBON+iaenzIKEbq 2G/JjxEftR5gF3RaFPI39BxUqeNECbn3lBFSk8RrfwBsaWZW+0j2lEZOO5i/MIEIf+ lGXW5Wgs4gMDdnej3BcsOge4FgNYCreVpwBNZedX2rMA9gSxN7/Wb7k9rZ6E6dyrbL FsFIuSH6GDWLBCGIUrZkDmbTK8ynX4FBIG4n3NOO2vxzxpgKICoon+MaPkuW31jUvS di4aIZMYpXhiI0mRxFqvry1DxPV10PrN2FVvu58Xgcj4zBlVpc4jMLnggYaKoiLUNm p7nrtTiBOFrSEKAe6spp2f92OPxjaD4P7GKOcv/llHr7BDeVFu1l5PDfk3Ya2B8Trj 3ytyKqLhp/NZDc+YqSfwxWuwRifTFculWjb26HY/FX1NoWjF0pJWs2l9nWm/W9Bbkb jDabD4hkeykwOK8S0621/QlfbV46yczc9VbqZZgylLUz2Hd+wnX3aml0H4aDostEQG xAthYS++eoTJ90zVvNy9qErp5q/z93uWZoSM64KH60b3XNQXBMpqV3BJ8DEJSUZmLU 4LBOM0R4L3o0P/Feo71bCrOo=
- In-reply-to: <Zau9qH5/E2BsGyN9@login.math.berkeley.edu>
- Mail-followup-to: Ilya Zakharevich <nospam-abuse@ilyaz.org>, 2531@pari.math.u-bordeaux.fr, Pari Developers Mailing List <pari-dev@pari.math.u-bordeaux.fr>
- References: <ZZrb8SIOXs0+jfnF@login.math.berkeley.edu> <CAMLkfFSnA7eLVjt_UAnd4R4LZFPdt5wwisvF+-xBG4xQRMC9fQ@mail.gmail.com> <ZasiEPYEP1NlB/ml@login.math.berkeley.edu> <ZauwDJdAELC00EPo@math.u-bordeaux.fr> <Zascbd0htm7Ag8gD@login.math.berkeley.edu> <Zau9qH5/E2BsGyN9@login.math.berkeley.edu>
* Ilya Zakharevich [2024-01-20 13:48]:
> On Sat, Jan 20, 2024 at 12:35:40PM +0100, Karim Belabas wrote:
> > 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
>
> Millions of thanks!
>
> Can you describe in which contexts this bug is NOT HIT in the old
> code — so one can try to squeeze some use from the production builds?
forprimestep(p = a, b, q or Mod(c,q), ...) was a priori OK if a >= 0 and
a - q >= 0, and q fit in an ulong.
I just improved the implementation to support arbitrary positive q:
(16:59) gp > forprimestep(p=1, oo, 2^128, print(p))
7145929705339707732730866756067132440577
14291859410679415465461733512134264881153
37771342728224169444434581424926271471617
41854731131275431005995076714107490009089
44236707699722000250238698966129867489281
[...]
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/