texlive[58966] Master/texmf-dist/doc/generic/poormanlog/README:

commits+karl at tug.org commits+karl at tug.org
Thu Apr 22 22:39:31 CEST 2021


Revision: 58966
          http://tug.org/svn/texlive?view=revision&revision=58966
Author:   karl
Date:     2021-04-22 22:39:31 +0200 (Thu, 22 Apr 2021)
Log Message:
-----------
poormanlog (22apr21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/poormanlog/README

Modified: trunk/Master/texmf-dist/doc/generic/poormanlog/README
===================================================================
--- trunk/Master/texmf-dist/doc/generic/poormanlog/README	2021-04-22 20:39:17 UTC (rev 58965)
+++ trunk/Master/texmf-dist/doc/generic/poormanlog/README	2021-04-22 20:39:31 UTC (rev 58966)
@@ -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 @@
 - 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 @@
            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 @@
 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 @@
 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



More information about the tex-live-commits mailing list.