New on CTAN: poormanlog
This small package (usable with Plain TeX, LaTeX, or others) provides macros for computing logarithms in base 10 and fractional powers of 10, achieving a bit less than 9 digits of precision. It has no dependencies and can be used on its own, but becomes more user-friendly in the presence of xintexpr package, as it provides then log10() and pow10() functions and optionally patches the ** or ^ power operators to use those. This usage will become obsolete if and when xintexpr will natively implement in arbitrary precision the log10() and pow10() functions. The documentation is included in the README.
The package’s Catalogue entry can be viewed at https://ctan.org/pkg/poormanlog The package’s files themselves can be inspected at http://mirror.ctan.org/macros/generic/poormanlog/
Thanks for the upload. For the CTAN Team Petra Rübe-Pugliese
We are supported by the TeX users groups. Please join a users group; see https://www.tug.org/usergroups.html .
poormanlog – Logarithms and powers with (almost) 9 digits
This small package (usable with Plain e-TeX, LaTeX, or others) with no dependencies provides two fast expandable macros computing logarithms in base 10 and fractional powers of 10.
They handle arguments of 9 digit tokens which stand for either 1 <= d.dddddddd < 10 (for the log) or 0.xxxxxxxxx (for powers of 10). They achieve a precision of 1ulp for the logarithm and 2ulp for fractional powers of ten.
Extension to other numerical ranges has to be done by user, via own macros or some math engine.
The xintexpr package (at 1.3f) imports the poormanlog macros as core constituents of its log10(), pow10(), log(), exp() and pow() functions.
|Copyright||2019–2022 Jean-François Burnol|