[luatex] rounding errors with node.dimensions?

Hans Hagen pragma at wxs.nl
Wed Apr 13 12:22:52 CEST 2016


On 4/13/2016 10:27 AM, Frank Mittelbach wrote:
> Am 13.04.16 um 10:17 schrieb Hans Hagen:

> point is if it only work "most of the time" then it is not possible to
> use it to do manipulations in lua and turn back a result to TeX for
> further processing as on the TeX level 1sp difference may throw you off
> badly. And then then the function is fairly pointless.

this helper is a very simplified pack variant so it follows a bit 
different route (comparable to what happens in the backend where these 
few sp differences are not that important) so we run into these 
used-in-a-few-places-only float issues here

i played bit with the calculation and by delaying some float operations 
(for glue advance) i can bring the delta down to 1 sp occasionally so 
even then one has to keep some thresholds into account (something i 
normally do anyway when messing in tex with multistep calculations)

i guess float calculations like these will never be roundtrip (and 
opening up the engine exposes some of these phenomena)

so, a next release will be a bit more accurate but still not exact 
roundtrip

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
       tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the luatex mailing list