Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > d9ab9b712c406347034632251e926a6d > files > 37

ghc-numbers-devel-3000.2.0.0-1.fc18.x86_64.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>Data.Number.Fixed</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_Data-Number-Fixed.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Number-Fixed.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">numbers-3000.2.0.0: Various number types</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">Data.Number.Fixed</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Numbers with a fixed number of decimals.
</p></div></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"><span class="keyword">data</span>  <a href="#t:Fixed">Fixed</a> e</li><li class="src short"><span class="keyword">class</span>  <a href="#t:Epsilon">Epsilon</a> e </li><li class="src short"><span class="keyword">data</span>  <a href="#t:Eps1">Eps1</a> </li><li class="src short"><span class="keyword">data</span>  <a href="#t:EpsDiv10">EpsDiv10</a> p</li><li class="src short"><span class="keyword">data</span>  <a href="#t:Prec10">Prec10</a> </li><li class="src short"><span class="keyword">data</span>  <a href="#t:Prec50">Prec50</a> </li><li class="src short"><span class="keyword">data</span>  <a href="#t:PrecPlus20">PrecPlus20</a> e</li><li class="src short"><a href="#v:convertFixed">convertFixed</a> :: (<a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e, <a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> f) =&gt; <a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e -&gt; <a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> f</li><li class="src short"><a href="#v:dynamicEps">dynamicEps</a> :: <span class="keyword">forall</span> a.  <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Rational">Rational</a> -&gt; (<span class="keyword">forall</span> e. <a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e -&gt; a) -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Rational">Rational</a> -&gt; a</li><li class="src short"><a href="#v:precision">precision</a> :: <a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Rational">Rational</a></li><li class="src short"><a href="#v:with_added_precision">with_added_precision</a> :: <span class="keyword">forall</span> a f. <a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> f =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Rational">Rational</a> -&gt; (<span class="keyword">forall</span> e. <a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e -&gt; a) -&gt; <a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> f -&gt; a</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Fixed" class="def">Fixed</a> e <a href="src/Data-Number-Fixed.html#Fixed" class="link">Source</a></p><div class="subs instances"><p id="control.i:Fixed" class="caption collapser" onclick="toggleSection('i:Fixed')">Instances</p><div id="section.i:Fixed" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> (<a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> (<a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Floating">Floating</a> (<a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Fractional">Fractional</a> (<a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Num">Num</a> (<a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> (<a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Text-Read.html#t:Read">Read</a> (<a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Real">Real</a> (<a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:RealFloat">RealFloat</a> (<a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:RealFrac">RealFrac</a> (<a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> (<a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">class</span>  <a name="t:Epsilon" class="def">Epsilon</a> e <a href="src/Data-Number-Fixed.html#Epsilon" class="link">Source</a></p><div class="doc"><p>The <code><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a></code> class contains the types that can be used to determine the
 precision of a <code><a href="Data-Number-Fixed.html#t:Fixed">Fixed</a></code> number.
</p></div><div class="subs instances"><p id="control.i:Epsilon" class="caption collapser" onclick="toggleSection('i:Epsilon')">Instances</p><div id="section.i:Epsilon" class="show"><table><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> Prec500</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> <a href="Data-Number-Fixed.html#t:Prec50">Prec50</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> <a href="Data-Number-Fixed.html#t:Prec10">Prec10</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> <a href="Data-Number-Fixed.html#t:Eps1">Eps1</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> (<a href="Data-Number-Fixed.html#t:PrecPlus20">PrecPlus20</a> e)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> (<a href="Data-Number-Fixed.html#t:EpsDiv10">EpsDiv10</a> e)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Eps1" class="def">Eps1</a>  <a href="src/Data-Number-Fixed.html#Eps1" class="link">Source</a></p><div class="doc"><p>An epsilon of 1, i.e., no decimals.
</p></div><div class="subs instances"><p id="control.i:Eps1" class="caption collapser" onclick="toggleSection('i:Eps1')">Instances</p><div id="section.i:Eps1" class="show"><table><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> <a href="Data-Number-Fixed.html#t:Eps1">Eps1</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:EpsDiv10" class="def">EpsDiv10</a> p <a href="src/Data-Number-Fixed.html#EpsDiv10" class="link">Source</a></p><div class="doc"><p>A type construct that gives one more decimals than the argument.
</p></div><div class="subs instances"><p id="control.i:EpsDiv10" class="caption collapser" onclick="toggleSection('i:EpsDiv10')">Instances</p><div id="section.i:EpsDiv10" class="show"><table><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> (<a href="Data-Number-Fixed.html#t:EpsDiv10">EpsDiv10</a> e)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Prec10" class="def">Prec10</a>  <a href="src/Data-Number-Fixed.html#Prec10" class="link">Source</a></p><div class="doc"><p>Ten decimals.
</p></div><div class="subs instances"><p id="control.i:Prec10" class="caption collapser" onclick="toggleSection('i:Prec10')">Instances</p><div id="section.i:Prec10" class="show"><table><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> <a href="Data-Number-Fixed.html#t:Prec10">Prec10</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Prec50" class="def">Prec50</a>  <a href="src/Data-Number-Fixed.html#Prec50" class="link">Source</a></p><div class="doc"><p>50 decimals.
</p></div><div class="subs instances"><p id="control.i:Prec50" class="caption collapser" onclick="toggleSection('i:Prec50')">Instances</p><div id="section.i:Prec50" class="show"><table><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> <a href="Data-Number-Fixed.html#t:Prec50">Prec50</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:PrecPlus20" class="def">PrecPlus20</a> e <a href="src/Data-Number-Fixed.html#PrecPlus20" class="link">Source</a></p><div class="subs instances"><p id="control.i:PrecPlus20" class="caption collapser" onclick="toggleSection('i:PrecPlus20')">Instances</p><div id="section.i:PrecPlus20" class="show"><table><tr><td class="src"><a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> (<a href="Data-Number-Fixed.html#t:PrecPlus20">PrecPlus20</a> e)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:convertFixed" class="def">convertFixed</a> :: (<a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e, <a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> f) =&gt; <a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e -&gt; <a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> f<a href="src/Data-Number-Fixed.html#convertFixed" class="link">Source</a></p><div class="doc"><p>Convert between two arbitrary fixed precision types.
</p></div></div><div class="top"><p class="src"><a name="v:dynamicEps" class="def">dynamicEps</a> :: <span class="keyword">forall</span> a.  <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Rational">Rational</a> -&gt; (<span class="keyword">forall</span> e. <a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e -&gt; a) -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Rational">Rational</a> -&gt; a<a href="src/Data-Number-Fixed.html#dynamicEps" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:precision" class="def">precision</a> :: <a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Rational">Rational</a><a href="src/Data-Number-Fixed.html#precision" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:with_added_precision" class="def">with_added_precision</a> :: <span class="keyword">forall</span> a f. <a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> f =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Rational">Rational</a> -&gt; (<span class="keyword">forall</span> e. <a href="Data-Number-Fixed.html#t:Epsilon">Epsilon</a> e =&gt; <a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> e -&gt; a) -&gt; <a href="Data-Number-Fixed.html#t:Fixed">Fixed</a> f -&gt; a<a href="src/Data-Number-Fixed.html#with_added_precision" class="link">Source</a></p><div class="doc"><p>The call <code>with_added_precision r f v</code> evaluates <code>f v</code>, while
 temporarily multiplying the precision of <em>v</em> by <em>r</em>.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>