64 bit SI type

Joris van der Hoeven <[email protected]> Thu, 31 Jul 2025 13:12:21 +0200
Newsgroups gmane.editors.texmacs.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============2161872104404063652==
Content-Type: multipart/alternative;
 boundary="------------C61gZS38oqOJwg8h3cGWO6j7"
Content-Language: fr, en-US

This is a multi-part message in MIME format.
--------------C61gZS38oqOJwg8h3cGWO6j7
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Dear all,

I just completed a fairly large amount of work in order to
make it possible to use a 64 bit integer type for SI instead of
the current 32 bit type.

I recall that the SI type corresponds to graphical coordinates or lengths,
with a sign bit, a 23 bit integer part and an 8 bit fractional part.
It turns that the 32 bit integer type is more and more often insufficient
for very large documents, like books with >= 500 pages.
Indeed, the current SI type has a span of 2^23 / 5 ~ 1.6M pixels
(after application of the shrinking factor 5).  On retina screens,
the height of a line is quickly about 50 pixels, which yields a limit
of about 32000 lines of text.

For this reason, I wish to switch to a 64 bit format,
but this is a somewhat dangerous change of a fundamental data type.
Before doing the final commit, it would be nice if some of you could
test on particularly challenging documents.  In order to enable
the 64 bit SI type, you should change '#define SI_32' in basic.hpp
into '#define SI_64' and recompile.

Best wishes, --Joris


--------------C61gZS38oqOJwg8h3cGWO6j7
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Dear all,</p>
    <p>I just completed a fairly large amount of work in order to<br>
      make it possible to use a 64 bit integer type for SI instead of<br>
      the current 32 bit type.<br>
    </p>
    <p>I recall that the SI type corresponds to graphical coordinates or
      lengths,<br>
      with a sign bit, a 23 bit integer part and an 8 bit fractional
      part.<br>
      It turns that the 32 bit integer type is more and more often
      insufficient<br>
      for very large documents, like books with &gt;= 500 pages.<br>
      Indeed, the current SI type has a span of 2^23 / 5 ~ 1.6M pixels<br>
      (after application of the shrinking factor 5).  On retina screens,<br>
      the height of a line is quickly about 50 pixels, which yields a
      limit<br>
      of about 32000 lines of text.</p>
    <p>For this reason, I wish to switch to a 64 bit format,<br>
      but this is a somewhat dangerous change of a fundamental data
      type.<br>
      Before doing the final commit, it would be nice if some of you
      could<br>
      test on particularly challenging documents.  In order to enable<br>
      the 64 bit SI type, you should change '#define SI_32' in basic.hpp<br>
      into '#define SI_64' and recompile.</p>
    <p>Best wishes, --Joris</p>
    <p><br>
    </p>
  </body>
</html>

--------------C61gZS38oqOJwg8h3cGWO6j7--


--===============2161872104404063652==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KVGV4bWFjcy1k
ZXYgbWFpbGluZyBsaXN0ClRleG1hY3MtZGV2QGdudS5vcmcKaHR0cHM6Ly9saXN0cy5nbnUub3Jn
L21haWxtYW4vbGlzdGluZm8vdGV4bWFjcy1kZXYK

--===============2161872104404063652==--