viewing long pages, evince seems to choke on simple test file
Doug McKenna
doug at mathemaesthetics.com
Tue Sep 10 02:02:15 CEST 2019
Rienhard wrote:
>| ...
>| Rounding errors occur when you convert binary
>| numbers to decimal and vice versa.
>| ...
Yes, that's what I meant, and what I think DEK meant when he said something similar to this effect.
Doug McKenna
Mathemaesthetics, Inc.
----- Original Message -----
From: "reinhard kotucha" <reinhard.kotucha at web.de>
To: "doug" <doug at mathemaesthetics.com>
Cc: "Mike Marchywka" <marchywka at hotmail.com>, "texhax" <texhax at tug.org>
Sent: Monday, September 9, 2019 4:32:37 PM
Subject: Re: viewing long pages, evince seems to choke on simple test file
On 2019-09-09 at 11:46:05 -0600, Doug McKenna wrote:
> Mike Marchywka wrote:
>
> >| Was there some reason known for this
> >| or as the other response suggested this
> >| was back in the day of 32 or 16 bit integers?
>
> TeX uses 32-bits as the word size of integers, with the upper 16
> bits the signed integer part of a fixed point "Dimension" and the
> lower 16 bits for the fractional part. But the connection to the
> real world is that the low-order 16 bits measure 1/65536th of a
> point, each point being 72.27 per inch. Had these bits measured
> 1/10000th of a point, Knuth would have avoided some input/output
> round-off problems, and would have increased the dynamic range of a
> Dimension by a factor of 6 or so, with attendant loss of precision.
> C'est la vie.
I don't think that Knuth would have avoided any rounding errors by
using decimal numbers. Computers still use the binary system
internally. Rounding errors occur when you convert binary numbers to
decimal and vice versa. Of course, this is quite confusing to humans.
But keep in mind that even the decimal number 0.1 cannot be
represented in the binary system with a finite amount of binary
digits.
Given that Knuth did not consider printing on toilet paper, his
decision was quite reasonable. He used floating point numbers at the
beginning but switched to fixed point integer numbers when he noticed
that he got different results on different machines.
Sure, more than 32 bit for dimensions would be quite nice in some
special cases but after all, he wrote TeX in order to write his own
books in the first place. Much more annoying is the limited range in
Metapost because you often have to do extensive calculations in order
to determine dimensions, hence intermediate results are likely to
cause an overfow.
> On today's 64-bit machines, one (ahem!) might configure a
> TeX-language interpreter at compile time to use [48:16] fixed-point
> arithmetic, which would allow a single page to be about 30 million
> miles long. Sadly, that unrolled scroll would make it only about
> 20% of the way to Mars.
This doesn't make much sense either because PDF (at least 1.4) has similar
limitations. Only a homemade DVI driver could extend the range, but
it could also scale the page so that the range of TeX's dimensions can
be left as it is.
BTW, there is a nice TUGboat article by Nelson Beebe about different
representations of numbers and their quirks:
https://tug.org/TUGboat/tb28-3/tb90beebe.pdf
Regards,
Reinhard
--
------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover mailto:reinhard.kotucha at web.de
------------------------------------------------------------------
More information about the texhax
mailing list