Bill Allombert on Tue, 21 Nov 2023 14:22:02 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: sqrt(x,n) for non-prime n?
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: sqrt(x,n) for non-prime n?
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Tue, 21 Nov 2023 14:21:53 +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=1700572914; c=relaxed/relaxed; bh=eqXXaQvACpQTUsIYuVvneNhedISff2mFgsKQ6np05Yw=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=sUQJqpw5VuI1w/gjyr0is92fgXgRJMqs2o2dn3etH5BPyNd0GXDw4wudpKAflyX+M4jndIykvfHxtmYmWB0qn+AGeiNKbRnFuqlF5n72zTWLNqXmIe1ccUuxp4Mke6eJUJ6UYE4i3+a7UYSFlOTfaZLGRjPzSZBJVb5B05zEq64BgNS7t1Qzls+c2hOsmY3mDQOFn22ziFvVaTRsR7bTpLdJrYm1xOfcN4NOpYiRToIVG+f+XyPOxb1ZyF2QLJJ4WylLpok1dqWXEgEKeE+Aw/HRIIZMFhiH0YrayM7FOAqqxknvAZ5fcCGxsQaD6GCpXHLWDigdxWQkHKOHvRWbvYNCtABSLsSoWjJ1cYQT2rOJt3kj7nL/Z26Gm+3KAcaKeNYeBZ5d5pSHo+22EIpnNosDDLJX92oDvtWxP8paQRtcTRaaWJBzMcZuMq7QCz1S4AVDxw+mCB0ZRzX5TVdoeYyOSZ3fGtK7LXYCFGijv2yAD4NLIsTrJiBlgRV9xk+fsHXyduqZhHFa2mqH75B4CP2+2Ail+fBmWea/vTrJVyi46j63QrPYGYso1nBYHTHvYAJsnmrtYpDbljuia9bzNZCM6GiXxQXGlURgv1RmczDaR5Jce7CTARBnQRIU4GGKm99SlvHE3YDKtMoXurMU/jD329JNRkKTXZlWDF85UUk=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1700572914; cv=none; b=gkYjv5WLzbpyTMteKQhLmJOzBNgRcRMne/1eR5r+uWzmOcVBENeOzrPUYrZ/qxDk67lU3UPgvixdresTG3CISDyRlOwX7v66HYO2yQinYat/KnIq8o1cT2FjyTUdtGmefa7zTtXo5iKNUxHHRXWJ/KI5MrfewGsVtflLMO0se/YKtyePHiMgIL0EwWwLF0/2zBFQI0+UaLd5oDICb0iA/9d/EghhCXXUqmmcitdhSOJHSAxEaH4PXjADqU12IXHlzRGcfJ+3w/RDzhYBT2IdcSSKuuBdpCB8rwZ/HKJjHvhBA0juM3fjwWB96J3aEPl75bok2WVB1Al8YiZ7mdEeCcRti4DmMjcKRHgBni63wXqeNgY4bty872M2zC6Sc59dsC8NLsN9g3Q/Sc6ncfm/nFcwpnK1rCo3Q2D422sqVD6NBPmu5Cwjq6DT6Z++u8gJPV9eKEGKM/a08nVwvow+TfeTaozKjahBwPwzpXr17i52nn4H/3nF3oD8UCYDRy2ciAxzw+pNZHzxBr+D2s4FnvbZvFLrc4hP3xS+DN2kSmcUSl529OLOBzB9LdN2z81G9friebpw3OLMoALIQNpQeFVGs8Ks6eBjmIPVdIbvrmgTc1H3E29AIAa0W5rBB3KGZhuJ1LNQHnV365KtG8FD3u3u8P0gZAhbEytqnvJrvSg=
- Authentication-results: smail; arc=none
- Delivery-date: Tue, 21 Nov 2023 14:22:02 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1700572914; bh=eqXXaQvACpQTUsIYuVvneNhedISff2mFgsKQ6np05Yw=; h=Date:From:To:Subject:References:In-Reply-To:From; b=IUegdosEXrMlIPyZX9d54JzM9St0JXZ/7lCLeaSRdAqaqRyq2P13E7igDoVneydXa hYKD226p9U8fUfGfa9rM6qXK5OhhVsDDKkiBLx60vQc4pzoW1dqh0tnij7/6aU260a 8CwbKEngZEtz6NaFPyCOIIEgROfOhh8pcx0y/MdNYURi+lsMmmPSsGoiql5Pu9HCEb VdWzpK2oNI6RGyD3FW6eyCWR+7pXMvJTZuEd4VuWv7DUIGVWSJsvvMCSUksJko/DDo GJU4sd8iGyFz2IG3t9YOcRk6Y2RCkbIBkyivMlfbaAMdEhpJZKxA2Nj2jM2i0bdj7s f+F5iCj8noTMkx+roNw2Jzmosf4srouTUbSO+8G0qnMPjK5lKlhewoZdqdR6Ze/9KC wVbYtQq3DYG2tRZD5IrjB1jA3eObg49cBtlvziBGNfscJDkENMfe7p+IO2gMnOP9Jd u/utI+y3Ngkcno1YqcD/2FU1/Jc2/Pzsc3N0cWttFbrb1CUSA13eq3khf6G6+Q0FZC htVwhyXs++l3w+IBbEkOHpZ+XJOfi9WbBumbbZow2J8ES3BzWx9wjHfay2ezJnnFEe wr4qIiRC84XBPTlCm8W/ZHy49b1l8YGqImahAZfXo6YwspXYObOvAEdDWVQJwrJuc3 CEjFR373MAm0U5SDRzX7czRI=
- In-reply-to: <568168ea458df688f419ca9967be8edf@stamm-wilbrandt.de>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <568168ea458df688f419ca9967be8edf@stamm-wilbrandt.de>
On Tue, Nov 21, 2023 at 09:35:53AM +0100, hermann@stamm-wilbrandt.de wrote:
> Modular sqrt does not work with non-prime modulus:
>
> ? sqrt(Mod(-1,125))
> *** at top-level: sqrt(Mod(-1,125))
> *** ^-----------------
> *** sqrt: not a prime number in sqrt [modulus]: 125.
> *** Break loop: type 'break' to go back to GP prompt
> break>
Indeed, but you can do
? issquare(Mod(-1,125),&z)
%3 = 1
? z
%4 = Mod(57,125)
The problem is that when given Mod(a,b) we do not want to have to test b for primality
each time...
Cheers,
Bill.