Givaro
Macros | Functions | Variables
ProbLucas.C File Reference
#include <iostream>
#include <fstream>
#include <stdlib.h>
#include <stdio.h>
#include <cmath>
#include <givaro/givintprime.h>
#include <givaro/givintnumtheo.h>
#include <givaro/givtimer.h>
#include <givaro/givinit.h>
#include <givaro/modular-integer.h>
#include <givaro/givinteger.h>
#include <givaro/givrandom.h>
+ Include dependency graph for ProbLucas.C:

Macros

#define GIVABSDIV(a, b)   ((a)<(b)?((a)/(b)):((b)/(a)))
 
#define GIVMIN(a, b)   ((a)<(b)?(a):(b))
 
#define ProbLucas_factor_first_primes(tmp, n)   (tmp = IP.isZero(IP.mod(tmp,n,23))?23:( IP.isZero(IP.mod(tmp,n,19))?19:( IP.isZero(IP.mod(tmp,n,17))?17: (IP.isZero(IP.mod(tmp,n,2))?2:( IP.isZero(IP.mod(tmp,n,3))?3:( IP.isZero(IP.mod(tmp,n,5))?5:( IP.isZero(IP.mod(tmp,n,7))?7: ( IP.isZero(IP.mod(tmp,n,11))?11:13 ))))))))
 
#define ProbLucas_factor_second_primes(tmp, n)   (tmp = IP.isZero(IP.mod(tmp,n,31))?31:( IP.isZero(IP.mod(tmp,n,29))?29: ( IP.isZero(IP.mod(tmp,n,37))?37: ( IP.isZero(IP.mod(tmp,n,41))?41:( IP.isZero(IP.mod(tmp,n,43))?43: ( IP.isZero(IP.mod(tmp,n,71))?71:( IP.isZero(IP.mod(tmp,n,67))?67:( IP.isZero(IP.mod(tmp,n,61))?61:( IP.isZero(IP.mod(tmp,n,59))?59: ( IP.isZero(IP.mod(tmp,n,53))?53:( IP.isZero(IP.mod(tmp,n,47))?47: ( IP.isZero(IP.mod(tmp,n,97))?97: ( IP.isZero(IP.mod(tmp,n,89))?89:( IP.isZero(IP.mod(tmp,n,83))?83:( IP.isZero(IP.mod(tmp,n,79))?79:73)))))))))))))))
 

Functions

IntegerMyPollard (GivRandom &gen, Integer &g, const Integer &n, const unsigned long threshold)
 
unsigned long Revert (const Integer p, const double epsilon, double firstguess)
 
unsigned long Revert (const Integer p, const double epsilon)
 
bool ProbLucas (const Integer n, const double orig_epsilon)
 
int main (int argc, char **argv)
 

Variables

IntFactorDom IP
 

Macro Definition Documentation

◆ GIVABSDIV

#define GIVABSDIV (   a,
 
)    ((a)<(b)?((a)/(b)):((b)/(a)))

◆ GIVMIN

#define GIVMIN (   a,
 
)    ((a)<(b)?(a):(b))

◆ ProbLucas_factor_first_primes

#define ProbLucas_factor_first_primes (   tmp,
 
)    (tmp = IP.isZero(IP.mod(tmp,n,23))?23:( IP.isZero(IP.mod(tmp,n,19))?19:( IP.isZero(IP.mod(tmp,n,17))?17: (IP.isZero(IP.mod(tmp,n,2))?2:( IP.isZero(IP.mod(tmp,n,3))?3:( IP.isZero(IP.mod(tmp,n,5))?5:( IP.isZero(IP.mod(tmp,n,7))?7: ( IP.isZero(IP.mod(tmp,n,11))?11:13 ))))))))

◆ ProbLucas_factor_second_primes

#define ProbLucas_factor_second_primes (   tmp,
 
)    (tmp = IP.isZero(IP.mod(tmp,n,31))?31:( IP.isZero(IP.mod(tmp,n,29))?29: ( IP.isZero(IP.mod(tmp,n,37))?37: ( IP.isZero(IP.mod(tmp,n,41))?41:( IP.isZero(IP.mod(tmp,n,43))?43: ( IP.isZero(IP.mod(tmp,n,71))?71:( IP.isZero(IP.mod(tmp,n,67))?67:( IP.isZero(IP.mod(tmp,n,61))?61:( IP.isZero(IP.mod(tmp,n,59))?59: ( IP.isZero(IP.mod(tmp,n,53))?53:( IP.isZero(IP.mod(tmp,n,47))?47: ( IP.isZero(IP.mod(tmp,n,97))?97: ( IP.isZero(IP.mod(tmp,n,89))?89:( IP.isZero(IP.mod(tmp,n,83))?83:( IP.isZero(IP.mod(tmp,n,79))?79:73)))))))))))))))

Function Documentation

◆ MyPollard()

Integer& MyPollard ( GivRandom gen,
Integer g,
const Integer n,
const unsigned long  threshold 
)

◆ Revert() [1/2]

unsigned long Revert ( const Integer  p,
const double  epsilon,
double  firstguess 
)

◆ Revert() [2/2]

unsigned long Revert ( const Integer  p,
const double  epsilon 
)

◆ ProbLucas()

bool ProbLucas ( const Integer  n,
const double  orig_epsilon 
)

◆ main()

int main ( int  argc,
char **  argv 
)

Variable Documentation

◆ IP