| Karim Belabas on Wed, 29 Nov 2017 21:44:32 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: Segmentation Fault in PARI library related to factoru_pow() |
* Max Alekseyev [2017-11-29 20:40]:
> It was surely my oversight in assuming the wrong type of factoru_pow()'s
> result components. However, I got confused by the "bug in PARI/GP" and
> "please report" message. This made me think that I may be facing a bug
> rather than an error in my program.
Almost all error messages were designed assuming the user was actually
running 'gp' and not a custom program. :-)
And when you get a SEGV in 'gp', it's always a bug worth reporting.
> Btw, speaking about factorization - is there any benefit in
> using factor_pn_1(p,1) to factor p-1 for prime p as compared to
> factor(p-1)?
None whatsoever. That function is a big help when factoring p^n - 1
for large n [ which arises as the cardinal of the multiplicative group of
finite fields ] since it quickly finds special (Aurifeuillean) factors
of Phi_d(p) for suitable d satisfying p | d | n.
Thus, for d = 1, there are no "special" factors...
Cheers,
K.B.
--
Karim Belabas, IMB (UMR 5251) Tel: (+33) (0)5 40 00 26 17
Universite de Bordeaux Fax: (+33) (0)5 40 00 21 23
351, cours de la Liberation http://www.math.u-bordeaux.fr/~kbelabas/
F-33405 Talence (France) http://pari.math.u-bordeaux.fr/ [PARI/GP]
`