Re: The precision of LaTeX's length.
- From: David Kastrup <dak@xxxxxxx>
- Date: Mon, 11 May 2009 15:35:37 +0200
Jonathan Fine <J.Fine@xxxxxxxxxx> writes:
Andrew Moschou wrote:
Curiosity: 1in = 72.27pt, but TeX calculates:
1in = 4736286sp
72.27pt = 4736287sp (closer to the correct real result)
10in and 722.7pt get the same 47362867sp.
Apparently, that bug was reported to Knuth, but it won't be fixed in
future versions of TeX, so any old documents will continue to remain
the same.
In The TeXbook, Knuth wrote: The units have been defined here so that
precise conversion to sp is efficient on a wide variety of
machines. In order to achieve this, TeX's "pt" has been made slightly
larger than the official printer's point. [...] the "error" is
essentially one part in 10^8. This is more than two orders of
magnitude less than the maount by which the inch itself changed in
1959, when it shrank to 2.54cm from its former value of (1/0.3837)cm;
so there is no point worrying about the difference.
From this, it seems that Knuth never regarded as a bug.
The TeXbook was written before the bug report. I suggest that you refer
to Knuth's specific notes regarding the reports instead. There is no
necessity to extrapolate from completely unrelated writings.
To wit, <URL:http://www.tug.org/TUGboat/Articles/tb29-2/tb92knut.pdf>
Any object of
nontrivial complexity is non-optimum, in the sense
that it can be improved in some way (while still
remaining non-optimum); therefore there's always
a reason to change anything that isn't trivial. But
one of TEX's principal advantages is the fact that
it does not change --- except for serious flaws whose
correction is unlikely to affect more than a very tiny
number of archival documents.
Let me give two examples. First, David Kastrup
observes that TEX doesn't do the best possible rounding
when it converts units. One inch is
exactly 72.27 points, which is exactly 4736286.72
scaled points. When you say `1in', TEX converts it
to 4736286sp; when you say `72.27pt', TEX converts
it to 4736287sp, which is about 23.6° Angstrom units
closer to the truth. With a simple change to TEX
§458, namely to add `denom div 2' before dividing
by `denom', the rounding would be slightly better.
But that would invalidate the line-break and page-
break decisions of an enormous number of documents.
It's unthinkable to change TEX in such a way today.
--
David Kastrup
UKTUG FAQ: <URL:http://www.tex.ac.uk/cgi-bin/texfaq2html>
.
- Follow-Ups:
- Re: The precision of LaTeX's length.
- From: Jonathan Fine
- Re: The precision of LaTeX's length.
- From: Ilya Zakharevich
- Re: The precision of LaTeX's length.
- From: Turgut Durduran
- Re: The precision of LaTeX's length.
- References:
- The precision of LaTeX's length.
- From: Hongyi Zhao
- Re: The precision of LaTeX's length.
- From: Heiko Oberdiek
- Re: The precision of LaTeX's length.
- From: Andrew Moschou
- Re: The precision of LaTeX's length.
- From: Jonathan Fine
- The precision of LaTeX's length.
- Prev by Date: Re: The precision of LaTeX's length.
- Next by Date: Re: Want to obtain the current font's width.
- Previous by thread: Re: The precision of LaTeX's length.
- Next by thread: Re: The precision of LaTeX's length.
- Index(es):
Relevant Pages
|