texlive[49166] Master/texmf-dist: pst-func (15nov18)

commits+karl at tug.org commits+karl at tug.org
Thu Nov 15 23:20:36 CET 2018


Revision: 49166
          http://tug.org/svn/texlive?view=revision&revision=49166
Author:   karl
Date:     2018-11-15 23:20:36 +0100 (Thu, 15 Nov 2018)
Log Message:
-----------
pst-func (15nov18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/pst-func/Changes
    trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
    trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
    trunk/Master/texmf-dist/dvips/pst-func/pst-func.pro
    trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-func/Changes	2018-11-15 20:04:25 UTC (rev 49165)
+++ trunk/Master/texmf-dist/doc/generic/pst-func/Changes	2018-11-15 22:20:36 UTC (rev 49166)
@@ -1,4 +1,5 @@
 ..... pst-func.tex
+0.90  2018-11-14  - fix bug with latest Ghostscript 
 0.89  2018-04-08  - added labelangle and labeldistance for \psZero, 
 0.88  2017-08-24  - use always URW fonts instead of PostScript, 
                     eg Helvetica->NimbusSanL

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex	2018-11-15 20:04:25 UTC (rev 49165)
+++ trunk/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.tex	2018-11-15 22:20:36 UTC (rev 49166)
@@ -1184,11 +1184,11 @@
 
 \begin{LTXexample}[pos=t]
 \psset{xunit=0.5}
-\begin{pspicture}(-15,-4.5)(15,2)
-  \psaxes[dx=1cm,Dx=2]{->}(0,0)(-15.1,-4)(15,2)
-  \psplot[plotpoints=1000]{-14.5}{14.5}{ x RadtoDeg sin x div }
-  \psSi[plotpoints=1500,linecolor=red,linewidth=1pt]{-14.5}{14.5}
-  \pssi[plotpoints=1500,linecolor=blue,linewidth=1pt]{-14.5}{14.5}
+\begin{pspicture}(-14,-4.5)(14,2)
+  \psaxes[dx=1cm,Dx=2]{->}(0,0)(-13.1,-4)(13,2)
+  \psplot[plotpoints=1000]{-12.5}{12.5}{ x RadtoDeg sin x div }
+  \psSi[plotpoints=1500,linecolor=red,linewidth=1pt]{-12.5}{12.5}
+  \pssi[plotpoints=1500,linecolor=blue,linewidth=1pt]{-12.5}{12.5}
   \rput(-5,1.5){\color{red}$Si(x)=\int\limits_{0}^x \frac{\sin(t)}{t}\dt$}  
   \rput(8,-1.5){\color{blue}$si(x)=-\int\limits_{x}^{\infty} \frac{\sin(t)}{t}\dt=Si(x)-\frac{\pi}{2}$}  
   \rput(8,.5){$f(x)= \frac{\sin(t)}{t}$}
@@ -1199,8 +1199,8 @@
 
 \begin{LTXexample}[pos=t]
 \psset{xunit=0.5}
-\begin{pspicture*}(-15,-4.2)(15,4.2)
-  \psaxes[dx=1cm,Dx=2]{->}(0,0)(-15.1,-4)(15,4)
+\begin{pspicture*}(-13,-4.2)(13,4.2)
+  \psaxes[dx=1cm,Dx=2]{->}(0,0)(-12.1,-4)(12,4)
   \psplot[plotpoints=1000]{-14.5}{14.5}{ x RadtoDeg cos x Div }
   \psCi[plotpoints=500,linecolor=red,linewidth=1pt]{-11.5}{11.5}
   \psci[plotpoints=500,linecolor=blue,linewidth=1pt]{-11.5}{11.5}

Modified: trunk/Master/texmf-dist/dvips/pst-func/pst-func.pro
===================================================================
--- trunk/Master/texmf-dist/dvips/pst-func/pst-func.pro	2018-11-15 20:04:25 UTC (rev 49165)
+++ trunk/Master/texmf-dist/dvips/pst-func/pst-func.pro	2018-11-15 22:20:36 UTC (rev 49166)
@@ -23,6 +23,7 @@
 %
 /eps1 1.0e-05 def
 /eps2 1.0e-04 def
+/eps5 1.0e-05 def
 /eps8 1.0e-08 def
 %
 /PiHalf 1.57079632679489661925640 def
@@ -29,9 +30,11 @@
 /CEuler 0.5772156649 def % Euler-Mascheroni constant
 %
 /factorial { % n on stack, returns n! 
-  dup 0 eq { 1 }{ 
-    dup 1 gt { dup 1 sub factorial mul } if }
-  ifelse } def 
+  dup 32 gt { pop 1e32 } {
+    dup 0 eq { 1 }{ 
+      dup 1 gt { dup 1 sub factorial mul } if }
+    ifelse } ifelse 
+} def 
 %
 /MoverN { % m n on stack, returns the binomial coefficient m over n
   2 dict begin
@@ -121,44 +124,49 @@
   end
   false /Lineto /lineto load def Line
 } def
-%
+%%
 /Si { % integral sin from 0 to x (arg on stack)
-  /arg exch def
-  /Sum arg def
-  /sign -1 def
-  /index 3 def
-  { 
-    arg index exp index div index factorial div sign mul 
+  10 dict begin				% hold all local
+  /arg exch def  % x
+  /Sum arg def   %
+  /sign -1 def   
+  /I 3 def
+  { %  a sequence of x - x^3/(3*3!) + x^5/(5*5!) -...+...
+    arg I Power dup abs 1e30 gt { pop exit } if
+    I factorial div I div sign mul 
     dup abs eps8 lt { pop exit } if 
     Sum add /Sum exch def
     /sign sign neg def
-    /index index 2 add def
+    /I I 2 add def
   } loop
   Sum
+  end
 } def
+%
 /si { % integral sin from x to infty -> si(x)=Si(x)-pi/2
   Si PiHalf sub
 } def
+%
 /Ci { % integral cosin from x to infty (arg on stack)
+  10 dict begin				% hold all local
   abs /arg exch def
   arg 0 eq { 0 } { 
-    /argExp 1 def
-    /fact 1 def
     /Sum CEuler arg ln add def
     /sign -1 def
-    /index 2 def
+    /I 2 def
     { 
-      /argExp argExp arg arg mul mul def
-      /fact fact index 1 sub index mul mul def
-      argExp index div fact div sign mul 
-      dup abs exch Sum add /Sum exch def
-      eps8 lt { exit } if
-      /sign sign neg def
-      /index index 2 add def
+    arg I Power dup abs 1e30 gt { pop exit } if
+    I factorial div I div sign mul 
+    dup abs eps8 lt { pop exit } if 
+    Sum add /Sum exch def
+    /sign sign neg def
+    /I I 2 add def
     } loop
     Sum
   } ifelse
+  end
 } def
+%
 /ci { % integral cosin from x to infty -> ci(x)=-Ci(x)+ln(x)+CEuler
   dup Ci neg exch abs ln add CEuler add
 } def

Modified: trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex	2018-11-15 20:04:25 UTC (rev 49165)
+++ trunk/Master/texmf-dist/tex/generic/pst-func/pst-func.tex	2018-11-15 22:20:36 UTC (rev 49166)
@@ -31,8 +31,8 @@
 % interface to the `xkeyval' package
 \pst at addfams{pst-func}
 %
-\def\fileversion{0.89}
-\def\filedate{2018/04/08}
+\def\fileversion{0.90}
+\def\filedate{2018/11/14}
 \message{`PST-func' v\fileversion, \filedate\space (hv)}
 %
 \pstheader{pst-func.pro}
@@ -1238,10 +1238,10 @@
   \def\pst at tempA{#1}%
   \ifdim#1pt<\z@ \psline(#1,0)(0,0)\def\pst at tempA{0}\fi
   \psplot[algebraic=false]{\pst at tempA}{#2}{
-    \psk at alpha \psk at beta \psk at alpha neg exp mul % alpha*beta^(-alpha)
-    x \psk at alpha 1 sub exp                      % x^(alpha-1)
+    \psk at alpha \psk at beta \psk at alpha neg Power mul % alpha*beta^(-alpha)
+    x \psk at alpha 1 sub Power                      % x^(alpha-1)
     mul
-    Euler x \psk at beta div \psk at alpha exp neg exp % e^(-(x/beta)^alpha))
+    Euler x \psk at beta div \psk at alpha Power neg Power % e^(-(x/beta)^alpha))
     mul }
   \end at OpenObj%
   \ignorespaces%
@@ -1254,7 +1254,7 @@
   \ifdim#1pt<\z@ \psline(#1,0)(0,0)\def\pst at tempA{0}\fi
   \psplot[algebraic=false]{\pst at tempA}{#2}{
     1
-    Euler x \psk at beta div \psk at alpha exp neg exp % e^(-(x/beta)^alpha))
+    Euler x \psk at beta div \psk at alpha Power neg Power % e^(-(x/beta)^alpha))
     sub
   }%
   \end at OpenObj%



More information about the tex-live-commits mailing list