-
Notifications
You must be signed in to change notification settings - Fork 0
/
Eta-Classes-Fractional.html
9 lines (9 loc) · 6.24 KB
/
Eta-Classes-Fractional.html
1
2
3
4
5
6
7
8
9
<!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>Eta.Classes.Fractional</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Eta-Classes-Fractional.html");};
//]]>
</script></head><body class="no-frame"><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 empty"> </p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr></table><p class="caption">Eta.Classes.Fractional</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>The <code><a href="Eta-Classes-Fractional.html#t:Fractional">Fractional</a></code> type class defines Fractional values
and how are they are divided:</p><ul><li>Fractional division <code>(/)</code></li><li>Conversion from <code>Rational</code> <code>fromRational</code></li></ul></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"><a href="#v:fractionReciprocal">fractionReciprocal</a> :: <a href="Eta-Classes-Fractional.html#t:Fractional">Fractional</a> a => a -> a</li><li class="src short"><span class="keyword">class</span> <a href="Eta-Classes-Num.html#t:Num">Num</a> a => <a href="#t:Fractional">Fractional</a> a <span class="keyword">where</span><ul class="subs"></ul></li><li class="src short"><a href="#v:-47-">(/)</a> :: <a href="Eta-Classes-Fractional.html#t:Fractional">Fractional</a> a => a -> a -> a</li><li class="src short"><a href="#v:-42--42-">(**)</a> :: <a href="Eta-Classes-Floating.html#t:Floating">Floating</a> a => a -> a -> a</li><li class="src short"><a href="#v:recip">recip</a> :: <a href="Eta-Classes-Fractional.html#t:Fractional">Fractional</a> a => a -> a</li><li class="src short"><a href="#v:fromRational">fromRational</a> :: <a href="Eta-Classes-Fractional.html#t:Fractional">Fractional</a> a => Rational -> a</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a id="v:fractionReciprocal" class="def">fractionReciprocal</a> :: <a href="Eta-Classes-Fractional.html#t:Fractional">Fractional</a> a => a -> a <a href="#v:fractionReciprocal" class="selflink">#</a></p><div class="doc"><p>Inverts the fraction</p><pre class="screen"><code class="prompt">>>> </code><strong class="userinput"><code>x = 7/2
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>x' = 2/7
</code></strong><code class="prompt">>>> </code><strong class="userinput"><code>fractionReciprocal x == x'
</code></strong>True
</pre></div></div><div class="top"><p class="src"><span class="keyword">class</span> <a href="Eta-Classes-Num.html#t:Num">Num</a> a => <a id="t:Fractional" class="def">Fractional</a> a <span class="keyword">where</span> <a href="#t:Fractional" class="selflink">#</a></p><div class="subs minimal"><p class="caption">Minimal complete definition</p><p class="src"><a href="Eta-Classes-Fractional.html#v:fromRational">fromRational</a>, (<a href="Eta-Classes-Fractional.html#v:recip">recip</a> | <a href="Eta-Classes-Fractional.html#v:-47-">(/)</a>)</p></div><div class="subs methods"><p class="caption">Methods</p><p class="src"><a id="v:-47-" class="def">(/)</a> :: a -> a -> a <a href="#v:-47-" class="selflink">#</a></p><p class="src"><a id="v:recip" class="def">recip</a> :: a -> a <a href="#v:recip" class="selflink">#</a></p><p class="src"><a id="v:fromRational" class="def">fromRational</a> :: Rational -> a <a href="#v:fromRational" class="selflink">#</a></p></div><div class="subs instances"><p id="control.i:Fractional" class="caption collapser" onclick="toggleSection('i:Fractional')">Instances</p><div id="section.i:Fractional" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:ic:Fractional:Fractional:1" class="instance expander" onclick="toggleSection('i:ic:Fractional:Fractional:1')"></span> <a href="Eta-Classes-Integral.html#t:Integral">Integral</a> a => <a href="Eta-Classes-Fractional.html#t:Fractional">Fractional</a> (Ratio a)</span></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div id="section.i:ic:Fractional:Fractional:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-47-">(/)</a> :: Ratio a -> Ratio a -> Ratio a <a href="#v:-47-" class="selflink">#</a></p><p class="src"><a href="#v:recip">recip</a> :: Ratio a -> Ratio a <a href="#v:recip" class="selflink">#</a></p><p class="src"><a href="#v:fromRational">fromRational</a> :: Rational -> Ratio a <a href="#v:fromRational" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:-47-" class="def">(/)</a> :: <a href="Eta-Classes-Fractional.html#t:Fractional">Fractional</a> a => a -> a -> a <a href="#v:-47-" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:-42--42-" class="def">(**)</a> :: <a href="Eta-Classes-Floating.html#t:Floating">Floating</a> a => a -> a -> a <a href="#v:-42--42-" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:recip" class="def">recip</a> :: <a href="Eta-Classes-Fractional.html#t:Fractional">Fractional</a> a => a -> a <a href="#v:recip" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:fromRational" class="def">fromRational</a> :: <a href="Eta-Classes-Fractional.html#t:Fractional">Fractional</a> a => Rational -> a <a href="#v:fromRational" class="selflink">#</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.4</p></div></body></html>