11

Since about twenty years, I use a private fixed point arithmetic package which I would like to replace by something newer and better. There is the equally old (but good) fp package, but LaTeX3 is rising and I found a many questions and answers where LaTeX3 was recommended:

Unfortunately, I was not able to find the documentation of the arithmetic functions of LaTeX3. One of the above linked texts mentions a l3fp package which I could not find. I scanned through the expl3 documentation, but I also could not find the arithmetic functions documented. Googling gives a lot of examples, but where is the documentation?

If there is one, please, let me know.

Or is it not officially documented, because it's currently not seen as stable? The xparse package e.g. is declared stable and is documented. Is it too early for the arithmetic functions?

3
  • 2
    texdoc l3fp or texdoc interface3 which both give the same document. Apr 7, 2014 at 7:26
  • @TorbjørnT. texdoc l3fp finds nothing (on my system which was updated recently), but interface3.pdf exists. This seems to be the documentation I was looking for. Thank you! Is it obvious to look for interface3.pdf? Then I would delete my question... Apr 7, 2014 at 7:36
  • I don't know, I think I'm aware of it because it has been mentioned here on the site, or in chat. I can't really comment on stability, so I think you could leave it for now. Apr 7, 2014 at 7:40

1 Answer 1

9

As l3fp is part of the 'code level' expl3 implementation, the documentation is included in interface3: a programmers' reference. As it implements the same arithmetic operations as are (commonly) provided by other languages, the documentation for the individual operations is not that detailed.

In terms of 'stability', I'd say that How "safe" is it to use LaTeX3 (l3packages, l3kernel)? covers much of this. The floating point code is part of the l3kernel package, which the team aim to keep 'broadly stable'. There seems little likelihood of removal of anything from l3fp (all relatively new and with no issues known in terms of interfaces). As such, it's no more risky than any other code or package, and probably at least as 'safe' as anything else where development is ongoing. (I note fp has not changed for many years, so it's entirely stable in that sense.)

4
  • Thank you! interface3 is the documentation I was looking for. Somehow it slipped away from me... it's even located in the same directory as expl3. Your words about stability are reassuring. Actually, I was reading a little bit in your excellent siunitx documentation today, when this question about arithmetics came up to me... One last point: Are there plans for a fixed point arithmetic besides the more common floating point arithmetic? Maybe, it's too special for the kernel, but it would be useful for e.g. financial calculations. Apr 7, 2014 at 9:11
  • @ThomasF.Sturm No specific plans on fixed point arithmetic. For most purposes, floating calcs using IEEE854 are sufficient. We do have some 'big integer' code, but at present that's not in the kernel. (I'd quite like some parts of that for siunitx!)
    – Joseph Wright
    Apr 7, 2014 at 9:15
  • What do you mean by that last parenthetical comment? I know that new stuff has been added to the fp library recently (inverse tan springs to mind). Apr 7, 2014 at 9:20
  • 1
    @AndrewStacey I was referring to the 'big integers' point I'd made. 'Big integers' would be handy for some internals in siunitx, and also cover the fixed-point question (just a question of a power-of-ten shift for financial calculations, for example).
    – Joseph Wright
    Apr 7, 2014 at 12:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .