struct_cont_frac_state_t Struct Reference

An ad-hoc structure for the computation of the continued fraction of a square root. More...

#include <sqrt_cont_frac.h>


Data Fields

mpz_t a
mpz_t p
mpz_t q
mpz_t t
mpz_t sqrtn
mpz_t n
uint32_t nsteps_performed


Detailed Description

An ad-hoc structure for the computation of the continued fraction of a square root.

lib/utils/include/sqrt_cont_frac.h This ad-hoc structure defines the variables needed for the computation of the expansion of the continued fraction of the square root of a non perfect square.

Note:
Since the denominators of the fraction are not needed in the CFRAC algorithm, they are not computed in this particular implementation.

Definition at line 69 of file sqrt_cont_frac.h.


Field Documentation

Current numerator of the continued fraction approximating sqrtn, given modulo n.

Definition at line 78 of file sqrt_cont_frac.h.

(Used in the computation of a).

Definition at line 87 of file sqrt_cont_frac.h.

One has: (-1)^(nsteps_performed) q = a*a - b*b*n

Definition at line 91 of file sqrt_cont_frac.h.

The current term of the expansion of the continued fraction.

Definition at line 95 of file sqrt_cont_frac.h.

The (truncated) square root of which to compute the continued fraction.

Definition at line 100 of file sqrt_cont_frac.h.

The non perfect square integer whose square root will be approximated by the computation of a continued fraction.

Definition at line 105 of file sqrt_cont_frac.h.

The number of non trivial terms of the continued fraction already computed.

Definition at line 110 of file sqrt_cont_frac.h.


The documentation for this struct was generated from the following file:

Generated on Fri Jun 17 11:10:12 2011 for TIFA by Doxygen 1.5.5