Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 6e204a966e8c42d976f99a1700ce5f20 > files > 4014

ghc-7.4.2-4.mga5.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>GHC.Integer.Logarithms</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_GHC-Integer-Logarithms.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">integer-gmp-0.4.0.0: Integer library based on GMP</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">GHC.Integer.Logarithms</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:integerLogBase-35-">integerLogBase#</a> :: <a href="GHC-Integer-GMP-Internals.html#t:Integer">Integer</a> -&gt; <a href="GHC-Integer-GMP-Internals.html#t:Integer">Integer</a> -&gt; <a href="../ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a></li><li class="src short"><a href="#v:integerLog2-35-">integerLog2#</a> :: <a href="GHC-Integer-GMP-Internals.html#t:Integer">Integer</a> -&gt; <a href="../ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a></li><li class="src short"><a href="#v:wordLog2-35-">wordLog2#</a> :: <a href="../ghc-prim-0.2.0.0/GHC-Prim.html#t:Word-35-">Word#</a> -&gt; <a href="../ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:integerLogBase-35-" class="def">integerLogBase#</a> :: <a href="GHC-Integer-GMP-Internals.html#t:Integer">Integer</a> -&gt; <a href="GHC-Integer-GMP-Internals.html#t:Integer">Integer</a> -&gt; <a href="../ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a></p><div class="doc"><p>Calculate the integer logarithm for an arbitrary base.
   The base must be greater than 1, the second argument, the number
   whose logarithm is sought, should be positive, otherwise the
   result is meaningless.
</p><pre> base ^ integerLogBase# base m &lt;= m &lt; base ^ (integerLogBase# base m + 1)
</pre><p>for <code>base &gt; 1</code> and <code>m &gt; 0</code>.
</p></div></div><div class="top"><p class="src"><a name="v:integerLog2-35-" class="def">integerLog2#</a> :: <a href="GHC-Integer-GMP-Internals.html#t:Integer">Integer</a> -&gt; <a href="../ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a></p><div class="doc"><p>Calculate the integer base 2 logarithm of an <code><a href="GHC-Integer-GMP-Internals.html#t:Integer">Integer</a></code>.
   The calculation is more efficient than for the general case,
   on platforms with 32- or 64-bit words much more efficient.
</p><p>The argument must be strictly positive, that condition is <em>not</em> checked.
</p></div></div><div class="top"><p class="src"><a name="v:wordLog2-35-" class="def">wordLog2#</a> :: <a href="../ghc-prim-0.2.0.0/GHC-Prim.html#t:Word-35-">Word#</a> -&gt; <a href="../ghc-prim-0.2.0.0/GHC-Prim.html#t:Int-35-">Int#</a></p><div class="doc"><p>This function calculates the integer base 2 logarithm of a <code><a href="../ghc-prim-0.2.0.0/GHC-Prim.html#t:Word-35-">Word#</a></code>.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.11.0</p></div></body></html>