You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every once in a while a user asks for the ability to manipulate integers beyond the 32-bit range handled by TeX. This is solved for instance by bigintcalc and more recently by xint (manipulating big integer expressions). It may be good to have an implementation in expl3. Use cases:
siunitx, where Joseph needs to be able to round etc. (I've asked him for details)
hyperref to manipulate bit sets used in pdf forms (in fact these bit sets seem to be short enough to fit in normal integers... I've asked Heiko)
users wanting to compute factorials, Fibonacci numbers, Mersenne primes, ...
Unless I'm mistaken, there will be no ned for fast multiplication, and even addition may be done rather slowly. Optimization will have a very low priority and I will focus on keeping the code concise and clear (just the opposite of l3fp).
The text was updated successfully, but these errors were encountered:
The plan is to support the same syntax as integer expressions: ()+-*/, automatically unpacking registers, and probably at some point " (hex), ' (octal), ` (charcode).
I've started, and got addition/subtraction mostly working (reasonably fast, up to the limit of TeX's input levels, so 19900 digits or so). Other uses have come up in discussions.
computing md5 or other hashes requires doing computations on 32-bit words (or other-sized words).
perhaps for decoding base64 encoding and some such, or for working with binary files (extract data from images/\pdffiledump)
converting from binary floating point formats to decimal ones (e.g. some plan I have to "un-\dump" a compiled Lua file in order to run some Lua code from pdfTeX/XeTeX without having to write a full Lua interpreter)
I've worked out now that siunitx can live without this (it's only about comparisons of arbitrary numbers for rounding, and I've implemented a different way). I've also had a quick look over the hyperref code and I'm reasonably confident that the actual range needed for PDF flags is fine with the standard int functions. So it's only the esoteric number theory stuff that would require big integers. Those can already be covered by e.g.xint: not sure we really need to worry further (at least not at the moment).
Every once in a while a user asks for the ability to manipulate integers beyond the 32-bit range handled by TeX. This is solved for instance by
bigintcalc
and more recently byxint
(manipulating big integer expressions). It may be good to have an implementation inexpl3
. Use cases:siunitx
, where Joseph needs to be able to round etc. (I've asked him for details)hyperref
to manipulate bit sets used in pdf forms (in fact these bit sets seem to be short enough to fit in normal integers... I've asked Heiko)Unless I'm mistaken, there will be no ned for fast multiplication, and even addition may be done rather slowly. Optimization will have a very low priority and I will focus on keeping the code concise and clear (just the opposite of
l3fp
).The text was updated successfully, but these errors were encountered: