/* ============================================================== */ /* file: ezgcd.dem */ /* execution Ok, up to the command commentified : <--------- loop! loop! */ /* Very long or loop, I don't know ? Is it due to GC problem ??? */ NOLABELS:TRUE$ TIME:ALL$ /* THIS IS THE RUN FOR CASE 1 OF EZ GCD PAPER. */ D:RAT(U+Y+1,Y)$ F:(-2+D)*(U+Y+2)$ G:D*(U^2-3*U*Y^2-1)^2$ EZGCDSWITCH:TRUE$ GCDSWITCH:FALSE$ GCD(F,G); EZGCDSWITCH:FALSE$ GCD(F,G); GCDSWITCH:TRUE$ GCD(F,G); D:RAT(A+U+Y+1,Y)$ F:(-2+D)*(A+U+Y+2)$ G:D*(U^2-3*U*Y^2-1)^2$ EZGCDSWITCH:TRUE$ GCDSWITCH:FALSE$ GCD(F,G); EZGCDSWITCH:FALSE$ GCD(F,G); GCDSWITCH:TRUE$ GCD(F,G); D:RAT(B+A+U+Y+1,Y)$ F:(-2+D)*(B+A+U+Y+2)$ G:D*(U^2-3*U*Y^2-1)^2$ EZGCDSWITCH:TRUE$ GCDSWITCH:FALSE$ GCD(F,G); EZGCDSWITCH:FALSE$ GCD(F,G); GCDSWITCH:TRUE$ GCD(F,G); D:RAT(C+B+A+U+Y+1,Y)$ F:(-2+D)*(C+B+A+U+Y+2)$ G:D*(U^2-3*U*Y^2-1)^2$ EZGCDSWITCH:TRUE$ GCDSWITCH:FALSE$ GCD(F,G); EZGCDSWITCH:FALSE$ GCD(F,G); GCDSWITCH:TRUE$ GCD(F,G); /* THIS IS THE RUN FOR CASE 2. TABLE 1 OF EZ GCD PAPER */ N:2$ D:Z^N+Y^N+1$ F:RAT(D*(Z^N+Y^N-2))$ G:RAT(D*(Z^N+Y^N+2))$ EZGCDSWITCH:TRUE$ GCDSWITCH:FALSE$ GCD(F,G); EZGCDSWITCH:FALSE$ GCD(F,G); GCDSWITCH:TRUE$ GCD(F,G); N:3$ D:Z^N+X^N+Y^N+1$ F:RAT(D*(Z^N+X^N+Y^N-2))$ G:RAT((Z^N+X^N-Y^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