Givaro 4.2.1
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>

Macros

#define GIVABSDIV(a, b)
 
#define GIVMIN(a, b)
 
#define ProbLucas_factor_first_primes(tmp, n)
 
#define ProbLucas_factor_second_primes(tmp, n)
 

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,
b )
Value:
((a)<(b)?((a)/(b)):((b)/(a)))
Examples
examples/Integer/ProbLucas.C.

◆ GIVMIN

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

◆ ProbLucas_factor_first_primes

#define ProbLucas_factor_first_primes ( tmp,
n )
Value:
(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 ))))))))
IntFactorDom IP
Definition ProbLucas.C:43
Examples
examples/Integer/ProbLucas.C.

◆ ProbLucas_factor_second_primes

#define ProbLucas_factor_second_primes ( tmp,
n )
Value:
(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)))))))))))))))
Examples
examples/Integer/ProbLucas.C.

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