|
D.12.2.4 Cornacchia
Procedure from library atkins.lib (see atkins_lib).
- Usage:
- Cornacchia(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:
- 0<d<p
Example:
| LIB "atkins.lib";
Cornacchia(55,9551);
==> [1]:
==> 16
==> [2]:
==> 13
|
|