MatteoRagni/cas-rb

View on GitHub
docs/CAS.html

Summary

Maintainability
Test Coverage
<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">

<title>module CAS - RDoc Documentation</title>

<script type="text/javascript">
  var rdoc_rel_prefix = "./";
</script>

<script src="./js/jquery.js"></script>
<script src="./js/darkfish.js"></script>

<link href="./css/fonts.css" rel="stylesheet">
<link href="./css/rdoc.css" rel="stylesheet">



<body id="top" role="document" class="module">
<nav role="navigation">
  <div id="project-navigation">
    <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2>
    <a href="./index.html" rel="home">Home</a>
  </h2>

  <div id="table-of-contents-navigation">
    <a href="./table_of_contents.html#pages">Pages</a>
    <a href="./table_of_contents.html#classes">Classes</a>
    <a href="./table_of_contents.html#methods">Methods</a>
  </div>
</div>

    <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

  </div>

  

  <div id="class-metadata">
    
    
    
    
    <!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    
    <li ><a href="#method-c-abs">::abs</a>
    
    <li ><a href="#method-c-acos">::acos</a>
    
    <li ><a href="#method-c-arccos">::arccos</a>
    
    <li ><a href="#method-c-arcsin">::arcsin</a>
    
    <li ><a href="#method-c-arctan">::arctan</a>
    
    <li ><a href="#method-c-asin">::asin</a>
    
    <li ><a href="#method-c-atan">::atan</a>
    
    <li ><a href="#method-c-box">::box</a>
    
    <li ><a href="#method-c-const">::const</a>
    
    <li ><a href="#method-c-cos">::cos</a>
    
    <li ><a href="#method-c-declare">::declare</a>
    
    <li ><a href="#method-c-equal">::equal</a>
    
    <li ><a href="#method-c-exp">::exp</a>
    
    <li ><a href="#method-c-export_dot">::export_dot</a>
    
    <li ><a href="#method-c-greater">::greater</a>
    
    <li ><a href="#method-c-greater_equal">::greater_equal</a>
    
    <li ><a href="#method-c-in">::in</a>
    
    <li ><a href="#method-c-invert">::invert</a>
    
    <li ><a href="#method-c-ln">::ln</a>
    
    <li ><a href="#method-c-log">::log</a>
    
    <li ><a href="#method-c-max">::max</a>
    
    <li ><a href="#method-c-min">::min</a>
    
    <li ><a href="#method-c-pow">::pow</a>
    
    <li ><a href="#method-c-sin">::sin</a>
    
    <li ><a href="#method-c-smaller">::smaller</a>
    
    <li ><a href="#method-c-smaller_equal">::smaller_equal</a>
    
    <li ><a href="#method-c-sqrt">::sqrt</a>
    
    <li ><a href="#method-c-tan">::tan</a>
    
    <li ><a href="#method-c-to_dot">::to_dot</a>
    
    <li ><a href="#method-c-vars">::vars</a>
    
  </ul>
</div>

  </div>
</nav>

<main role="main" aria-labelledby="module-CAS">
  <h1 id="module-CAS" class="module">
    module CAS
  </h1>

  <section class="description">
    
<p>Copyright © 2016 Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

<p><em>_</em> <strong>_ _ _  / | | _ \ |_ _ __ <em>(</em>)_ _ | ( | <em>/ | ||
/ ` | | &#39; \  _</em>| |<em>| |</em>|_,<em>_</em>, |<em>|</em>||<em>| 
|</em></strong>/</p>

<p><strong>_ _ _ _ _ _  / |_ _ __ _ _ | |_ <em>(</em>)_ | _ \ |_ _ __
<em>(</em>)_ _ | (_ | &#39;<em>/ <code>| &#39;_ \ &#39; \ V / |_ / |  _/ |
|| / _</code> | | &#39; \  _</em>|<em>| _</em>,<em>|
./</em>||<em>_/|</em>/| |<em>| |</em>|_,<em>_</em>, |<em>|</em>||<em>| 
|</em>| |</strong>_/</p>

<p>_ <em>_</em> <em>__</em> <strong>_ _ _ | | <em>_ |</em> <em>|</em>_ /_ __ |
_ \ |_ _ __ <em>(</em>)_ _ | |</strong>/ <code><em>|| |  |_ \ \ / |  _/ |
|| / _</code> | | &#39; \ |<strong>_</em>,<em>||</em>|
|</strong><em>/_</em>\ |<em>| |</em>|_,<em>_</em>, |<em>|</em>||<em>| 
|</em>__/</p>

<p><em>_ _ _ _ _ <strong>_ _ _ | / |</strong> | || |</em> <em>| |</em>_ | _ \
|_ _ __ <em>(</em>)_ _ | |/| / <code><em>|  _| / _</code> | &#39;</em> \ |
<em>/ | || / ` | | &#39; \ ||
|</em>_<em>,</em>|_<em>|</em>_<em>,</em>|<em>./ |</em>| |<em>|_,</em>_<em>,
|</em>|<em>||</em>|  |<em>_</em>/</p>

<p>Copyright © 2016 Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

<p>Copyright © 2016 Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

<p>Copyright © 2016 Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

<p>Copyright © 2016 Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

<p>Copyright © 2016 Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

<p>Copyright © 2016 Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

<p>Copyright © Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

<p>Copyright © Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

<p>Copyright © Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

<p>Copyright © 2016 Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

<p>Copyright © 2016 Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

<p>Copyright © 2016 Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

<p>Copyright © 2016 Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

<p>Copyright © 2016 Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

<p>Copyright © 2016 Matteo Ragni</p>

<p>Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the “Software”),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:</p>

<p>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.</p>

<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.</p>

  </section>

  
  
  
  <section id="5Buntitled-5D" class="documentation-section">
    

    

    
    <section class="constants-list">
      <header>
        <h3>Constants</h3>
      </header>
      <dl>
      
        <dt id="E">E
        
        <dd><p><a href="CAS.html#E">E</a> (2.57…) constant representation</p>
        
      
        <dt id="Infinity">Infinity
        
        <dd><p><a href="CAS.html#Infinity">Infinity</a> constant representation</p>
        
      
        <dt id="MinusOne">MinusOne
        
        <dd><p>Minus <a href="CAS.html#One">One</a> (-1) constant representation</p>
        
      
        <dt id="NegInfinity">NegInfinity
        
        <dd><p>Negative <a href="CAS.html#Infinity">Infinity</a> constant representation</p>
        
      
        <dt id="NumericToConst">NumericToConst
        
        <dd><p>Series of useful numeric constant, Based upon <code>Numeric</code> keys,
with <code>CAs::Constant</code> value</p>
        
      
        <dt id="One">One
        
        <dd><p><a href="CAS.html#One">One</a> (1) constant representation</p>
        
      
        <dt id="Pi">Pi
        
        <dd><p><a href="CAS.html#Pi">Pi</a> (3.14…) constant representation</p>
        
      
        <dt id="Two">Two
        
        <dd><p><a href="CAS.html#Two">Two</a> (2) constant representation</p>
        
      
        <dt id="VERSION">VERSION
        
        <dd><p>Version of the library Array of three <code>Fixnum</code> values:</p>
<ul><li>
<p>Major version</p>
</li><li>
<p>Minor version</p>
</li><li>
<p>Patchlevel</p>
</li></ul>
        
      
        <dt id="Zero">Zero
        
        <dd><p><a href="CAS.html#Zero">Zero</a> (0) constant representation</p>
        
      
      </dl>
    </section>
    

    

    
     <section id="public-class-5Buntitled-5D-method-details" class="method-section">
       <header>
         <h3>Public Class Methods</h3>
       </header>

    
      <div id="method-c-abs" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">abs</span><span
            class="method-args">(x)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut for <code>CAs::Abs</code> initializer</p>
<ul><li>
<p><strong>argument</strong>: <code>CAs::Op</code> argument of absolute value</p>
</li><li>
<p><strong>returns</strong>: <code>CAS::Abs</code> new instance</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="abs-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-base.rb, line 535</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">abs</span>(<span class="ruby-identifier">x</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Abs</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">x</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-acos" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">acos</span><span
            class="method-args">(x)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut for <code>CAS::Acos#new</code></p>
<ul><li>
<p><strong>argument</strong>: <code>CAS::Op</code> argument of the function</p>
</li><li>
<p><strong>returns</strong>: <code>CAS::Acos</code> operation</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="acos-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-trig.rb, line 342</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">acos</span>(<span class="ruby-identifier">x</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Acos</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">x</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        
        <div class="aliases">
          Also aliased as: <a href="CAS.html#method-c-arccos">arccos</a>
        </div>
        

        
      </div>

    
      <div id="method-c-arccos" class="method-detail method-alias">
        
        <div class="method-heading">
          <span class="method-name">arccos</span><span
            class="method-args">(x)</span>
          
        </div>
        

        <div class="method-description">
          
          
          
          

          
        </div>

        

        
        <div class="aliases">
          Alias for: <a href="CAS.html#method-c-acos">acos</a>
        </div>
        
      </div>

    
      <div id="method-c-arcsin" class="method-detail method-alias">
        
        <div class="method-heading">
          <span class="method-name">arcsin</span><span
            class="method-args">(x)</span>
          
        </div>
        

        <div class="method-description">
          
          
          
          

          
        </div>

        

        
        <div class="aliases">
          Alias for: <a href="CAS.html#method-c-asin">asin</a>
        </div>
        
      </div>

    
      <div id="method-c-arctan" class="method-detail method-alias">
        
        <div class="method-heading">
          <span class="method-name">arctan</span><span
            class="method-args">(x)</span>
          
        </div>
        

        <div class="method-description">
          
          
          
          

          
        </div>

        

        
        <div class="aliases">
          Alias for: <a href="CAS.html#method-c-atan">atan</a>
        </div>
        
      </div>

    
      <div id="method-c-asin" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">asin</span><span
            class="method-args">(x)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcuts for <code>CAS::Asin#new</code></p>
<ul><li>
<p><strong>argument</strong>: <code>CAS::Op</code> argument of the function</p>
</li><li>
<p><strong>returns</strong>: <code>CAS::Asin</code> operation</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="asin-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-trig.rb, line 184</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">asin</span>(<span class="ruby-identifier">x</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Asin</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">x</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        
        <div class="aliases">
          Also aliased as: <a href="CAS.html#method-c-arcsin">arcsin</a>
        </div>
        

        
      </div>

    
      <div id="method-c-atan" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">atan</span><span
            class="method-args">(x)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut for <code>CAS::Atan#new</code></p>
<ul><li>
<p><strong>argument</strong>: <code>CAS::Op</code> argument of the function</p>
</li><li>
<p><strong>returns</strong>: <code>CAS::Atan</code> operation</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="atan-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-trig.rb, line 507</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">atan</span>(<span class="ruby-identifier">x</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Atan</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">x</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        
        <div class="aliases">
          Also aliased as: <a href="CAS.html#method-c-arctan">arctan</a>
        </div>
        

        
      </div>

    
      <div id="method-c-box" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">box</span><span
            class="method-args">(x, a, b, type=:closed)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut for creating a new box condition. It requires four arguments:</p>
<ul><li>
<p><strong>argument</strong>: <code>CAS::Op</code> function for condition</p>
</li><li>
<p><strong>argument</strong>: <code>CAS::Constant</code> lower limit</p>
</li><li>
<p><strong>argument</strong>: <code>CAs::Constant</code> upper limit</p>
</li><li>
<p><strong>argument</strong>: <code>Symbol</code> of condition type it can be:</p>
<ul><li>
<p><code>:closed</code> for <code>CAs::BoxConditionClosed</code></p>
</li><li>
<p><code>:open</code> for <code>CAs::BoxConditionOpen</code></p>
</li><li>
<p><code>:upper_closed</code> for <code>CAs::BoxConditionUpperClosed</code></p>
</li><li>
<p><code>:lower_closed</code> for <code>CAs::BoxConditionLowerClosed</code></p>
</li></ul>
</li><li>
<p><strong>returns</strong>: <code>CAS::BoxCondition</code> new instance</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="box-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-box-conditions.rb, line 310</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">box</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span>, <span class="ruby-identifier">type</span>=<span class="ruby-value">:closed</span>)
  <span class="ruby-keyword">case</span> <span class="ruby-identifier">type</span>
  <span class="ruby-keyword">when</span> <span class="ruby-value">:closed</span>
    <span class="ruby-keyword">return</span> <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">BoxConditionClosed</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span>)
  <span class="ruby-keyword">when</span> <span class="ruby-value">:open</span>
    <span class="ruby-keyword">return</span> <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">BoxConditionOpen</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span>)
  <span class="ruby-keyword">when</span> <span class="ruby-value">:upper_closed</span>
    <span class="ruby-keyword">return</span> <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">BoxConditionUpperClosed</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span>)
  <span class="ruby-keyword">when</span> <span class="ruby-value">:lower_closed</span>
    <span class="ruby-keyword">return</span> <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">BoxConditionLowerClosed</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span>)
  <span class="ruby-keyword">else</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">CASError</span>, <span class="ruby-string">&quot;Unknown box condition type&quot;</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        
        <div class="aliases">
          Also aliased as: <a href="CAS.html#method-c-in">in</a>
        </div>
        

        
      </div>

    
      <div id="method-c-const" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">const</span><span
            class="method-args">(*val)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Allows to define a series of new constants.</p>

<pre class="ruby"><span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span> = <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-identifier">const</span> <span class="ruby-value">1.0</span>, <span class="ruby-value">100</span>
</pre>
<ul><li>
<p><strong>argument</strong>: <code>Array</code> of Numeric</p>
</li><li>
<p><strong>returns</strong>: <code>Array</code> of <code>CAS::Contant</code></p>
</li></ul>
          
          

          
          <div class="method-source-code" id="const-source">
            <pre><span class="ruby-comment"># File lib/numbers/constants.rb, line 131</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">const</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">val</span>)
  <span class="ruby-comment">#(val = [val]) if val.size == 1</span>
  <span class="ruby-identifier">ret</span> = []
  <span class="ruby-identifier">val</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">ret</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-constant">NumericToConst</span>[<span class="ruby-identifier">n</span>] <span class="ruby-operator">?</span> <span class="ruby-constant">NumericToConst</span>[<span class="ruby-identifier">n</span>] <span class="ruby-operator">:</span> <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Constant</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">n</span>))
  <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">return</span> (<span class="ruby-identifier">ret</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">ret</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">ret</span>)
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-cos" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">cos</span><span
            class="method-args">(x)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut for <code>CAS::Cos#new</code></p>
<ul><li>
<p><strong>argument</strong>: <code>CAS::Op</code> argument of the function</p>
</li><li>
<p><strong>returns</strong>: <code>CAS::Cos</code> operation</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="cos-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-trig.rb, line 270</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">cos</span>(<span class="ruby-identifier">x</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Cos</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">x</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-declare" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">declare</span><span
            class="method-args">(name, *xs)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>This shortcut allows to declare a new function</p>
<ul><li>
<p><strong>requires</strong>: <code>String</code> or <code>Symbol</code> that
is the name of the function</p>
</li><li>
<p><strong>requires</strong>: <code>Array</code> of <code>CAS::Variable</code></p>
</li><li>
<p><strong>returns</strong>: a new <code>CAS::Function</code> or the old one</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="declare-source">
            <pre><span class="ruby-comment"># File lib/numbers/functions.rb, line 216</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">declare</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">xs</span>)
  <span class="ruby-identifier">xs</span>.<span class="ruby-identifier">flatten!</span>
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Function</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">xs</span>)
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-equal" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">equal</span><span
            class="method-args">(x, y)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut creates a <code>CAS::Equal</code> object</p>
          
          

          
          <div class="method-source-code" id="equal-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-conditions.rb, line 315</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">equal</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Equal</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>)
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-exp" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">exp</span><span
            class="method-args">(x)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut for <code>CAS::Exp#new</code></p>
<ul><li>
<p><strong>argument</strong>: <code>CAS::Op</code> argument of the function</p>
</li><li>
<p><strong>returns</strong>: <code>CAS::Exp</code> operation</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="exp-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-trsc.rb, line 115</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">exp</span>(<span class="ruby-identifier">x</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Exp</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">x</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-export_dot" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">export_dot</span><span
            class="method-args">(fl, op)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Export the input <code>CAS::Op</code> graphviz representation to a file.</p>
<ul><li>
<p><strong>argument</strong>: <code>String</code> with filename</p>
</li><li>
<p><strong>argument</strong>: <code>CAS::Op</code> with the tree</p>
</li><li>
<p><strong>returns</strong>: <code>CAS::Op</code> in input</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="export_dot-source">
            <pre><span class="ruby-comment"># File lib/Mr.CAS/graphviz.rb, line 148</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">export_dot</span>(<span class="ruby-identifier">fl</span>, <span class="ruby-identifier">op</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Help</span>.<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">fl</span>, <span class="ruby-constant">String</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Help</span>.<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">op</span>, <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Op</span>)

  <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">fl</span>, <span class="ruby-string">&quot;w&quot;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span> <span class="ruby-constant">CAS</span>.<span class="ruby-identifier">to_dot</span>(<span class="ruby-identifier">op</span>) <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">op</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-greater" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">greater</span><span
            class="method-args">(x, y)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut creates a <code>CAS::Greater</code> object</p>
          
          

          
          <div class="method-source-code" id="greater-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-conditions.rb, line 320</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">greater</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Greater</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>)
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-greater_equal" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">greater_equal</span><span
            class="method-args">(x, y)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut creates a <code>CAS::GreaterEqual</code> object</p>
          
          

          
          <div class="method-source-code" id="greater_equal-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-conditions.rb, line 325</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">greater_equal</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">GreaterEqual</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>)
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-in" class="method-detail method-alias">
        
        <div class="method-heading">
          <span class="method-name">in</span><span
            class="method-args">(x, a, b, type=:closed)</span>
          
        </div>
        

        <div class="method-description">
          
          
          
          

          
        </div>

        

        
        <div class="aliases">
          Alias for: <a href="CAS.html#method-c-box">box</a>
        </div>
        
      </div>

    
      <div id="method-c-invert" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">invert</span><span
            class="method-args">(x)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut for <code>CAs::Invert</code> initializer</p>
<ul><li>
<p><strong>argument</strong>: <code>CAs::Op</code> argument of the inversion</p>
</li><li>
<p><strong>returns</strong>: <code>CAS::Invert</code> new instance</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="invert-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-base.rb, line 450</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">invert</span>(<span class="ruby-identifier">x</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Invert</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">x</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-ln" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">ln</span><span
            class="method-args">(x)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut for <code>CAS::Ln#new</code></p>
<ul><li>
<p><strong>argument</strong>: <code>CAS::Op</code> argument of the function</p>
</li><li>
<p><strong>returns</strong>: <code>CAS::Ln</code> operation</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="ln-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-trsc.rb, line 210</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier">ln</span>(<span class="ruby-identifier">x</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Ln</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">x</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        
        <div class="aliases">
          Also aliased as: <a href="CAS.html#method-c-log">log</a>
        </div>
        

        
      </div>

    
      <div id="method-c-log" class="method-detail method-alias">
        
        <div class="method-heading">
          <span class="method-name">log</span><span
            class="method-args">(x)</span>
          
        </div>
        

        <div class="method-description">
          
          
          
          

          
        </div>

        

        
        <div class="aliases">
          Alias for: <a href="CAS.html#method-c-ln">ln</a>
        </div>
        
      </div>

    
      <div id="method-c-max" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">max</span><span
            class="method-args">(x, y)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut for <code>CAS::Max</code> initializer</p>
<ul><li>
<p><strong>argument</strong>: <code>CAS::Op</code> left function</p>
</li><li>
<p><strong>argument</strong>: <code>CAS::Op</code> right function</p>
</li><li>
<p><strong>returns</strong>: <code>CAS::Max</code> new instance</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="max-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-piecewise.rb, line 197</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">max</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Max</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>)
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-min" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">min</span><span
            class="method-args">(x, y)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut for <code>CAS::Min</code> initializer</p>
<ul><li>
<p><strong>argument</strong>: <code>CAS::Op</code> left function</p>
</li><li>
<p><strong>argument</strong>: <code>CAS::Op</code> right function</p>
</li><li>
<p><strong>returns</strong>: <code>CAS::Min</code> new instance</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="min-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-piecewise.rb, line 206</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">min</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Min</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>, <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-identifier">smaller_equal</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>))
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-pow" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">pow</span><span
            class="method-args">(x, y)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut for <code>CAS::Pow</code> initializer</p>
<ul><li>
<p><strong>argument</strong>: <code>CAS::Op</code> base</p>
</li><li>
<p><strong>argument</strong>: <code>CAS::Op</code> exponent</p>
</li><li>
<p><strong>returns</strong>: <code>CAS::Pow</code> new instance</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="pow-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-base.rb, line 193</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">pow</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Pow</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-sin" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">sin</span><span
            class="method-args">(x)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut for <code>CAS::Sin#new</code></p>
<ul><li>
<p><strong>argument</strong>: <code>CAS::Op</code> argument of the function</p>
</li><li>
<p><strong>returns</strong>: <code>CAS::Sin</code> operation</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="sin-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-trig.rb, line 107</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">sin</span>(<span class="ruby-identifier">x</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Sin</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">x</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-smaller" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">smaller</span><span
            class="method-args">(x, y)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut creates <code>CAS::Smaller</code> object</p>
          
          

          
          <div class="method-source-code" id="smaller-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-conditions.rb, line 330</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">smaller</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Smaller</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>)
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-smaller_equal" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">smaller_equal</span><span
            class="method-args">(x, y)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut creates a <code>CAs::SmallerEqual</code> object</p>
          
          

          
          <div class="method-source-code" id="smaller_equal-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-conditions.rb, line 335</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">smaller_equal</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">SmallerEqual</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span>)
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-sqrt" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">sqrt</span><span
            class="method-args">(x)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut for <code>CAS::Sqrt</code> initializer</p>
<ul><li>
<p><strong>argument</strong>: <code>CAS::Op</code> argument of square root</p>
</li><li>
<p><strong>returns</strong>: <code>CAS::Sqrt</code> new instance</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="sqrt-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-base.rb, line 365</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">sqrt</span>(<span class="ruby-identifier">x</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Sqrt</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">x</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-tan" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">tan</span><span
            class="method-args">(x)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Shortcut for <code>CAS::Tan#new</code></p>
<ul><li>
<p><strong>argument</strong>: <code>CAS::Op</code> argument of the function</p>
</li><li>
<p><strong>returns</strong>: <code>CAS::Tan</code> operation</p>
</li></ul>
          
          

          
          <div class="method-source-code" id="tan-source">
            <pre><span class="ruby-comment"># File lib/functions/fnc-trig.rb, line 428</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">tan</span>(<span class="ruby-identifier">x</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Tan</span>.<span class="ruby-identifier">new</span> <span class="ruby-identifier">x</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-to_dot" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">to_dot</span><span
            class="method-args">(op)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Return a string representation of the graph that is a Graphviz tree.
Requires a <code>CAS::Op</code> as argument. In the next releases probably
it will be moved inside <code>CAS::Op</code>.</p>
<ul><li>
<p><strong>argument</strong>: <code>CAS::Op</code> instance</p>
</li><li>
<p><strong>returns</strong>: <code>String</code></p>
</li></ul>
          
          

          
          <div class="method-source-code" id="to_dot-source">
            <pre><span class="ruby-comment"># File lib/Mr.CAS/graphviz.rb, line 107</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">to_dot</span>(<span class="ruby-identifier">op</span>)
  <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Help</span>.<span class="ruby-identifier">assert</span>(<span class="ruby-identifier">op</span>, <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Op</span>)
  <span class="ruby-identifier">string</span> = <span class="ruby-identifier">op</span>.<span class="ruby-identifier">dot_graph</span>
  <span class="ruby-identifier">labels</span> = <span class="ruby-string">&quot;&quot;</span>

  <span class="ruby-identifier">dot_subs_hash</span> = {
    <span class="ruby-string">&quot;Sum&quot;</span>                =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;+&quot;</span>,
    <span class="ruby-string">&quot;Diff&quot;</span>               =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;-&quot;</span>,
    <span class="ruby-string">&quot;Prod&quot;</span>               =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;×&quot;</span>,
    <span class="ruby-string">&quot;Div&quot;</span>                =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;÷&quot;</span>,
    <span class="ruby-string">&quot;Sqrt&quot;</span>               =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;√(∙)&quot;</span>,
    <span class="ruby-string">&quot;Abs&quot;</span>                =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;|∙|&quot;</span>,
    <span class="ruby-string">&quot;Invert&quot;</span>             =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;-(∙)&quot;</span>,
    <span class="ruby-string">&quot;Exp&quot;</span>                =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;exp(∙)&quot;</span>,
    <span class="ruby-string">&quot;Log&quot;</span>                =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;log(∙)&quot;</span>,
    <span class="ruby-string">&quot;Pow&quot;</span>                =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;(∙)^(∙)&quot;</span>,
    <span class="ruby-string">&quot;ZERO_CONSTANT&quot;</span>      =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;0&quot;</span>,
    <span class="ruby-string">&quot;ONE_CONSTANT&quot;</span>       =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;1&quot;</span>,
    <span class="ruby-string">&quot;TWO_CONSTANT&quot;</span>       =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;2&quot;</span>,
    <span class="ruby-string">&quot;PI_CONSTANT&quot;</span>        =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;π&quot;</span>,
    <span class="ruby-string">&quot;INFINITY_CONSTANT&quot;</span>  =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;∞&quot;</span>,
    <span class="ruby-string">&quot;E_CONSTANT&quot;</span>         =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;e&quot;</span>,
    <span class="ruby-string">&quot;MINUS_ONE_CONSTANT&quot;</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">&quot;-1&quot;</span>
  }

  <span class="ruby-identifier">lab</span> = {}
  <span class="ruby-identifier">string</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp">/\w+\_\d+/</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">m</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-identifier">m</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp">/(\w+)\_\d+/</span>
      <span class="ruby-identifier">lab</span>[<span class="ruby-identifier">m</span>] = <span class="ruby-identifier">dot_subs_hash</span>[<span class="ruby-node">$1</span>] <span class="ruby-operator">||</span> <span class="ruby-node">$1</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">lab</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">labels</span> <span class="ruby-operator">+=</span> <span class="ruby-node">&quot;  #{k} [label=\&quot;#{v}\&quot;]\n&quot;</span> }

  <span class="ruby-keyword">return</span> <span class="ruby-node">&quot;digraph Op {\n  #{string}#{labels}}&quot;</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
      <div id="method-c-vars" class="method-detail ">
        
        <div class="method-heading">
          <span class="method-name">vars</span><span
            class="method-args">(*name)</span>
          
          <span class="method-click-advice">click to toggle source</span>
          
        </div>
        

        <div class="method-description">
          
          <p>Allows to define a series of new variables.</p>

<pre class="ruby"><span class="ruby-identifier">x</span>, <span class="ruby-identifier">y</span> = <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-identifier">vars</span> :<span class="ruby-identifier">x</span>, :<span class="ruby-identifier">y</span>
</pre>
<ul><li>
<p><strong>argument</strong>: <code>Array</code> of Numeric</p>
</li><li>
<p><strong>returns</strong>: <code>Array</code> of <code>CAS::Variable</code></p>
</li></ul>
          
          

          
          <div class="method-source-code" id="vars-source">
            <pre><span class="ruby-comment"># File lib/numbers/variables.rb, line 217</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">vars</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">name</span>)
  (<span class="ruby-keyword">return</span> <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Variable</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>[<span class="ruby-value">0</span>])) <span class="ruby-keyword">if</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
  <span class="ruby-identifier">ret</span> = []
  <span class="ruby-identifier">name</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">n</span><span class="ruby-operator">|</span>
    <span class="ruby-identifier">ret</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">CAS</span><span class="ruby-operator">::</span><span class="ruby-constant">Variable</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">n</span>)
  <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">return</span> <span class="ruby-identifier">ret</span>
<span class="ruby-keyword">end</span></pre>
          </div>
          
        </div>

        

        
      </div>

    
    </section>
  
  </section>
</main>


<footer id="validator-badges" role="contentinfo">
  <p><a href="http://validator.w3.org/check/referer">Validate</a>
  <p>Generated by <a href="http://docs.seattlerb.org/rdoc/">RDoc</a> 4.2.1.
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
</footer>