<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>F (libabsolute.Libabsolute.F)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.0"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/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">libabsolute</a> &#x00BB; <a href="../index.html">Libabsolute</a> &#x00BB; F</nav><header class="odoc-preamble"><h1>Module <code><span>Libabsolute.F</span></code></h1><p>Float arithmetic module</p></header><nav class="odoc-toc"><ul><li><a href="#constructors">Constructors</a></li><li><a href="#operators">Operators</a></li><li><a href="#conversions">Conversions</a></li><li><a href="#comparisons">Comparisons</a></li><li><a href="#printing">Printing</a></li></ul></nav><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = float</span></code></div></div><h2 id="constructors"><a href="#constructors" class="anchor"></a>Constructors</h2><div class="odoc-spec"><div class="spec value anchored" id="val-zero"><a href="#val-zero" class="anchor"></a><code><span><span class="keyword">val</span> zero : float</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-one"><a href="#val-one" class="anchor"></a><code><span><span class="keyword">val</span> one : float</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-two"><a href="#val-two" class="anchor"></a><code><span><span class="keyword">val</span> two : float</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-minus_one"><a href="#val-minus_one" class="anchor"></a><code><span><span class="keyword">val</span> minus_one : float</span></code></div></div><h2 id="operators"><a href="#operators" class="anchor"></a>Operators</h2><div class="odoc-spec"><div class="spec value anchored" id="val-add"><a href="#val-add" class="anchor"></a><code><span><span class="keyword">val</span> add : <span>float <span class="arrow">&#45;&gt;</span></span> <span>float <span class="arrow">&#45;&gt;</span></span> float</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-mul"><a href="#val-mul" class="anchor"></a><code><span><span class="keyword">val</span> mul : <span>float <span class="arrow">&#45;&gt;</span></span> <span>float <span class="arrow">&#45;&gt;</span></span> float</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-div"><a href="#val-div" class="anchor"></a><code><span><span class="keyword">val</span> div : <span>float <span class="arrow">&#45;&gt;</span></span> <span>float <span class="arrow">&#45;&gt;</span></span> <span>float option</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-neg"><a href="#val-neg" class="anchor"></a><code><span><span class="keyword">val</span> neg : <span>float <span class="arrow">&#45;&gt;</span></span> float</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ceil"><a href="#val-ceil" class="anchor"></a><code><span><span class="keyword">val</span> ceil : <span>float <span class="arrow">&#45;&gt;</span></span> int</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-floor"><a href="#val-floor" class="anchor"></a><code><span><span class="keyword">val</span> floor : <span>float <span class="arrow">&#45;&gt;</span></span> int</span></code></div></div><h2 id="conversions"><a href="#conversions" class="anchor"></a>Conversions</h2><div class="odoc-spec"><div class="spec value anchored" id="val-to_int"><a href="#val-to_int" class="anchor"></a><code><span><span class="keyword">val</span> to_int : <span>float <span class="arrow">&#45;&gt;</span></span> <span>int option</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-to_float"><a href="#val-to_float" class="anchor"></a><code><span><span class="keyword">val</span> to_float : <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-to_rational"><a href="#val-to_rational" class="anchor"></a><code><span><span class="keyword">val</span> to_rational : <span>float <span class="arrow">&#45;&gt;</span></span> <span class="xref-unresolved">Mpqf</span>.t</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-of_int"><a href="#val-of_int" class="anchor"></a><code><span><span class="keyword">val</span> of_int : <span>int <span class="arrow">&#45;&gt;</span></span> float</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-of_float"><a href="#val-of_float" class="anchor"></a><code><span><span class="keyword">val</span> of_float : <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-of_rational"><a href="#val-of_rational" class="anchor"></a><code><span><span class="keyword">val</span> of_rational : <span><span><span class="type-var">'a</span> <span class="xref-unresolved">Mpqf</span>.tt</span> <span class="arrow">&#45;&gt;</span></span> float</span></code></div></div><h2 id="comparisons"><a href="#comparisons" class="anchor"></a>Comparisons</h2><div class="odoc-spec"><div class="spec value anchored" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span><span class="keyword">val</span> equal : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span><span class="keyword">val</span> compare : <span><span class="xref-unresolved">Stdlib</span>.Float.t <span class="arrow">&#45;&gt;</span></span> <span><span class="xref-unresolved">Stdlib</span>.Float.t <span class="arrow">&#45;&gt;</span></span> int</span></code></div></div><h2 id="printing"><a href="#printing" class="anchor"></a>Printing</h2><div class="odoc-spec"><div class="spec value anchored" id="val-pp_print"><a href="#val-pp_print" class="anchor"></a><code><span><span class="keyword">val</span> pp_print : <span><span class="xref-unresolved">Stdlib</span>.Format.formatter <span class="arrow">&#45;&gt;</span></span> <span>float <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>float light printing when decimal part is nul</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-print"><a href="#val-print" class="anchor"></a><code><span><span class="keyword">val</span> print : <span><span class="xref-unresolved">Stdlib</span>.Format.formatter <span class="arrow">&#45;&gt;</span></span> <span>float <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-to_string"><a href="#val-to_string" class="anchor"></a><code><span><span class="keyword">val</span> to_string : <span>float <span class="arrow">&#45;&gt;</span></span> string</span></code></div></div></div></body></html>
