Home Online Manual
Top
Back: Cornacchia
Forward: maximum
FastBack: aksaka_lib
FastForward: crypto_lib
Up: atkins_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.12.2.5 CornacchiaModified

Procedure from library atkins.lib (see atkins_lib).

Usage:
CornacchiaModified(D,p);

Return:
x,y such that x^2+|D|*y^2=p with p prime,
-1, if the Diophantine equation has no solution,
0, if the parameters are wrong selected

Assume:
D<0, D kongruent 0 or 1 modulo 4 and |D|<4p

Example:
 
LIB "atkins.lib";
CornacchiaModified(-107,1319);
==> [1]:
==>    51
==> [2]:
==>    5