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

| KASH3 Reference Manual

Introduction | Reference Manual | Index

search

### Function

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

### Optional Arguments

Results | elt-ord^rat |  | 1 <= Results <= 2

### Description

<shortdoc> 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. </shortdoc>

### 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