[tex-live] strange discrepancy in running time of etex between TL2015 and TL2017

jfbu jfbu at free.fr
Fri Jul 28 12:12:31 CEST 2017

28 juil. 2017 at 03:26, Reinhard Kotucha <reinhard.kotucha at web.de> :

> See also
>  https://www.tug.org/TUGboat/tb28-3/tb90beebe.pdf

Very interesting reading, thanks.

It is the intent of xint to implement at the macro layer the
IBM General Decimal Arithmetic Specification, (arbitrary
precision floating point) in a manner analogous to the
Python Decimal module.


Note that this specification only includes exp and log,
but not the other functions like sin, cos,... (it of course
includes sqrt which is already in xint with correct rounding;
but the rounding mode is not customizable yet). However
the plan is first to implement the specification as it stands
as first step.

But the specification is not strict on correct rounding,

Python 3.3 and later is now using a C library
for its Decimal module


but even then

Power function:
Results are not correctly rounded, even if the allcr context field is set to 1. This might change in a future release. The error of the function is less than 1ULP+t, where t has a maximum of 0.1ULP, but is almost always less than 0.01ULP.

(power function with integer or half-integer exponent in xint currently achieves better precision than that, more like 0.5ULP + epsilon)

On the other hand the MPFR

requires and achieves correct rounding for all its functions.

For TeX, apnum has done (non expandably) arbitrary precision math. I think it is not aiming at correct rounding (not checked).

Regarding xint, I think it could prove usable for up to a few dozen digits of floating point precision.

16 digits is already very well and extensively covered by l3fp.

xint is just for fun and because LaTeX3 has not that covered yet ;-) and
surely it must be possible to use MPFR from LuaTeX, so LuaTeX users
already have engine-level solution, thousands of times faster. (at least)


More information about the tex-live mailing list