arb icon indicating copy to clipboard operation
arb copied to clipboard

Document more internal functions, macros and constants

Open albinahlback opened this issue 4 years ago • 3 comments

Mostly used by developers, so I guess it's not a high priority issue. However, it is nice to have a quick glance at it while developing so one can quickly see all the caveats.

For example _arf_demote and the macro nn_mul_2x2. Also arf_mul_rnd_down, and what is the int it is supposed to return?

Edit: I edited the title as I planning to devote a couple of hours to proof read the documents as well as documenting more internal functions.

albinahlback avatar Dec 17 '21 20:12 albinahlback

It is also now used by Wolfram Mathematica. Ha. https://youtu.be/_BBdeaqaHVU

ValZapod avatar Dec 18 '21 06:12 ValZapod

It is also now used by Wolfram Mathematica. Ha. https://youtu.be/_BBdeaqaHVU

Thanks, that's a nice presentation (though off topic for this issue).

Back to the topic: I agree it would be nice to document all these internal functions and macros.

arf_mul_rnd_down returns an inexactness flag, like most other arf functions.

fredrik-johansson avatar Dec 18 '21 09:12 fredrik-johansson

@fredrik-johansson, what do you think about a creating generic header for Arb, like FLINT has flint.h? I know arb.h is already taken, but I have two reasons why I think creating such a header is a good idea:

  • Including any header of Arb should ship the version of it. Even if you include arf.h, which has a lot of perfectly good end-user functions, you do not get ARB_VERSION.
  • When internal things gets documented, the documentation will have a better layout; It simply makes more sense to have LIMB_ONE in documentation for a generic header than under mag.h.

Maybe I'll come up with more reasons later.

Edit: Perhaps arblib.h is a suiting name, although that could be interpreted as a header including everything in the library. Perhaps arb_defs.h is the best variant.

albinahlback avatar Apr 09 '22 00:04 albinahlback