/* Copyright (C) 2022 Stephen Hewitt, cambridgeclarion.org This file is part of a programme to research fast Fermat factorisation algorithms. This is free software: you can redistribute it and/or modify it under the terms of version 3 of the GNU General Public License as published by the Free Software Foundation. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public Licence along with this programme. If not, see . A copy of the licence is also available at https://www.cambridgeclarion.org/download/GPLv3.txt It has the following cryptographic hash SHA256 3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986 */ /* This programme is for research on Fermat factorisation algorithms. For more information see the articles on www.cambridgeclarion.org "Empirical explorations of faster Fermat factorisation" by Stephen Hewitt */ typedef struct { unsigned skip_n; unsigned long max_skip; double search_secs; // time taken in seconds double setup_secs; } Output; int zFermat1(Output *pout, mpz_t gmp_n); int zFermat2(Output *pout, unsigned long M, mpz_t gmp_n); double elapsed_secs(struct timeval tv_end, struct timeval tv_begin); int check_result(mpz_t candidate, mpz_t N);