View chudnovsky.cc
#include "computer.h" | |
void Chudnovsky::setXYZ(int64_t k, mpz_class& x, mpz_class& y, mpz_class& z) { | |
static constexpr int64_t A = 13591409; | |
static constexpr int64_t B = 545140134; | |
static constexpr int64_t C = 640320; | |
if (k == 0) { | |
x = 1; | |
} else { |
View largest_dpn_for_each.cc
#include <gmpxx.h> | |
#include <algorithm> | |
#include <cstdlib> | |
#include <functional> | |
#include <iostream> | |
#include <iterator> | |
#include <string> | |
#include <vector> | |
using namespace std; |
View largest_dpn.cc
#include <gmpxx.h> | |
#include <algorithm> | |
#include <functional> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
const char* ranks[] = {"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"}; |