Bill Allombert on Sun, 19 Nov 2023 19:47:35 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: foursquares.gp
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Sun, 19 Nov 2023 19:47:05 +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=1700419629; c=relaxed/relaxed; bh=mzT2GPJdjlRFagFM6yIhiCFUKmRJEXKq10EdymHX3fc=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=M8sRrfEo0OInf6C9gUyfDz+Q/hH74fHeXGN6rmn8+DiNAvmVKo00Du3QYQrccIkK1iHHzZeQJSh7dYo4suXFTC/mwoQ6jtNQ2A0bqL7hCHN/pwbDij4MX65pwre7NWHnxgCIeHMLT+0MabeujzMUK5JrV7dOMgHMTIwTf4yYGlc9jMGMORYZaMjc+J4L2JYQ7NZHnjau5oOPkeF0Jih9nCOI1/oHrXIKGsFBIxGMQPobFGIqMzPuX0EhXlueviFAFqLmFXOR6aIrFiTsCP9p7Objb+ui7h/U3zs7zJL3z163VR4TkfcdVfaaU1tR28T6Cpjrw2dPiJ4Bo1DkHbXIXGqXkC8UJxAXibr07Kqw8cG3ntAEDJmn7H/IwcdtcO8b+xwxWRgN74Jq/yiGgVAdWvnc8dgFovDO2IlExStKaTE41OBWv9UrG/ycXbiXjOoxC1vsQ3ithO25RnYmukDdK26UnqguxfRoEpGLco6msg5BAoXkN9g8nYVnaC1zHruHGHVR3vbLW0f1EEDKPaJ+KJ6k5ZnjBHIT7UhYmANdcIv2ne5amIJNTY+aOsnheb61B8fiLugAO5J2ezOX2UKpYlBW7mDSgW5/Y+xYDGNm64TXPHNvsly+nf9XToTHKWiaWgrrD9M9QQsL5VaIQ2a6NwskCpD1svBabuwfFmq+Uyc=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1700419629; cv=none; b=cCPcfhHaTCcCcipq5v5BlQvZrvt/xG8q//sbST9DETft891FCjcJEOu+z4GuwFmUuLpKyVNbTrzkElPtr3a0JVsHOryRM5uWwfX9kc2eBujq7DR/WHuJ+a/qzJ8+CZNAfhF+b+/rsAiY/6rw23CMIdg3MS3Y4TbhWQcD7QSiEMHwnukRHRT6oOM9QG+zfVRFF6uIn8Ck76z9Nl65vTo4Pi6cMhP/KPlxSD5nSP8uVcDdg4icxxQDFZCYib6UKjyqJmu1OZlSYhOQ+4tNxsNOWZk1If2pIWQOsKFtTFPM/V6GZK9Q/6M/Vlhz2khqs53IlsE4tXr/aLnJgpGr1Go4h9+iGpcbcZBWVuTvgbPzAVZOTHp5ojfNJ+b4SIn82668mspS6KaUyWD0LalCKGIWN4cb9eaWh0jHo61F1b5IHnsD2yZh5UmyMJDSP2sbUHWXIgsZQPWJ/DgWkf2lyP6e3CQg0epHcYuTT2WbvPmldpWdbbi60uimXESZHtzQELpg/kQk0DXb06YZnoh5/NlqNcG9lNg3t88RkbnpLo9TAxWfUQcMo8gkv5LFEx00iz+qPcCSibRlw0vIJykWM71BB1gvpZ819wrTqbWOrVI25LUkZ9ipQC8ppmt6M9vG5F4wkD/4KXO0uD9Ul3rO+npYAugLqN6axlUx89DkcyLl/DM=
- Authentication-results: smail; arc=none
- Delivery-date: Sun, 19 Nov 2023 19:47:35 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1700419629; bh=mzT2GPJdjlRFagFM6yIhiCFUKmRJEXKq10EdymHX3fc=; h=Date:From:To:Subject:References:In-Reply-To:From; b=t3TtYZTeWpCjL9QSywYDqoXHkYxACGjwcalvE804zBxkRSJDsl/IS2Mj5jMBv9S4T WsBtVdmH7ogjinone1f+n5VG145x2NAbeE0H1B9OGPlBsqzSd4Uxj42FnmIpnIKUGr ZLKXRfDgtBg3kYKgBnczb7n09vokiv2J0lQUstAbruMBoM/W8eGpwzGMuXpmaoG4jL JIVGJtHnb1oeB3tvUKtXn9n229aAh5b9dRR5qRi1aSY3SZkJNLGiAkyMezwscmwdDv 5pzIcNwlsCpFdRxxW/4uguSHuvCB0UblmWF2dmOXnikK3T8y0ZK2QeDmLtcqu0Ue2M 1Vk8i+vOLb8LtGTtEWSGaLjTl5Gl+THcHx1w1doqpTtBEa9n93q0hieA7S3gy2c/kt EIQllQBDttrup/BOs7Vomd52d3f4lt4EsVV39ZSyASieVx2xQnkDjskfAAY8NMsGRd UBAlXL3OtRIqoW13AMJJaeU23QYLzXlnn8J4rgy2ReSQnX7qAvrWr7ac1/jQBqxdFg HJ78+0R1ovmfI8tdx2ovFF/AjDpOqoUeiK+23LNm6g85rfvBD6EJvToLTn07U5CNnz oOrOK+bWVkGWHHGD/lYEEnESVaE4zsZsjr0UEeDWgOb4hSMFKNuAMEbwU12gmtGdjD kAdSXyda5NSworKFXtLxsGO8=
- In-reply-to: <9f3ceb4dd16ab8f28ff25aacdb3e0523@stamm-wilbrandt.de>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <207df5ff21dfc8de891eabc538a770c5@stamm-wilbrandt.de> <9f3ceb4dd16ab8f28ff25aacdb3e0523@stamm-wilbrandt.de>
On Sun, Nov 19, 2023 at 06:29:33PM +0100, hermann@stamm-wilbrandt.de wrote:
> Bill,
>
> foursquares() does not only have a runtime problem for going direction of
> largest Mersenne prime.
> It did use 10.5GB RAM short before end of 12:11h run:
>
>
> Since when applying "foursquares()" to a Mersenne prime we know that the
> first "is_fact()" call is true ...
>
> ? isfact(2^756839-1)
> 1
> ? ##
> *** last result computed in 1h, 12min, 11,683 ms.
This is the cost of checking that 2^756839-1 is prime...
> ? sq=foursquares_fact(2^756839-1);
> *** at top-level: sq=foursquares_fact(2^756839-1)
> *** ^----------------------------
> *** in function foursquares_fact: abs(
> *** qfsolve(matdiagonal([1,1,1,1,-n]))[1..4])~
> *** ^------------------------------------------
> *** qfsolve: the PARI stack overflows !
> current stack size: 15000002560 (14305.117 Mbytes)
> [hint] you can increase 'parisizemax' using default()
>
> *** Break loop: type 'break' to go back to GP prompt
> break>
>
>
> How can it be that computing "sq=foursquares(2^756839-1);" worked (which
> calls foursquares_fact()), and calling
> it directly fails?
The algorithm is randomized. Also it is wasting a bit of memory.
If you find an example which is faster to reproduce, I can improve that.
Cheers,
Bill