texlive[70013] Master/texmf-dist/doc/metapost/base: Updated MetaPost

commits+lscarso at tug.org commits+lscarso at tug.org
Tue Feb 20 18:59:51 CET 2024


Revision: 70013
          https://tug.org/svn/texlive?view=revision&revision=70013
Author:   lscarso
Date:     2024-02-20 18:59:51 +0100 (Tue, 20 Feb 2024)
Log Message:
-----------
Updated MetaPost mpman.pdf for the new interval arithmetic number system.

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/metapost/base/mpman.pdf
    trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman-app-numbersystems.tex
    trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman-app-optab.tex
    trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman-app-refman.tex
    trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman.bib
    trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman.tex

Modified: trunk/Master/texmf-dist/doc/metapost/base/mpman.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman-app-numbersystems.tex
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman-app-numbersystems.tex	2024-02-20 17:51:29 UTC (rev 70012)
+++ trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman-app-numbersystems.tex	2024-02-20 17:59:51 UTC (rev 70013)
@@ -1,10 +1,10 @@
 \svnInfo $Id$
-\section{High-precision arithmetic with MetaPost}
+\section{High-precision and interval arithmetic with MetaPost}
 \label{hparith}
 
 In addition to the fixed-point arithmetics inherited from \MF, MetaPost
 can also do higher-precision arithmetics.  In total, MetaPost can handle
-numeric quantities in four internal representation formats or number
+numeric quantities in five internal representation formats or number
 systems.  Number systems differ in rounding errors\index{rounding error}
 introduced by and the speed of arithmetic operations.  Simply storing a
 numeric value in a variable may already introduce a rounding error, so
@@ -14,7 +14,7 @@
 determined by a command-line switch
 \texttt{-numbersystem}\index{command-line!mpost?\texttt{mpost}!-numbersystem?\texttt{-numbersystem}}
 when invoking the MetaPost executable.  Argument is a string and can be
-one of \texttt{scaled}, \texttt{double}, \texttt{binary}, or
+one of \texttt{scaled}, \texttt{double}, \texttt{binary}, \texttt{interval} or
 \texttt{decimal}.  The argument is stored in an internal string variable
 \texttt{numbersystem}\index{numbersystem?\texttt{numbersystem}}\label{Dnumbersystem}.
 Assigning a value to this variable at run-time triggers an error.
@@ -58,6 +58,26 @@
 operations are done in software using the MPFR library~\cite{lib:mpfr}
 and are usually orders of magnitude slower than in \texttt{double} mode.
 
+The \index{interval?interval number system}\texttt{interval} number
+system MPFI~\cite{lib:mpfi}, introduced in version \texttt{2.10}, is built on the top of the MPFR library
+and an interval quantity \texttt{[}\textit{number}\texttt{,}\textit{number}\texttt{]} is entered as
+\begin{center}\index{interval\_set?\texttt{interval\_set}}\label{Dintervalset}\texttt{w := interval\_set(}\textit{number}\texttt{,}\textit{number}\texttt{);}\end{center}
+An interval is a set, the left extrema being
+\begin{center}\index{interval\_get\_left\_endpoint?\texttt{interval\_get\_left\_endpoint}}\label{Dintervalleft}\texttt{l := interval\_get\_left\_endpoint(}\textit{interval}\texttt{);}\end{center}
+and  the right extrema 
+\begin{center}\index{interval\_get\_right\_endpoint?\texttt{interval\_get\_right\_endpoint}}\label{Dintervalright}\texttt{r := interval\_get\_right\_endpoint(}\textit{interval}\texttt{);}\end{center}
+and it's always $l\leq r$\,; a number \texttt{x} is always seen as the interval \texttt{[x,x]}, i.e. a set with one element.
+At first glance, interval arithmetic can be confusing: if $w$ is an interval,
+$w*w$ is the set $\left\{ x*x: x\in w\right\}$, but $f(w)=w^2$  is the set $\left\{f(x): x\in w\right\} = \left\{x^2: x\in w\right\}$:
+if $w=[-1,1]$ then $w*w=[-1,1]$ and $w^2=[0,1]$. On the other hand, it's easy to verify that $w*w*w = w^3$ always. For this reason,
+given that currently the
+implementation of the MetaPost functions in MPFI mimics those of MPFR and they are not adapted to the interval arithmetic,
+the main utility of interval mode is the implementation of algorithms in MetaPost language.
+
+
+
+
+
 Number system \texttt{decimal}\index{decimal?\texttt{decimal}} provides
 arbitrary precision floating-point arithmetics similar to the
 \texttt{binary} number system.  Except that it uses a base of~10 for the

Modified: trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman-app-optab.tex
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman-app-optab.tex	2024-02-20 17:51:29 UTC (rev 70012)
+++ trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman-app-optab.tex	2024-02-20 17:59:51 UTC (rev 70013)
@@ -79,6 +79,9 @@
 infont\index{infont?\texttt{infont}}&  string&  string&  picture&  \pageref{Sinfont}&  Typeset string in given font\\\hline
 \pl intersec\-tionpoint\index{intersectionpoint?\texttt{intersectionpoint}}&  path&  path&  pair&  \pageref{Disecpt}&  An intersection point\\\hline
 intersec\-tiontimes\index{intersectiontimes?\texttt{intersectiontimes}}&  path&  path&  pair&  \pageref{Disectt}&  Times ($t_l,t_r)$ on paths $l$ and $r$ when the paths intersect\\\hline
+interval\-\_get\-\_left\-\_endpoint\index{interval\_get\_left\_endpoint?\texttt{interval\_get\_left\_endpoint}} &  --&  numeric & numeric& \pageref{Dintervalleft}& The left endpoint of an interval quantity\\\hline
+interval\-\_get\-\_right\-\_endpoint\index{interval\_get\_right\_endpoint?\texttt{interval\_get\_right\_endpoint}}&  --& numeric & numeric& \pageref{Dintervalright}& The right endpoint of an interval quantity\\\hline
+interval\-\_set\index{interval\_set?\texttt{interval\_set}}&  --& pair & numeric& \pageref{Dintervalset}& Create an interval quantity\\\hline
 \pl inverse\index{inverse?\texttt{inverse}}&  --&  transform&  transform&  \pageref{Dinv}&  Invert a transformation\\\hline
 known\index{known?\texttt{known}}&  --&  any&  boolean&  \pageref{Dknown}&  Does argument have a known value?\\\hline
 length\index{length?\texttt{length}}&  --&  path\par string\par picture&  numeric&  \pageref{Dlength}\par \pageref{DlengthString}\par \pageref{DlengthPicture}&  Number of components (arcs, characters, strokes, \ldots) in the argument\\\hline

Modified: trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman-app-refman.tex
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman-app-refman.tex	2024-02-20 17:51:29 UTC (rev 70012)
+++ trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman-app-refman.tex	2024-02-20 17:59:51 UTC (rev 70013)
@@ -558,7 +558,8 @@
 $\tt \qquad \;|\; abs \;|\; angle \;|\; arclength \;|\; ASCII \;|\; bbox \;|\; blackpart \;|\; bluepart \;|\; bot \;|\; bounded$\\
 $\tt \qquad \;|\; ceiling \;|\; center \;|\; char \;|\; clipped \;|\; colormodel \;|\; cosd \;|\; cyanpart  \;|\; cycle$\\
 $\tt \qquad \;|\; dashpart \;|\; decimal \;|\; dir \;|\; floor \;|\; filled \;|\; fontpart \;|\; fontsize$\\
-$\tt \qquad \;|\; greenpart \;|\; greypart \;|\; hex \;|\; inverse \;|\; known \;|\; length \;|\; lft \;|\; llcorner$\\
+$\tt \qquad \;|\; greenpart \;|\; greypart \;|\; hex \;|\; interval\_get\_left\_endpoint \;|\; interval\_get\_right\_endpoint$\\
+$\tt \qquad \;|\; interval\_set \;|\;  inverse \;|\; known \;|\; length \;|\; lft \;|\; llcorner$\\
 $\tt \qquad \;|\; lrcorner\;|\; magentapart \;|\; makepath \;|\; makepen \;|\; mexp \;|\; mlog \;|\; not \;|\; oct \;|\; odd$\\
 $\tt \qquad \;|\; pathpart \;|\; penpart \;|\; readfrom \;|\; redpart \;|\; reverse \;|\; round \;|\; rt \;|\; sind \;|\; sqrt$\\
 $\tt \qquad  \;|\; stroked \;|\; textpart \;|\; textual \;|\; top \;|\; ulcorner$\\
@@ -939,7 +940,7 @@
   in the current directory or specified via a full path.\\
   \cmdindex{-numbersystem}=\tdescr{string}
   & Set arithmetic mode to one of \texttt{scaled}, \texttt{double},
-  \texttt{binary}, \texttt{decimal}\\
+  \texttt{binary}, \texttt{decimal}, \texttt{interval}\\
   \cmdindex{-progname}=\tdescr{string}
   & Pretend to be the \tdescr{string} executable.\\
   \cmdindex{-recorder}

Modified: trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman.bib
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman.bib	2024-02-20 17:51:29 UTC (rev 70012)
+++ trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman.bib	2024-02-20 17:59:51 UTC (rev 70013)
@@ -128,6 +128,23 @@
                  significant slowdown with respect to other arbitrary-precision tools
                  --- and discuss a few applications where such a library can be useful.",
 }
+ at article{lib:mpfi,
+  author       = {Nathalie Revol and
+                  Fabrice Rouillier},
+  title        = {Motivations for an Arbitrary Precision Interval Arithmetic and the
+                  {MPFI} Library},
+  journal      = {Reliab. Comput.},
+  volume       = {11},
+  number       = {4},
+  pages        = {275--290},
+  year         = {2005},
+  url          = {https://doi.org/10.1007/s11155-005-6891-y},
+  doi          = {10.1007/S11155-005-6891-Y},
+  timestamp    = {Thu, 16 Apr 2020 11:28:20 +0200},
+  biburl       = {https://dblp.org/rec/journals/rc/RevolR05.bib},
+  bibsource    = {dblp computer science bibliography, https://dblp.org}
+}
+
 @misc{lib:decnumber,
   key = "decnumber",
   title = "dec{N}umber {ANSI} {C} implementation of General Decimal Arithmetic",

Modified: trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman.tex
===================================================================
--- trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman.tex	2024-02-20 17:51:29 UTC (rev 70012)
+++ trunk/Master/texmf-dist/doc/metapost/base/source-manual/mpman.tex	2024-02-20 17:59:51 UTC (rev 70013)
@@ -14,7 +14,7 @@
 \usepackage[nofancy]{svninfo}% Access VCS information.
 \svnInfo $Id$
 %\svnInfo $Id$
-\newcommand*{\mpversion}{2.00}
+\newcommand*{\mpversion}{2.10}
 
 \usepackage[T1]{fontenc}
 \usepackage{lmodern}
@@ -63,8 +63,9 @@
 
 \usepackage{multicol}
 \usepackage[rgb,x11names]{xcolor}% Optimize for screen reading.
+\usepackage{hyperref}
 \usepackage{hyperxmp}
-\usepackage{hyperref}
+%%\usepackage{hyperref}
 \hypersetup{
   pdftitle={MetaPost: A User's Manual},
   pdfauthor={John D. Hobby and the MetaPost development team},



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