Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/sage/rings/bernmm/bern_rat.h
4102 views
1
/*
2
bern_rat.h: multi-modular algorithm for computing Bernoulli numbers
3
4
Copyright (C) 2008, 2009, David Harvey
5
6
This file is part of the bernmm package (version 1.1).
7
8
bernmm is released under a BSD-style license. See the README file in
9
the source distribution for details.
10
*/
11
12
#ifndef BERNMM_BERN_RAT_H
13
#define BERNMM_BERN_RAT_H
14
15
#include <gmp.h>
16
17
18
namespace bernmm {
19
20
21
/*
22
Returns B_k as a rational number, stored at _res_.
23
24
k must be >= 0.
25
26
Uses _num_threads_ threads. (If USE_THREADS is not #defined, the code just
27
uses one thread.)
28
*/
29
void bern_rat(mpq_t res, long k, int num_threads);
30
31
32
33
}; // end namespace
34
35
36
#endif
37
38
// end of file ================================================================
39
40