<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Q (libabsolute.Q)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> â€“ <a href="../index.html">libabsolute</a> &#x00BB; Q</nav><h1>Module <code>Q</code></h1><nav class="toc"><ul><li><a href="#constructors">Constructors</a></li><li><a href="#operators">Operators</a></li><li><a href="#comparisons">Comparisons</a></li><li><a href="#printing">Printing</a></li></ul></nav></header><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code><code> = Mpqf.t</code></dt></dl><section><header><h2 id="constructors"><a href="#constructors" class="anchor"></a>Constructors</h2></header><dl><dt class="spec value" id="val-zero"><a href="#val-zero" class="anchor"></a><code><span class="keyword">val</span> zero : Mpqf.t</code></dt><dt class="spec value" id="val-one"><a href="#val-one" class="anchor"></a><code><span class="keyword">val</span> one : Mpqf.t</code></dt><dt class="spec value" id="val-two"><a href="#val-two" class="anchor"></a><code><span class="keyword">val</span> two : Mpqf.t</code></dt><dt class="spec value" id="val-minus_one"><a href="#val-minus_one" class="anchor"></a><code><span class="keyword">val</span> minus_one : Mpqf.t</code></dt></dl></section><section><header><h2 id="operators"><a href="#operators" class="anchor"></a>Operators</h2></header><dl><dt class="spec value" id="val-add"><a href="#val-add" class="anchor"></a><code><span class="keyword">val</span> add : <span><span class="type-var">'a</span> Mpqf.tt</span> <span>&#45;&gt;</span> <span><span class="type-var">'b</span> Mpqf.tt</span> <span>&#45;&gt;</span> Mpqf.t</code></dt><dt class="spec value" id="val-mul"><a href="#val-mul" class="anchor"></a><code><span class="keyword">val</span> mul : <span><span class="type-var">'a</span> Mpqf.tt</span> <span>&#45;&gt;</span> <span><span class="type-var">'b</span> Mpqf.tt</span> <span>&#45;&gt;</span> Mpqf.t</code></dt><dt class="spec value" id="val-div"><a href="#val-div" class="anchor"></a><code><span class="keyword">val</span> div : <span><span class="type-var">'a</span> Mpqf.tt</span> <span>&#45;&gt;</span> <span><span class="type-var">'b</span> Mpqf.tt</span> <span>&#45;&gt;</span> <span>Mpqf.t option</span></code></dt><dt class="spec value" id="val-neg"><a href="#val-neg" class="anchor"></a><code><span class="keyword">val</span> neg : <span><span class="type-var">'a</span> Mpqf.tt</span> <span>&#45;&gt;</span> Mpqf.t</code></dt><dt class="spec value" id="val-ceil"><a href="#val-ceil" class="anchor"></a><code><span class="keyword">val</span> ceil : <span><span class="type-var">'a</span> Mpqf.tt</span> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-floor"><a href="#val-floor" class="anchor"></a><code><span class="keyword">val</span> floor : <span><span class="type-var">'a</span> Mpqf.tt</span> <span>&#45;&gt;</span> int</code></dt><dt class="spec value" id="val-to_int"><a href="#val-to_int" class="anchor"></a><code><span class="keyword">val</span> to_int : <span><span class="type-var">'a</span> Mpqf.tt</span> <span>&#45;&gt;</span> <span>int option</span></code></dt><dd><h2 id="conversions"><a href="#conversions" class="anchor"></a>Conversions</h2></dd></dl><dl><dt class="spec value" id="val-to_float"><a href="#val-to_float" class="anchor"></a><code><span class="keyword">val</span> to_float : <span><span class="type-var">'a</span> Mpqf.tt</span> <span>&#45;&gt;</span> float</code></dt><dt class="spec value" id="val-to_rational"><a href="#val-to_rational" class="anchor"></a><code><span class="keyword">val</span> to_rational : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a></code></dt><dt class="spec value" id="val-of_int"><a href="#val-of_int" class="anchor"></a><code><span class="keyword">val</span> of_int : int <span>&#45;&gt;</span> Mpqf.t</code></dt><dt class="spec value" id="val-of_float"><a href="#val-of_float" class="anchor"></a><code><span class="keyword">val</span> of_float : float <span>&#45;&gt;</span> Mpqf.t</code></dt><dt class="spec value" id="val-of_rational"><a href="#val-of_rational" class="anchor"></a><code><span class="keyword">val</span> of_rational : <span class="type-var">'a</span> <span>&#45;&gt;</span> <span class="type-var">'a</span></code></dt></dl></section><section><header><h2 id="comparisons"><a href="#comparisons" class="anchor"></a>Comparisons</h2></header><dl><dt class="spec value" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span class="keyword">val</span> equal : <span><span class="type-var">'a</span> Mpqf.tt</span> <span>&#45;&gt;</span> <span><span class="type-var">'b</span> Mpqf.tt</span> <span>&#45;&gt;</span> bool</code></dt><dt class="spec value" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span class="keyword">val</span> compare : <span><span class="type-var">'a</span> Mpqf.tt</span> <span>&#45;&gt;</span> <span><span class="type-var">'b</span> Mpqf.tt</span> <span>&#45;&gt;</span> int</code></dt></dl></section><section><header><h2 id="printing"><a href="#printing" class="anchor"></a>Printing</h2></header><dl><dt class="spec value" id="val-pp_print_size_of_0_suffix"><a href="#val-pp_print_size_of_0_suffix" class="anchor"></a><code><span class="keyword">val</span> pp_print_size_of_0_suffix : Mpqf.t <span>&#45;&gt;</span> string</code></dt><dd><p>Mpqf human understandable printing when denominator is a power of ten</p></dd></dl><dl><dt class="spec value" id="val-pp_print"><a href="#val-pp_print" class="anchor"></a><code><span class="keyword">val</span> pp_print : Stdlib.Format.formatter <span>&#45;&gt;</span> Mpqf.t <span>&#45;&gt;</span> unit</code></dt><dd><p>Mpqf light printing when convertible to a float</p></dd></dl><dl><dt class="spec value" id="val-print"><a href="#val-print" class="anchor"></a><code><span class="keyword">val</span> print : Stdlib.Format.formatter <span>&#45;&gt;</span> Mpqf.t <span>&#45;&gt;</span> unit</code></dt><dt class="spec value" id="val-to_string"><a href="#val-to_string" class="anchor"></a><code><span class="keyword">val</span> to_string : <span><span class="type-var">'a</span> Mpqf.tt</span> <span>&#45;&gt;</span> string</code></dt></dl></section></div></body></html>