add mathematics module with lcm function

This commit is contained in:
2019-10-30 16:02:18 +01:00
parent b566c643db
commit f8b9cddfa6
13 changed files with 280 additions and 2 deletions

View File

@@ -38,6 +38,7 @@
<li><a href="function.html">function</a></li>
<li><a href="geometry.html">geometry</a></li>
<li><a href="geometry_plot.html">geometry_plot</a></li>
<li><a href="mathematics.html">mathematics</a></li>
<li><a href="numerical/fit.html">numerical.fit</a></li>
<li><a href="numerical/integration.html">numerical.integration</a></li>
<li><a href="numerical/ode.html">numerical.ode</a></li>

View File

@@ -0,0 +1,116 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>mathematics &#8212; pylib 2019.5.19 documentation</title>
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<h1>Source code for mathematics</h1><div class="highlight"><pre>
<span></span><span class="ch">#!/usr/bin/env python</span>
<span class="c1"># -*- coding: utf-8 -*-</span>
<span class="sd">&quot;&quot;&quot;Mathematical functions.</span>
<span class="sd">:Date: 2019-10-30</span>
<span class="sd">.. module:: mathematics</span>
<span class="sd"> :platform: *nix, Windows</span>
<span class="sd"> :synopsis: Mathematical functions.</span>
<span class="sd">.. moduleauthor:: Daniel Weschke &lt;daniel.weschke@directbox.de&gt;</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="kn">from</span> <span class="nn">math</span> <span class="k">import</span> <span class="n">gcd</span>
<div class="viewcode-block" id="lcm"><a class="viewcode-back" href="../mathematics.html#mathematics.lcm">[docs]</a><span class="k">def</span> <span class="nf">lcm</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Compute the lowest common multiple of a and b&quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">a</span><span class="o">/</span><span class="n">gcd</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span><span class="o">*</span><span class="n">b</span></div>
</pre></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../index.html">pylib</a></h1>
<h3>Navigation</h3>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
<li><a href="index.html">Module code</a><ul>
</ul></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2019, Daniel Weschke.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.2.0</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
</div>
</body>
</html>

View File

@@ -0,0 +1,7 @@
mathematics module
==================
.. automodule:: mathematics
:members:
:undoc-members:
:show-inheritance:

View File

@@ -9,5 +9,6 @@ pylib
function
geometry
geometry_plot
mathematics
numerical
time_of_day

View File

@@ -196,6 +196,8 @@
<h2 id="L">L</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="mathematics.html#mathematics.lcm">lcm() (in module mathematics)</a>
</li>
<li><a href="geometry.html#geometry.line">line() (in module geometry)</a>
</li>
</ul></td>
@@ -210,10 +212,12 @@
<h2 id="M">M</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="time_of_day.html#time_of_day.minutes">minutes() (in module time_of_day)</a>
<li><a href="mathematics.html#module-mathematics">mathematics (module)</a>, <a href="mathematics.html#module-mathematics">[1]</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="time_of_day.html#time_of_day.minutes">minutes() (in module time_of_day)</a>
</li>
<li><a href="time_of_day.html#time_of_day.minutes_norm">minutes_norm() (in module time_of_day)</a>
</li>
</ul></td>

114
docs/build/html/mathematics.html vendored Normal file
View File

@@ -0,0 +1,114 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>mathematics module &#8212; pylib 2019.5.19 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head><body>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="module-mathematics">
<span id="mathematics-module"></span><h1>mathematics module<a class="headerlink" href="#module-mathematics" title="Permalink to this headline"></a></h1>
<p>Mathematical functions.</p>
<dl class="field-list simple">
<dt class="field-odd">Date</dt>
<dd class="field-odd"><p>2019-10-30</p>
</dd>
</dl>
<span class="target" id="module-mathematics"></span><dl class="function">
<dt id="mathematics.lcm">
<code class="sig-name descname">lcm</code><span class="sig-paren">(</span><em class="sig-param">a</em>, <em class="sig-param">b</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/mathematics.html#lcm"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#mathematics.lcm" title="Permalink to this definition"></a></dt>
<dd><p>Compute the lowest common multiple of a and b</p>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">pylib</a></h1>
<h3>Navigation</h3>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2019, Daniel Weschke.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.2.0</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
<a href="_sources/mathematics.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>

View File

@@ -41,6 +41,7 @@
<li class="toctree-l1"><a class="reference internal" href="function.html">function module</a></li>
<li class="toctree-l1"><a class="reference internal" href="geometry.html">geometry module</a></li>
<li class="toctree-l1"><a class="reference internal" href="geometry_plot.html">geometry_plot module</a></li>
<li class="toctree-l1"><a class="reference internal" href="mathematics.html">mathematics module</a></li>
<li class="toctree-l1"><a class="reference internal" href="numerical.html">numerical package</a><ul>
<li class="toctree-l2"><a class="reference internal" href="numerical.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="numerical.html#module-numerical.fit">numerical.fit module</a></li>

Binary file not shown.

View File

@@ -47,6 +47,7 @@
<a href="#cap-f"><strong>f</strong></a> |
<a href="#cap-g"><strong>g</strong></a> |
<a href="#cap-i"><strong>i</strong></a> |
<a href="#cap-m"><strong>m</strong></a> |
<a href="#cap-n"><strong>n</strong></a> |
<a href="#cap-o"><strong>o</strong></a> |
<a href="#cap-t"><strong>t</strong></a>
@@ -101,6 +102,14 @@
<a href="numerical.html#module-integration"><code class="xref">integration</code></a> <em>(*nix, Windows)</em></td><td>
<em>Numerical integration.</em></td></tr>
<tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
<tr class="cap" id="cap-m"><td></td><td>
<strong>m</strong></td><td></td></tr>
<tr>
<td></td>
<td>
<a href="mathematics.html#module-mathematics"><code class="xref">mathematics</code></a> <em>(*nix, Windows)</em></td><td>
<em>Mathematical functions.</em></td></tr>
<tr class="pcap"><td></td><td>&#160;</td><td></td></tr>
<tr class="cap" id="cap-n"><td></td><td>
<strong>n</strong></td><td></td></tr>
<tr>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
mathematics module
==================
.. automodule:: mathematics
:members:
:undoc-members:
:show-inheritance:

View File

@@ -9,5 +9,6 @@ pylib
function
geometry
geometry_plot
mathematics
numerical
time_of_day