Poor Lifting Method!
/*
======================================================
Title: Solving the X*x-73*y*y=1 equation of the Pell.
======================================================
*/
#include <stdio.h>
#include <math.h>
int main (void)
{
int x, y;
Double T;
for (y=1;y<=10000000;y++)
{
T=1.0+73.0*y*y;
x= (int) sqrt (t);
if ((x<10000000) && (1.0*x*x==t))
printf ("x=%8d y=%8d \ n", x, y);
}
return 0;
}
/*
======================================================
Evaluation:
In fact, it's a poor lifting Method! The key is to choose an intermediate amount so that both X and Y are close to this value, and
We convert the two-dollar equation into Yi Yuanfang! The T in question has the effect of avoiding overflow
Out, causing the wrong solution!
======================================================
*/
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
The basic algorithm of C language 26-Pell equation solution