TU-Berlin → Inst. f. Mathematik → Algebra und Zahlentheorie → KASH → Documentation → Reference Manual
KASH3 Reference Manual
search    

Function

RationalReconstruction ( elt-res^rat x ) -> elt-alg^boo, elt-fld^rat

Optional Arguments

Resultselt-ord^rat1 <= Results <= 2

Description

Given an element x of the ring of integers mod M, return true and the unique rational r = (n / d) if such exists with the absolute values of n and d less than or equal to Isqrt(M div 2); return false otherwise.

Examples

x_Z3:=IntegerRing(3); x_a:=Coerce(x_Z3,5); RationalReconstruction(x_a);
Built: Mon Nov 14 21:12:39 UTC 2005 on mack
The KANT Group