Skip to content

Commit

Permalink
build based on ae47f13
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Aug 22, 2024
1 parent 8b43fc4 commit a925f4d
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 57 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.10.4","generation_timestamp":"2024-08-02T20:48:09","documenter_version":"1.5.0"}}
{"documenter":{"julia_version":"1.10.4","generation_timestamp":"2024-08-22T15:11:21","documenter_version":"1.6.0"}}
54 changes: 27 additions & 27 deletions dev/api/index.html

Large diffs are not rendered by default.

53 changes: 29 additions & 24 deletions dev/assets/documenter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Friday 2 August 2024 20:48">Friday 2 August 2024</span>. Using Julia version 1.10.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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.6.0 on <span class="colophon-date" title="Thursday 22 August 2024 15:11">Thursday 22 August 2024</span>. Using Julia version 1.10.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.039879 seconds (46.56 k allocations: 28.042 MiB, 70.29% 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.840439 seconds (1.22 k allocations: 31.153 MiB, 4.49% 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.038289 seconds (46.56 k allocations: 28.038 MiB, 70.00% 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.810982 seconds (1.22 k allocations: 31.153 MiB, 4.22% 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.893021 seconds (1.28 k allocations: 33.228 MiB, 0.22% 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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.5.0 on <span class="colophon-date" title="Friday 2 August 2024 20:48">Friday 2 August 2024</span>. Using Julia version 1.10.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.879664 seconds (1.28 k allocations: 33.228 MiB, 0.23% 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="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.6.0 on <span class="colophon-date" title="Thursday 22 August 2024 15:11">Thursday 22 August 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit a925f4d

Please sign in to comment.