Go to the source code of this file.
Functions | |
octave_value_list | F__isprimelarge__ (const octave_value_list &args, int) |
octave_value_list | F__pollardrho__ (const octave_value_list &args, int) |
bool | isprimescalar (uint64_t n) |
uint64_t | localgcd (uint64_t a, uint64_t b) |
bool | millerrabin (uint64_t div, uint64_t d, uint64_t r, uint64_t n) |
uint64_t | pollardrho (uint64_t n, uint64_t c=1) |
uint64_t | safemultiply (uint64_t a, uint64_t b, uint64_t modulus) |
uint64_t | safepower (uint64_t a, uint64_t b, uint64_t modulus) |
octave_value_list F__isprimelarge__ | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 156 of file __isprimelarge__.cc.
References Array< T, Alloc >::dims(), isprimescalar(), Array< T, Alloc >::numel(), ovl(), and print_usage().
octave_value_list F__pollardrho__ | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 260 of file __isprimelarge__.cc.
References n, ovl(), pollardrho(), and print_usage().
bool isprimescalar | ( | uint64_t | n | ) |
Definition at line 99 of file __isprimelarge__.cc.
References d, millerrabin(), n, and r.
Referenced by F__isprimelarge__().
|
inline |
Definition at line 205 of file __isprimelarge__.cc.
Referenced by pollardrho().
bool millerrabin | ( | uint64_t | div, |
uint64_t | d, | ||
uint64_t | r, | ||
uint64_t | n | ||
) |
Definition at line 81 of file __isprimelarge__.cc.
References d, n, r, safemultiply(), safepower(), and x.
Referenced by isprimescalar().
uint64_t pollardrho | ( | uint64_t | n, |
uint64_t | c = 1 |
||
) |
Definition at line 215 of file __isprimelarge__.cc.
References error_unless, localgcd(), n, safemultiply(), and x.
Referenced by F__pollardrho__().
uint64_t safemultiply | ( | uint64_t | a, |
uint64_t | b, | ||
uint64_t | modulus | ||
) |
Definition at line 40 of file __isprimelarge__.cc.
References r.
Referenced by millerrabin(), pollardrho(), and safepower().
uint64_t safepower | ( | uint64_t | a, |
uint64_t | b, | ||
uint64_t | modulus | ||
) |
Definition at line 65 of file __isprimelarge__.cc.
References safemultiply().
Referenced by millerrabin().