Skip to content

Commit

Permalink
build based on 9437c3f
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Dec 5, 2023
1 parent 64d72b4 commit 6552cab
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2023-12-01T00:59:42","documenter_version":"1.2.0"}}
{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2023-12-05T02:01:50","documenter_version":"1.2.1"}}
54 changes: 27 additions & 27 deletions dev/api/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/background/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
s(t) = \sin(f(t)) , \qquad
s_k = \frac{1}{k}\sum_{j=0}^{k-1} (k-j) \, f_{k-j} \, c_j; \\
c(t) = \cos(f(t)) , \qquad
c_k = -\frac{1}{k}\sum_{j=0}^{k-1} (k-j) \, f_{k-j} \, s_j.\]</p><p>The recursion relations for <span>$s(t) = \sin\big(f(t)\big)$</span> and <span>$c(t) = \cos\big(f(t)\big)$</span> depend on each other; this reflects the fact that they are solutions of a second-order differential equation.</p><p>All these relations hold for Taylor expansions in one and more independent variables; in the latter case, the Taylor coefficients <span>$f_k$</span> are homogeneous polynomials of degree <span>$k$</span>; see <a href="#refs">[2]</a>.</p><h2 id="refs"><a class="docs-heading-anchor" href="#refs">References</a><a id="refs-1"></a><a class="docs-heading-anchor-permalink" href="#refs" title="Permalink"></a></h2><p>[1] W. Tucker, <em>Validated Numerics: A Short Introduction to Rigorous Computations</em>, Princeton University Press (2011).</p><p>[2] A. Haro, <em>Automatic differentiation methods in computational dynamical systems: Invariant manifolds and normal forms of vector fields at fixed points</em>, <a href="http://www.maia.ub.es/~alex/admcds/admcds.pdf">preprint</a>.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../userguide/">User guide »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.0 on <span class="colophon-date" title="Friday 1 December 2023 00:59">Friday 1 December 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
c_k = -\frac{1}{k}\sum_{j=0}^{k-1} (k-j) \, f_{k-j} \, s_j.\]</p><p>The recursion relations for <span>$s(t) = \sin\big(f(t)\big)$</span> and <span>$c(t) = \cos\big(f(t)\big)$</span> depend on each other; this reflects the fact that they are solutions of a second-order differential equation.</p><p>All these relations hold for Taylor expansions in one and more independent variables; in the latter case, the Taylor coefficients <span>$f_k$</span> are homogeneous polynomials of degree <span>$k$</span>; see <a href="#refs">[2]</a>.</p><h2 id="refs"><a class="docs-heading-anchor" href="#refs">References</a><a id="refs-1"></a><a class="docs-heading-anchor-permalink" href="#refs" title="Permalink"></a></h2><p>[1] W. Tucker, <em>Validated Numerics: A Short Introduction to Rigorous Computations</em>, Princeton University Press (2011).</p><p>[2] A. Haro, <em>Automatic differentiation methods in computational dynamical systems: Invariant manifolds and normal forms of vector fields at fixed points</em>, <a href="http://www.maia.ub.es/~alex/admcds/admcds.pdf">preprint</a>.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../userguide/">User guide »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Tuesday 5 December 2023 02:01">Tuesday 5 December 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
4 changes: 2 additions & 2 deletions dev/examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
s = one(T) + x + y + z + w
s = s^degree
s * ( s + one(T) )
end</code><code class="nohighlight hljs ansi" style="display:block;">fateman1 (generic function with 1 method)</code></pre><p>(In the following lines, which are run when the documentation is built, by some reason the timing appears before the command executed.)</p><pre><code class="language-julia-repl hljs" style="display:block;">julia&gt; @time fateman1(0);</code><code class="nohighlight hljs ansi" style="display:block;"> 0.048390 seconds (55.04 k allocations: 41.074 MiB, 14.82% gc time, 52.85% compilation time)</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; @time f1 = fateman1(20);</code><code class="nohighlight hljs ansi" style="display:block;"> 1.679143 seconds (1.86 k allocations: 49.837 MiB, 0.34% gc time)</code></pre><p>Another implementation of the same, but exploiting optimizations related to <code>^2</code> yields:</p><pre><code class="language-julia-repl hljs" style="display:block;">julia&gt; function fateman2(degree::Int)
end</code><code class="nohighlight hljs ansi" style="display:block;">fateman1 (generic function with 1 method)</code></pre><p>(In the following lines, which are run when the documentation is built, by some reason the timing appears before the command executed.)</p><pre><code class="language-julia-repl hljs" style="display:block;">julia&gt; @time fateman1(0);</code><code class="nohighlight hljs ansi" style="display:block;"> 0.044044 seconds (55.04 k allocations: 41.074 MiB, 14.80% gc time, 50.90% compilation time)</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; @time f1 = fateman1(20);</code><code class="nohighlight hljs ansi" style="display:block;"> 1.687105 seconds (1.86 k allocations: 49.837 MiB, 0.30% gc time)</code></pre><p>Another implementation of the same, but exploiting optimizations related to <code>^2</code> yields:</p><pre><code class="language-julia-repl hljs" style="display:block;">julia&gt; function fateman2(degree::Int)
T = Int128
s = one(T) + x + y + z + w
s = s^degree
s^2 + s
end</code><code class="nohighlight hljs ansi" style="display:block;">fateman2 (generic function with 1 method)</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; fateman2(0);</code><code class="nohighlight hljs ansi" style="display:block;"></code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; @time f2 = fateman2(20); # the timing appears above</code><code class="nohighlight hljs ansi" style="display:block;"> 0.852953 seconds (1.99 k allocations: 53.986 MiB, 0.31% gc time)</code></pre><p>We note that the above functions use expansions in <code>Int128</code>. This is actually required, since some coefficients are larger than <code>typemax(Int)</code>:</p><pre><code class="language-julia-repl hljs" style="display:block;">julia&gt; getcoeff(f2, (1,6,7,20)) # coefficient of x y^6 z^7 w^{20}</code><code class="nohighlight hljs ansi" style="display:block;">128358585324486316800</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; ans &gt; typemax(Int)</code><code class="nohighlight hljs ansi" style="display:block;">true</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; length(f2)</code><code class="nohighlight hljs ansi" style="display:block;">41</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; sum(TaylorSeries.size_table)</code><code class="nohighlight hljs ansi" style="display:block;">135751</code><code class="nohighlight hljs ansi" style="display:block;"></code></pre><p>These examples show that <code>fateman2</code> is nearly twice as fast as <code>fateman1</code>, and that the series has 135751 monomials in 4 variables.</p><h3 id="Benchmarks"><a class="docs-heading-anchor" href="#Benchmarks">Benchmarks</a><a id="Benchmarks-1"></a><a class="docs-heading-anchor-permalink" href="#Benchmarks" title="Permalink"></a></h3><p>The functions described above have been compared against Mathematica v11.1. The relevant files used for benchmarking can be found <a href="https://github.com/JuliaDiff/TaylorSeries.jl/tree/master/perf">here</a>. Running on a MacPro with Intel-Xeon processors 2.7GHz, we obtain that Mathematica requires on average (5 runs) 3.075957 seconds for the computation, while for <code>fateman1</code> and <code>fateman2</code> above we obtain 2.15408 and 1.08337, respectively.</p><p>Then, with the current version of <code>TaylorSeries.jl</code> and using Julia v0.7.0, our implementation of <code>fateman1</code> is about 30%-40% faster. (The original test by Fateman corresponds to <code>fateman1</code> above, which avoids some optimizations related to squaring; the implementation in Mathematica is done such that this optimization does not occur.)</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../userguide/">« User guide</a><a class="docs-footer-nextpage" href="../api/">API »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.0 on <span class="colophon-date" title="Friday 1 December 2023 00:59">Friday 1 December 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
end</code><code class="nohighlight hljs ansi" style="display:block;">fateman2 (generic function with 1 method)</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; fateman2(0);</code><code class="nohighlight hljs ansi" style="display:block;"></code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; @time f2 = fateman2(20); # the timing appears above</code><code class="nohighlight hljs ansi" style="display:block;"> 0.853971 seconds (1.99 k allocations: 53.986 MiB, 0.29% gc time)</code></pre><p>We note that the above functions use expansions in <code>Int128</code>. This is actually required, since some coefficients are larger than <code>typemax(Int)</code>:</p><pre><code class="language-julia-repl hljs" style="display:block;">julia&gt; getcoeff(f2, (1,6,7,20)) # coefficient of x y^6 z^7 w^{20}</code><code class="nohighlight hljs ansi" style="display:block;">128358585324486316800</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; ans &gt; typemax(Int)</code><code class="nohighlight hljs ansi" style="display:block;">true</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; length(f2)</code><code class="nohighlight hljs ansi" style="display:block;">41</code><br/><code class="language-julia-repl hljs" style="display:block;">julia&gt; sum(TaylorSeries.size_table)</code><code class="nohighlight hljs ansi" style="display:block;">135751</code><code class="nohighlight hljs ansi" style="display:block;"></code></pre><p>These examples show that <code>fateman2</code> is nearly twice as fast as <code>fateman1</code>, and that the series has 135751 monomials in 4 variables.</p><h3 id="Benchmarks"><a class="docs-heading-anchor" href="#Benchmarks">Benchmarks</a><a id="Benchmarks-1"></a><a class="docs-heading-anchor-permalink" href="#Benchmarks" title="Permalink"></a></h3><p>The functions described above have been compared against Mathematica v11.1. The relevant files used for benchmarking can be found <a href="https://github.com/JuliaDiff/TaylorSeries.jl/tree/master/perf">here</a>. Running on a MacPro with Intel-Xeon processors 2.7GHz, we obtain that Mathematica requires on average (5 runs) 3.075957 seconds for the computation, while for <code>fateman1</code> and <code>fateman2</code> above we obtain 2.15408 and 1.08337, respectively.</p><p>Then, with the current version of <code>TaylorSeries.jl</code> and using Julia v0.7.0, our implementation of <code>fateman1</code> is about 30%-40% faster. (The original test by Fateman corresponds to <code>fateman1</code> above, which avoids some optimizations related to squaring; the implementation in Mathematica is done such that this optimization does not occur.)</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../userguide/">« User guide</a><a class="docs-footer-nextpage" href="../api/">API »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.2.1 on <span class="colophon-date" title="Tuesday 5 December 2023 02:01">Tuesday 5 December 2023</span>. Using Julia version 1.9.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 6552cab

Please sign in to comment.