diff options
author | Karl Berry <karl@freefriends.org> | 2019-05-17 20:56:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-05-17 20:56:26 +0000 |
commit | 05e9b35a727bb46f989306cbfdc2cf5e7ad374d2 (patch) | |
tree | 96e823627da3436b76232a6ae878e549702b9335 /Master | |
parent | 5d3cadfdc2be7609fb2af4a472870c838bafda75 (diff) |
pst-func (17may19)
git-svn-id: svn://tug.org/texlive/trunk@51149 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-func/Changes | 1 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf | bin | 3943887 -> 3956145 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-func/pst-func.tex | 327 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pst-func/pst-func.sty | 2 |
4 files changed, 169 insertions, 161 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-func/Changes b/Master/texmf-dist/doc/generic/pst-func/Changes index 0f24b1707fe..cd9eec4c30f 100644 --- a/Master/texmf-dist/doc/generic/pst-func/Changes +++ b/Master/texmf-dist/doc/generic/pst-func/Changes @@ -1,4 +1,5 @@ ..... pst-func.tex +0.93 2019-05-17 - fix for missing end in a local dictionary (\psBinomialX) 0.92 2018-12-13 - allow algebraic mode for \pscumIntegral 0.91 2018-11-15 - new algorithm for sin/cos integral to prevent problems with large values diff --git a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf Binary files differindex beddeb87704..e3f65b7c0cd 100644 --- a/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf +++ b/Master/texmf-dist/doc/generic/pst-func/pst-func-doc.pdf diff --git a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex index 253e3f48ce6..0bef36090b6 100644 --- a/Master/texmf-dist/tex/generic/pst-func/pst-func.tex +++ b/Master/texmf-dist/tex/generic/pst-func/pst-func.tex @@ -31,8 +31,8 @@ % interface to the `xkeyval' package \pst@addfams{pst-func} % -\def\fileversion{0.92} -\def\filedate{2018/12/13} +\def\fileversion{0.93} +\def\filedate{2019/05/17} \message{`PST-func' v\fileversion, \filedate\space (hv)} % \pstheader{pst-func.pro} @@ -581,51 +581,56 @@ kOld scx 0 moveto % starting point# %%---------------------------------------------------------------------------------------------------------------------------------------------------------------- %%-------------------- Code, der bei gro{\ss}em N \"{u}ber den Logarithmus arbeitet von Manuel Luque --------------------------------------------- - /SumLog {% log(1) + log(2) + ... + log(n) = log(n!) - 1 dict begin % Erwartet die Eingabe eines Wertes, n\"{a}mlich bis zu welchem Wert addiert werden soll ---> n - /nV exch def % der \"{u}bergebene Wert wird in nV abgespeichert - /iV 1 def % Startwert ist iV=1 - 0 nV { iV log add /iV iV 1 add def } repeat % 0 + log(1) + log(2) + ... + log(n) Die Null ist dazu n\"{o}tig um die erste Addition machen zu k\"{o}nnen - end - } def - /binomial_comb{ % log(N!) - log(k!) - log((n-k)!) = log[N!/(k!*(n-k)!)] - 2 dict begin - /nV exch def - /NV exch def - NV SumLog nV SumLog sub - NV nV sub SumLog sub - end - } def - /PnN { - 3 dict begin - /pV exch def - /nV exch def - /NV exch def - 10 - NV nV binomial_comb - nV pV log mul - NV nV sub 1 pV sub log mul add add - exp - } def + /SumLog {% log(1) + log(2) + ... + log(n) = log(n!) + 2 dict begin % Erwartet die Eingabe eines Wertes, n\"{a}mlich bis zu welchem Wert addiert werden soll ---> n + /nV exch def % der \"{u}bergebene Wert wird in nV abgespeichert + /iV 1 def % Startwert ist iV=1 + 0 nV { iV log add /iV iV 1 add def } repeat % 0 + log(1) + log(2) + ... + log(n) Die Null ist dazu n\"{o}tig um die erste Addition machen zu k\"{o}nnen + end + } def + /binomial_comb{ % log(N!) - log(k!) - log((n-k)!) = log[N!/(k!*(n-k)!)] + 2 dict begin + /nV exch def + /NV exch def + NV SumLog nV SumLog sub + NV nV sub SumLog sub + end + } def + /PnN { + 3 dict begin + /pV exch def + /nV exch def + /NV exch def + 10 + NV nV binomial_comb + nV pV log mul + NV nV sub 1 pV sub log mul add add + exp + end + } def %%------------------------------------------------------------------------------------------------ %%------------------------------------------------------------------------------------------------ - N ValueSwitch2Log gt { } {% - 0 1 m 1 sub {% - /k exch def % save loop variable - k 0 eq - { /Y q N exp def } - { /Y Y N k sub 1 add mul k div p mul q div def } - ifelse - } for - } ifelse - m 1 n {% % n-m+1 times - /k exch def % save loop variable - N ValueSwitch2Log gt { N k p PnN /Y exch def } - { k 0 eq - { /Y q N exp def } - { /Y Y N k sub 1 add mul k div p mul q div def } - ifelse - } ifelse % recursive definition + N ValueSwitch2Log gt + { } + { 0 1 m 1 sub + {% + /k exch def % save loop variable + k 0 eq + { /Y q N exp def } + { /Y Y N k sub 1 add mul k div p mul q div def } + ifelse + } for + } ifelse + m 1 n {% % n-m+1 times + /k exch def % save loop variable + N ValueSwitch2Log gt + { N k p PnN /Y exch def } + { k 0 eq + { /Y q N exp def } + { /Y Y N k sub 1 add mul k div p mul q div def } + ifelse + } + ifelse % recursive definition \ifx\psk@fillstylename\pst@alternateColors newpath kOld scx 0 moveto @@ -725,7 +730,7 @@ \else\psBinomialF@iii{#1}{#2}{#3}{#5}\fi \fi}% \def\psBinomialF@iii#1#2#3#4{% - \addbefore@par{valuewidth=15}% + \addbefore@par{valuewidth=15}% \begin@OpenObj \addto@pscode{% /ValueSwitch2Log \psFunc@Switch2Log\space def @@ -740,72 +745,75 @@ \ifPst@markZeros /kOld dx neg m add def \else /kOld m def \fi \psFunc@leftEnd 0 eq - { } - { kOld 0 eq - { kOld \psFunc@leftEnd sub scx 0 moveto % starting point - \ifPst@LineEnding - kOld \psFunc@radiusout\pst@number\psxunit div sub scx 0 L stroke - kOld scx 0 newpath \psFunc@radiusout 0 360 arc kOld scx 0 \psFunc@radiusinR 360 0 arcn closepath \pst@usecolor\psk@LineEndColorR fill \else - kOld scx 0 L stroke \fi } - { } ifelse } ifelse + { } + { kOld 0 eq + { kOld \psFunc@leftEnd sub scx 0 moveto % starting point + \ifPst@LineEnding + kOld \psFunc@radiusout\pst@number\psxunit div sub scx 0 L stroke + kOld scx 0 newpath \psFunc@radiusout 0 360 arc kOld scx 0 + \psFunc@radiusinR 360 0 arcn closepath \pst@usecolor\psk@LineEndColorR fill + \else + kOld scx 0 L stroke + \fi + }{ } ifelse } ifelse kOld scx 0 moveto % starting point %%---------------------------------------------------------------------------------------------------------------------------------------------------------------- %%-------------------- Code, der bei gro{\ss}em N \"{u}ber den Logarithmus arbeitet von Manuel Luque --------------------------------------------- - /SumLog {% log(1) + log(2) + ... + log(n) = log(n!) - 1 dict begin % Erwartet die Eingabe eines Wertes, n\"{a}mlich bis zu welchem Wert addiert werden soll ---> n - /nV exch def % der \"{u}bergebene Wert wird in nV abgespeichert - /iV 1 def % Startwert ist iV=1 - 0 nV { iV log add /iV iV 1 add def } repeat % 0 + log(1) + log(2) + ... + log(n) Die Null ist dazu n\"{o}tig um die erste Addition machen zu k\"{o}nnen - end - } def - /binomial_comb{ % log(N!) - log(k!) - log((n-k)!) = log[N!/(k!*(n-k)!)] - 2 dict begin - /nV exch def - /NV exch def - NV SumLog nV SumLog sub - NV nV sub SumLog sub - end - } def - /PnN { - 3 dict begin - /pV exch def - /nV exch def - /NV exch def - 10 - NV nV binomial_comb - nV pV log mul - NV nV sub 1 pV sub log mul add add - exp - } def + /SumLog {% log(1) + log(2) + ... + log(n) = log(n!) + 2 dict begin % Erwartet die Eingabe eines Wertes, n\"{a}mlich bis zu welchem Wert addiert werden soll ---> n + /nV exch def % der \"{u}bergebene Wert wird in nV abgespeichert + /iV 1 def % Startwert ist iV=1 + 0 nV { iV log add /iV iV 1 add def } repeat % 0 + log(1) + log(2) + ... + log(n) Die Null ist dazu n\"{o}tig um die erste Addition machen zu k\"{o}nnen + end + } def + /binomial_comb{ % log(N!) - log(k!) - log((n-k)!) = log[N!/(k!*(n-k)!)] + 2 dict begin + /nV exch def + /NV exch def + NV SumLog nV SumLog sub + NV nV sub SumLog sub + end + } def + /PnN { + 3 dict begin + /pV exch def + /nV exch def + /NV exch def + 10 + NV nV binomial_comb + nV pV log mul + NV nV sub 1 pV sub log mul add add + exp + end + } def %%------------------------------------------------------------------------------------------------ %%------------------------------------------------------------------------------------------------ - 0 1 m 1 sub { - /k exch def % save loop variable - N ValueSwitch2Log gt { k 0 eq - { N k p PnN /Y exch def /F Y def } - { N k p PnN /Y exch def /F F Y add def } - ifelse } - { k 0 eq - { /Y q N exp def - /F Y def } - { /Y Y N k sub 1 add mul k div p mul q div def - /F F Y add def - } ifelse - } ifelse - } for - m 1 n { % n-m+1 times - /k exch def % save loop variable - N ValueSwitch2Log gt { k 0 eq - { N k p PnN /Y exch def /F Y def } - { N k p PnN /Y exch def /F F Y add def } ifelse } - { k 0 eq - { /Y q N exp def - /F Y def } - { /Y Y N k sub 1 add mul k div p mul q div def - /F F Y add def - } ifelse - } ifelse % recursive definition - F 1 gt { /F 1 def } if + 0 1 m 1 sub { + /k exch def % save loop variable + N ValueSwitch2Log gt { k 0 eq + { N k p PnN /Y exch def /F Y def } + { N k p PnN /Y exch def /F F Y add def } + ifelse + }{ k 0 eq + { /Y q N exp def /F Y def } + { /Y Y N k sub 1 add mul k div p mul q div def + /F F Y add def + } ifelse + } ifelse + } for + m 1 n { % n-m+1 times + /k exch def % save loop variable + N ValueSwitch2Log gt + { k 0 eq + { N k p PnN /Y exch def /F Y def } + { N k p PnN /Y exch def /F F Y add def } + ifelse } + { k 0 eq + { /Y q N exp def /F Y def } + { /Y Y N k sub 1 add mul k div p mul q div def /F F Y add def + } ifelse + } ifelse % recursive definition + F 1 gt { /F 1 def } if \ifPst@markZeros kOld scx F scy L k dx add scx F scy L k dx add scx 0 L kOld 1 add scx 0 L \else kOld scx F scy newpath \psFunc@radiusout 0 360 arc kOld scx F scy \psFunc@radiusinL 360 0 arcn closepath \pst@usecolor\psk@LineEndColorL fill @@ -875,60 +883,58 @@ kOld scx 0 moveto % starting point %%---------------------------------------------------------------------------------------------------------------------------------------------------------------- %%-------------------- Code, der bei gro{\ss}em N \"{u}ber den Logarithmus arbeitet von Manuel Luque --------------------------------------------- - /SumLog {% log(1) + log(2) + ... + log(n) = log(n!) - 1 dict begin % Erwartet die Eingabe eines Wertes, n\"{a}mlich bis zu welchem Wert addiert werden soll ---> n - /nV exch def % der \"{u}bergebene Wert wird in nV abgespeichert - /iV 1 def % Startwert ist iV=1 - 0 nV { iV log add /iV iV 1 add def } repeat % 0 + log(1) + log(2) + ... + log(n) Die Null ist dazu n\"{o}tig um die erste Addition machen zu k\"{o}nnen - end - } def - /binomial_comb{ % log(N!) - log(k!) - log((n-k)!) = log[N!/(k!*(n-k)!)] - 2 dict begin - /nV exch def - /NV exch def - NV SumLog nV SumLog sub - NV nV sub SumLog sub - end - } def - /PnN { - 3 dict begin - /pV exch def - /nV exch def - /NV exch def - 10 - NV nV binomial_comb - nV pV log mul - NV nV sub 1 pV sub log mul add add - exp - } def -%%------------------------------------------------------------------------------------------------ + /SumLog {% log(1) + log(2) + ... + log(n) = log(n!) + 2 dict begin % Erwartet die Eingabe eines Wertes, n\"{a}mlich bis zu welchem Wert addiert werden soll ---> n + /nV exch def % der \"{u}bergebene Wert wird in nV abgespeichert + /iV 1 def % Startwert ist iV=1 + 0 nV { iV log add /iV iV 1 add def } repeat % 0 + log(1) + log(2) + ... + log(n) Die Null ist dazu n\"{o}tig um die erste Addition machen zu k\"{o}nnen + end + } def + /binomial_comb{ % log(N!) - log(k!) - log((n-k)!) = log[N!/(k!*(n-k)!)] + 2 dict begin + /nV exch def + /NV exch def + NV SumLog nV SumLog sub + NV nV sub SumLog sub + end + } def + /PnN { + 3 dict begin + /pV exch def + /nV exch def + /NV exch def + 10 + NV nV binomial_comb + nV pV log mul + NV nV sub 1 pV sub log mul add add + exp + end + } def %%------------------------------------------------------------------------------------------------ - 0 1 m 1 sub { - /k exch def % save loop variable - N ValueSwitch2Log gt { k 0 eq - { N k p PnN /Y exch def /F Y def /FS 1 F sub def } - { N k p PnN /Y exch def /F F Y add def /FS 1 F sub def } - ifelse } - { k 0 eq - { /Y q N exp def - /F Y def /FS 1 F sub def } - { /Y Y N k sub 1 add mul k div p mul q div def - /F F Y add def /FS 1 F sub def } - ifelse } ifelse - } for - m 1 n { % n-m+1 times - /k exch def % save loop variable - N ValueSwitch2Log gt { k 0 eq - { N k p PnN /Y exch def /F Y def /FS 1 F sub def } - { N k p PnN /Y exch def /F F Y add def /FS 1 F sub def } ifelse } - { k 0 eq - { /Y q N exp def - /F Y def /FS 1 F sub def } - { /Y Y N k sub 1 add mul k div p mul q div def - /F F Y add def /FS 1 F sub def } - ifelse - } ifelse % recursive definition - FS 0 lt { /FS 0 def } if + 0 1 m 1 sub { + /k exch def % save loop variable + N ValueSwitch2Log gt { k 0 eq + { N k p PnN /Y exch def /F Y def /FS 1 F sub def } + { N k p PnN /Y exch def /F F Y add def /FS 1 F sub def } + ifelse } + { k 0 eq + { /Y q N exp def /F Y def /FS 1 F sub def } + { /Y Y N k sub 1 add mul k div p mul q div def + /F F Y add def /FS 1 F sub def } + ifelse } ifelse + } for + m 1 n { % n-m+1 times + /k exch def % save loop variable + N ValueSwitch2Log gt { k 0 eq + { N k p PnN /Y exch def /F Y def /FS 1 F sub def } + { N k p PnN /Y exch def /F F Y add def /FS 1 F sub def } ifelse } + { k 0 eq + { /Y q N exp def /F Y def /FS 1 F sub def } + { /Y Y N k sub 1 add mul k div p mul q div def + /F F Y add def /FS 1 F sub def } + ifelse + } ifelse % recursive definition + FS 0 lt { /FS 0 def } if \ifPst@markZeros kOld scx FS scy L k dx add scx FS scy L k dx add scx 0 L kOld 1 add scx 0 L \else \ifPst@LineEnding @@ -1033,6 +1039,7 @@ nV pV log mul NV nV sub 1 pV sub log mul add add exp + end } def %%------------------------------------------------------------------------------------------------ %%------------------------------------------------------------------------------------------------ diff --git a/Master/texmf-dist/tex/latex/pst-func/pst-func.sty b/Master/texmf-dist/tex/latex/pst-func/pst-func.sty index 65c6f37b5d0..5deceb30196 100644 --- a/Master/texmf-dist/tex/latex/pst-func/pst-func.sty +++ b/Master/texmf-dist/tex/latex/pst-func/pst-func.sty @@ -13,4 +13,4 @@ \ProvidesFile{pst-func.pro}[2018/12/13 v. 0.17, PostScript prologue file (hv)] \@addtofilelist{pst-func.pro}}{}% \endinput -%% $Id: pst-func.sty 861 2018-12-13 20:40:06Z herbert $ +%% $Id: pst-func.sty 887 2018-12-29 13:17:59Z herbert $ |