Bill Allombert on Thu, 21 Dec 2023 11:46:30 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Precision too low in bnfisprincipal
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: Precision too low in bnfisprincipal
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Thu, 21 Dec 2023 11:46:14 +0100
- Delivery-date: Thu, 21 Dec 2023 11:46:31 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1703155576; bh=kECkx7aK+X4nF0P9Bn52pPkA6WaX9J/3a9wRPZ7KHrY=; h=Date:From:To:Subject:References:In-Reply-To:From; b=ZqOsJGIqVRQT4y8qJN8U4j6yXwhO6uNok545fQfj0zs7kRj7vbbZDqplgTM33Jw8E mQ4A2TIyQBvyCHNYGpqe6hMQIGt5gaXI8DOBkn/jsINCeqa8t/fOwgeWfmRGqQ7pfi 12Y0Zby+zVr6UABO9HWz/JwvdEPENmqG+d1QqGPjGk+t7PaVEdrrIvaXqEqRi9nxDd lcOos8EVxK2shxAXET/lsVWA+ZNILuP0M0P48kiWW8ejNZ+ES0lJdr7iv5qkoLdpRo FmIjm5O6Geu+KHBSMrPY3o2FHEWJiKpyoP4OLwKgsj7goWbvyKQrdwhhg2Gc6ySGIc 8ir82VckX+oBygLwnBCBAPE8kbGKsUqkAxaKtubAv3uWijLz1IpDdddBwR4ChCCkNT sfUR9eb5MV9TOzl1RMQu2kbPPzharam3XCo128DLxZiUBmyxkjSWWICQPi1igkNzhE X+T3NSuwNK8Adlp3EmmozFUlOo6lYLJZKy3I0q9RiDE0MlI4mkomfnJLc3qNilYRW9 Ip75Rm8wun1CU3Z78w7Ypu4K8ATxoGdmWqvquEigNb64vKKvFZqpTl3sI9+mm7Eh9N lj9ShhGYXnr2H+p4a6qKdUQqX4mjhd46bp2dZ/vRUs4+z8FqD5ZsOUxE26BISxsQaX e/YnrIAA7rjo1+Kyqhy8Sq5I=
- In-reply-to: <af09ebcb-cb70-442a-8914-6dc3b1733e67@gmail.com>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <876001f1-a74b-43f0-83bf-7184209ec44c@gmail.com> <af09ebcb-cb70-442a-8914-6dc3b1733e67@gmail.com>
On Thu, Dec 21, 2023 at 07:02:45AM +0000, Gareth Ma wrote:
> Sorry, I accidentally hit sent. Here is the code and output again:
>
> ? \p 20000
> ? bnf = bnfinit(x^2 + 199, flag=1);
Please do not write 'flag=', just bnfinit(x^2 + 199,1) is better,
this avoid creating a global variable flag that will cause problem later.
> ? bnfisprincipal(bnf, bnf.gen[1] ^ 9)
You cannot use ^ this way, because this compute the power of the HNF matrix,
and not the ideal.
? nfisideal(bnf, bnf.gen[1] ^ 9)
%2 = 0 \\ not an ideal!
Use instead idealpow(bnf, bnf.gen[1], 9)
Just doing
? bnf = bnfinit(x^2 + 199, 1);
? bnfisprincipal (bnf,idealpow(bnf,bnf.gen[1],9))
%2 = [[0]~,[22,1]~]
works fine.
Cheers,
Bill.