Brisebarre, N., & Hanrot, G. (2026). Integer points close to a transcendental curve: an algorithmic approach. arXiv preprint arXiv:2606.04858.
Nicolas Brisebarre, Guillaume Hanrot. Integer points close to a transcendental curve and correctly-rounded evaluation of a function. 2023. ⟨hal-03240179v5⟩
The source code included in this file is a prototype implementation of the algorithm described in the paper "Integer points close to a transcendental curve and correctly-rounded evaluation of a function", by N. Brisebarre and G. Hanrot.
It has been tested and debuggued, but not in a thorough way. The code
has not yet been cleaned. It has been tested with only a few functions
(exp, log, gamma, cbrt).
In particular, portability has not been considered as an issue. You may submit bug reports, but they will be treated on the basis of available time.
As such, this code should not, at this point, be used directly for production purposes until further testing has taken place.
Requirements:
- libfplll https://github.com/fplll/fplll; this has been tested with
fplllv. 5.4.1 - flint + arb https://flintlib.org/; this has been tested with
libflintv. 2.8.4 andlibflint-arbv. 2.13.1
FPLLL further requires GMP https://gmplib.org/ & MPFR https://www.mpfr.org/.
You should put the right locations for all the includes & lib files in the Makefile.
We have chosen to adopt a syntax for arguments very similar to Bacsel https://gitlab.inria.fr/zimmerma/bacsel.
The function under study is defined at compile-time at the top of the file
function.c. You need to provide an arb and an acb implementation for
the function, as #define fun arb_exp #define fun_acb acb_exp
./bivarie --t0 <int> --t1 <int> --e_in <int> --alpha <int> --m <int> --n <int> --nn <int> --rho1 <int> --N1 <int> --N2<int> --rnd_mode <'d' or 'n' or 'a'> --nthreads <int> --help
--t0 : mantissa of the starting point (integer)
--t1 : mantissa of the endpoint (integer)
--alpha : degree of the auxiliary polynomial (integer)
--m, --n, --nn: n and nn are the respective precisions of input/output format, m the length of the run expected after the mantissa of the result. (integers)
--t : size of the elementary intervals to be used (decimal)
--rho1 : technical parameter, should be of the order of the inverse of the
size of the elementary interval or a bit larger. You should try
various values. Too small or too large a rho may make the method
fail.
--N1, --N2 : technical parameters. As a rule of thumb, N1.N2 should be larger
than (alpha + 1) (alpha + 2) whereas N2/N1 should be close to (n-t)/m.
Integers. Typically N2 is 2 or 3.
--rnd_mode: which rounding mode(s) to consider: directed, nearest or both.
--nthreads: self explanatory.
--lll_trunc: technical parameter in [0,1). Closer to 1 is more aggressive.
0.8 should be fine in most cases. See file tests_paper.sh
This software is distributed under the GNU General Public Licence, v. 3. A copy of this license is distributed alongside the source code in the file name gpl-3.0.txt.