up previous next
RatReconstructByLattice    --    rational reconstruction from modular image


Syntax
RatReconstructByLattice(X: INT, M: INT): RECORD
RatReconstructByLattice(X: INT, M: INT, threshold: INT): RECORD

Description
Same as RatReconstructByContFrac but with a different underlying heuristic algorithms, based on 2-dimensional lattice reduction.

Example
/**/  X := 3333333333;
/**/  M := 10^10;
/**/  RatReconstructByLattice(X,M);
record[ReconstructedRat := -1/3, failed := false]

/**/  X := 3141592654;
/**/  M := 10^10;
/**/  RatReconstructByLattice(X,M);
record[failed := true]

See Also