<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Math (baguette_sharp.Baguette_sharp.Math)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.1.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> â€“ <a href="../../index.html">baguette_sharp</a> &#x00BB; <a href="../index.html">Baguette_sharp</a> &#x00BB; Math</nav><header class="odoc-preamble"><h1>Module <code><span>Baguette_sharp.Math</span></code></h1><p>The Math Module of the B# STD</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value" id="val-argument_to_float" class="anchored"><a href="#val-argument_to_float" class="anchor"></a><code><span><span class="keyword">val</span> argument_to_float : <span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> <span class="arrow">&#45;&gt;</span></span> float</span></code></div><div class="spec-doc"><p>Transforms a parameter into a float</p></div></div><div class="odoc-spec"><div class="spec value" id="val-list_of_arguments_to_float" class="anchored"><a href="#val-list_of_arguments_to_float" class="anchor"></a><code><span><span class="keyword">val</span> list_of_arguments_to_float : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <span>float list</span></span></code></div><div class="spec-doc"><p>Transforms a list of parameters into a list of floats</p></div></div><div class="odoc-spec"><div class="spec value" id="val-arguments_to_float" class="anchored"><a href="#val-arguments_to_float" class="anchor"></a><code><span><span class="keyword">val</span> arguments_to_float : 
  <span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> <span class="arrow">&#45;&gt;</span></span>
  <span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> <span class="arrow">&#45;&gt;</span></span>
  float * float</span></code></div><div class="spec-doc"><p>Transforms a couple of arguments into a couple of floats</p></div></div><div class="odoc-spec"><div class="spec value" id="val-fibo" class="anchored"><a href="#val-fibo" class="anchor"></a><code><span><span class="keyword">val</span> fibo : <span>int <span class="arrow">&#45;&gt;</span></span> int</span></code></div><div class="spec-doc"><p>A O(n) in time and O(1) in space iterative fibbonacci function</p></div></div><div class="odoc-spec"><div class="spec value" id="val-add" class="anchored"><a href="#val-add" class="anchor"></a><code><span><span class="keyword">val</span> add : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Computes the sum of the list</p></div></div><div class="odoc-spec"><div class="spec value" id="val-mult" class="anchored"><a href="#val-mult" class="anchor"></a><code><span><span class="keyword">val</span> mult : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Computes the multiplication of the list</p></div></div><div class="odoc-spec"><div class="spec value" id="val-fibonacci" class="anchored"><a href="#val-fibonacci" class="anchor"></a><code><span><span class="keyword">val</span> fibonacci : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Gives the nth element of the fibbonacci sequence</p></div></div><div class="odoc-spec"><div class="spec value" id="val-power" class="anchored"><a href="#val-power" class="anchor"></a><code><span><span class="keyword">val</span> power : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Exponentiate a^b</p></div></div><div class="odoc-spec"><div class="spec value" id="val-sqrt" class="anchored"><a href="#val-sqrt" class="anchor"></a><code><span><span class="keyword">val</span> sqrt : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Computes the square root of the input</p></div></div><div class="odoc-spec"><div class="spec value" id="val-substract" class="anchored"><a href="#val-substract" class="anchor"></a><code><span><span class="keyword">val</span> substract : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Computes the substraction (a-b) of the first two numbers of the input list</p></div></div><div class="odoc-spec"><div class="spec value" id="val-divide" class="anchored"><a href="#val-divide" class="anchor"></a><code><span><span class="keyword">val</span> divide : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Computes the division (a/b) with the first two elements of the list</p></div></div><div class="odoc-spec"><div class="spec value" id="val-randint" class="anchored"><a href="#val-randint" class="anchor"></a><code><span><span class="keyword">val</span> randint : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Returns a random integer in <code>a,b</code></p></div></div><div class="odoc-spec"><div class="spec value" id="val-logb" class="anchored"><a href="#val-logb" class="anchor"></a><code><span><span class="keyword">val</span> logb : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Computes the logarithm of a in base b</p></div></div><div class="odoc-spec"><div class="spec value" id="val-opposite" class="anchored"><a href="#val-opposite" class="anchor"></a><code><span><span class="keyword">val</span> opposite : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Returns the opposite of the input</p></div></div><div class="odoc-spec"><div class="spec value" id="val-floor" class="anchored"><a href="#val-floor" class="anchor"></a><code><span><span class="keyword">val</span> floor : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Returns the floor of the input</p></div></div><div class="odoc-spec"><div class="spec value" id="val-ceil" class="anchored"><a href="#val-ceil" class="anchor"></a><code><span><span class="keyword">val</span> ceil : <span><span><a href="../Parser/index.html#type-parameters">Parser.parameters</a> list</span> <span class="arrow">&#45;&gt;</span></span> <a href="../Parser/index.html#type-parameters">Parser.parameters</a></span></code></div><div class="spec-doc"><p>Returns the ceil of the input</p></div></div></div></body></html>