Max Alekseyev on Wed, 07 Aug 2024 23:01:07 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: bnfisintnorm/bnfisnorm and availability of units |
* Max Alekseyev [2024-08-06 19:06]:
> Hello,
>
> I'm puzzled by the code example quoted below. Why does bnfisintnorm()
> run fine, but bnfisnorm() complains about missing units?
> I'd assume that units are a prerequisite for both these functions, but it
> turns out not to be the case.
Indeed (and as the error message indicates): in the generic case,
- units are *not* a prerequisite for bnfisintnorm().
- units *are* a prerequisite for bnfisnorm().
> Do I miss something here?
Why not use
b = bnfinit(x^2 - s, 1);
? The construction bnfinit(,1) may be slower in general; but it's much safer.
In any case, when you run into an error anyway, there are two options
1) try it :-), or 2) increase the working precision. Both methods have
pros and cons.
Cheers,
K.B.
>
> Regards,
> Max
>
> ===
> ? s=216145205;
> ? b=bnfinit(x^2-s);
> ? bnfisintnorm(b,s-1)
> %4 = [-411706627786612628571*x - 6052860449312256784985647,
> -411706627786612628571*x + 6052860449312256784985647]
> ? bnfisnorm(b,s-1)
> *** at top-level: bnfisnorm(b,s-1)
> *** ^----------------
> *** bnfisnorm: precision too low in makeunits [cannot get units, use
> bnfinit(,1)].
> *** Break loop: type 'break' to go back to GP prompt
> break>
--
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/