summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-04-22 20:39:31 +0000
committerKarl Berry <karl@freefriends.org>2021-04-22 20:39:31 +0000
commitcaa6bef71273aa0344cf05a06ab0d55f79404ba3 (patch)
treea357ae59fef5643563df7ebd35839298b19106ae /Master/texmf-dist/doc/generic
parent751d1c0be58cab8a1810db4586798c00a4c356f0 (diff)
poormanlog (22apr21)
git-svn-id: svn://tug.org/texlive/trunk@58966 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic')
-rw-r--r--Master/texmf-dist/doc/generic/poormanlog/README40
1 files changed, 29 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/generic/poormanlog/README b/Master/texmf-dist/doc/generic/poormanlog/README
index cb250c4adf8..c98b99894de 100644
--- a/Master/texmf-dist/doc/generic/poormanlog/README
+++ b/Master/texmf-dist/doc/generic/poormanlog/README
@@ -1,9 +1,9 @@
-POORMANLOG (v0.05, 2019/04/22)
+POORMANLOG (v0.06, 2021/04/21)
==============================
poormanlog.tex provides (expandable) macros \PMLogZ and \PMPowTen
for computing base 10 logarithms and powers of 10 with a bit less
-than 9 digits of precision.
+than 9 digits of (fixed point) precision.
It can be used with TeX (\input poormanlog) and has a LaTeX interface
(\usepackage{poormanlog}).
@@ -22,11 +22,13 @@ Changes
- v0.05 (2019/04/22): the additions/patches to xint originally
provided by poormanlog.tex got moved into xint 1.3f itself.
- Thus, poormanlog now reduces to the sole two macros
+ Thus, poormanlog now reduces to only two macros
\PMLogZ and \PMPowTen. It can be imported by other macro
files with no danger of conflicting with future releases of
xint in case of concurrent usage.
+- v0.06 (2021/04/21): documentation update (warning?) regarding
+ \PMLogZ{999999999} output being surprisingly 000000000.
Files
-----
@@ -43,15 +45,31 @@ expansion: the argument is submitted to f-expansion and the macro
itself expands fully in two steps.
input: #1 must be (or f-expands to) a mantissa ddddddddd with exactly
- 9 digits, standing for D = d.dddddddd, 1 <= D < 10
+ nine digits, standing for D = d.dddddddd, 1 <= D < 10
-output: 9 digits xxxxxxxxx standing for X = 0.xxxxxxxxx such that
+output: nine digits xxxxxxxxx standing for X = 0.xxxxxxxxx such that
log10(D) is about X
+ CAUTION: for #1=999999999, the macro outputs 000000000,
+ which are the fractional digits of the correct rounding
+ 1.000000000 of log10(9.99999999)=0.9999999995657...
+
+ As outputting 999999999 to represent log10(0.999999999) is not
+ completely satisfactory either, it is better to work out one's
+ own alternate wrapper of "\the\numexpr\PML@#1." as the latter
+ produces exceptionally 1000000000 with ten digits for
+ #1=999999999, and it is actually as simple to test the
+ exceptional case on this ten digit output than on input.
+
+ Please refer to source code and check how \PMLogZ is built on
+ top of \PML@ output and design own user variant: in place of
+ the gobble in the \PMLogZ one only needs to test if first
+ digit is 2 to identify the special case.
+
precision: It seems from testing that absolute error is not much
- more than 1 unit in the last place, and result X differs
- from rounded mathematical value of log10(D) by at most
- 1 unit in the last place.
+ more than 1 unit in the last (*fixed point*) place,
+ and result differs from rounded mathematical value of
+ log10(D) by at most 1 unit in the last place.
(*attention estimate not rigorously proven*).
@@ -61,10 +79,10 @@ precision: It seems from testing that absolute error is not much
expansion: the argument is submitted to f-expansion and the macro
itself expands fully in two steps.
-input: #1 must be (f-expands to) exactly 9 digits xxxxxxxxx, standing
+input: #1 must be (f-expands to) exactly nine digits xxxxxxxxx, standing
for X = 0.xxxxxxxxx
-output: 9 digits ddddddddd, such that D = d.dddddddd is about 10^X
+output: nine digits ddddddddd, such that D = d.dddddddd is about 10^X
The first digit of output is never zero (i.e. 1 <= D < 10)
precision: It seems from testing that absolute error is less than
@@ -77,7 +95,7 @@ precision: It seems from testing that absolute error is less than
LICENSE
-------
-Copyright (C) 2019, Jean-Francois Burnol.
+Copyright (C) 2019-2021, Jean-Francois Burnol.
This Work may be distributed and/or modified under the conditions of the
LaTeX Project Public License version 1.3c. This version of this license