New fast computing formula for log(10) constant

39 views
Skip to first unread message

Jorge Zuniga

unread,
Feb 6, 2025, 10:38:53 AMFeb 6
to flint...@googlegroups.com, Fredrik Johansson
Hi all, 

Point 9.31.2 "Logarithm of Integers", p.774 of FLINT Documentation  Release 3.3.0-dev, indicates that constant log(10) is computed using a 3-term  Machin-type formula (a linear combination of fast arctanh series). I have found a much more efficient formula (almost twice faster) that lean on the current FLINT internal log(2)  algorithm, this is 

image.png

The series must be implemented with the same binary splitting code that was used for log(2) but this time the integer parameters are changed.

References are found here

My Best,

Jorge Zuniga

  

Fredrik Johansson

unread,
Feb 7, 2025, 2:51:32 AMFeb 7
to Jorge Zuniga, flint...@googlegroups.com
Hi Jorge,

These are very nice results; thanks for sharing them. The following issue is already open about updating formulas for some constants to the most efficient versions: https://github.com/flintlib/flint/issues/2111

In practice log(2) is the most interesting log to compute as a standalone constant. In most applications, we want log(2), log(3), ..., log(n) simultaneously, so Machin-type formulas are quite good. Still, it would be interesting to implement your table of formulas for reference.

Note that we don't have the restriction that coefficients need be 64-bit integers. If you find more efficient formulas with larger coefficients, those would be interesting to see as well (though 64-bit coefficients are a bit more convenient to store in a table).

Best,
Fredrik
Reply all
Reply to author
Forward
0 new messages