<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link rel="Start" href="index.html"> <link rel="previous" href="BatFloat.Compare.html"> <link rel="Up" href="BatFloat.html"> <link title="Index of types" rel=Appendix href="index_types.html"> <link title="Index of exceptions" rel=Appendix href="index_exceptions.html"> <link title="Index of values" rel=Appendix href="index_values.html"> <link title="Index of class methods" rel=Appendix href="index_methods.html"> <link title="Index of classes" rel=Appendix href="index_classes.html"> <link title="Index of modules" rel=Appendix href="index_modules.html"> <link title="Index of module types" rel=Appendix href="index_module_types.html"> <link title="BatArray" rel="Chapter" href="BatArray.html"> <link title="BatAvlTree" rel="Chapter" href="BatAvlTree.html"> <link title="BatBase64" rel="Chapter" href="BatBase64.html"> <link title="BatBig_int" rel="Chapter" href="BatBig_int.html"> <link title="BatBigarray" rel="Chapter" href="BatBigarray.html"> <link title="BatBitSet" rel="Chapter" href="BatBitSet.html"> <link title="BatBool" rel="Chapter" href="BatBool.html"> <link title="BatBounded" rel="Chapter" href="BatBounded.html"> <link title="BatBuffer" rel="Chapter" href="BatBuffer.html"> <link title="BatCache" rel="Chapter" href="BatCache.html"> <link title="BatChar" rel="Chapter" href="BatChar.html"> <link title="BatCharParser" rel="Chapter" href="BatCharParser.html"> <link title="BatComplex" rel="Chapter" href="BatComplex.html"> <link title="BatConcurrent" rel="Chapter" href="BatConcurrent.html"> <link title="BatDeque" rel="Chapter" href="BatDeque.html"> <link title="BatDigest" rel="Chapter" href="BatDigest.html"> <link title="BatDllist" rel="Chapter" href="BatDllist.html"> <link title="BatDynArray" rel="Chapter" href="BatDynArray.html"> <link title="BatEnum" rel="Chapter" href="BatEnum.html"> <link title="BatFile" rel="Chapter" href="BatFile.html"> <link title="BatFingerTree" rel="Chapter" href="BatFingerTree.html"> <link title="BatFloat" rel="Chapter" href="BatFloat.html"> <link title="BatFormat" rel="Chapter" href="BatFormat.html"> <link title="BatGc" rel="Chapter" href="BatGc.html"> <link title="BatGenlex" rel="Chapter" href="BatGenlex.html"> <link title="BatGlobal" rel="Chapter" href="BatGlobal.html"> <link title="BatHashcons" rel="Chapter" href="BatHashcons.html"> <link title="BatHashtbl" rel="Chapter" href="BatHashtbl.html"> <link title="BatHeap" rel="Chapter" href="BatHeap.html"> <link title="BatIMap" rel="Chapter" href="BatIMap.html"> <link title="BatIO" rel="Chapter" href="BatIO.html"> <link title="BatISet" rel="Chapter" href="BatISet.html"> <link title="BatInnerIO" rel="Chapter" href="BatInnerIO.html"> <link title="BatInnerPervasives" rel="Chapter" href="BatInnerPervasives.html"> <link title="BatInnerWeaktbl" rel="Chapter" href="BatInnerWeaktbl.html"> <link title="BatInt" rel="Chapter" href="BatInt.html"> <link title="BatInt32" rel="Chapter" href="BatInt32.html"> <link title="BatInt64" rel="Chapter" href="BatInt64.html"> <link title="BatInterfaces" rel="Chapter" href="BatInterfaces.html"> <link title="BatLazyList" rel="Chapter" href="BatLazyList.html"> <link title="BatLexing" rel="Chapter" href="BatLexing.html"> <link title="BatList" rel="Chapter" href="BatList.html"> <link title="BatLog" rel="Chapter" href="BatLog.html"> <link title="BatLogger" rel="Chapter" href="BatLogger.html"> <link title="BatMap" rel="Chapter" href="BatMap.html"> <link title="BatMarshal" rel="Chapter" href="BatMarshal.html"> <link title="BatMultiMap" rel="Chapter" href="BatMultiMap.html"> <link title="BatMultiPMap" rel="Chapter" href="BatMultiPMap.html"> <link title="BatMutex" rel="Chapter" href="BatMutex.html"> <link title="BatNativeint" rel="Chapter" href="BatNativeint.html"> <link title="BatNum" rel="Chapter" href="BatNum.html"> <link title="BatNumber" rel="Chapter" href="BatNumber.html"> <link title="BatOo" rel="Chapter" href="BatOo.html"> <link title="BatOptParse" rel="Chapter" href="BatOptParse.html"> <link title="BatOption" rel="Chapter" href="BatOption.html"> <link title="BatOrd" rel="Chapter" href="BatOrd.html"> <link title="BatParserCo" rel="Chapter" href="BatParserCo.html"> <link title="BatPathGen" rel="Chapter" href="BatPathGen.html"> <link title="BatPervasives" rel="Chapter" href="BatPervasives.html"> <link title="BatPrintexc" rel="Chapter" href="BatPrintexc.html"> <link title="BatPrintf" rel="Chapter" href="BatPrintf.html"> <link title="BatQueue" rel="Chapter" href="BatQueue.html"> <link title="BatRMutex" rel="Chapter" href="BatRMutex.html"> <link title="BatRandom" rel="Chapter" href="BatRandom.html"> <link title="BatRef" rel="Chapter" href="BatRef.html"> <link title="BatRefList" rel="Chapter" href="BatRefList.html"> <link title="BatResult" rel="Chapter" href="BatResult.html"> <link title="BatReturn" rel="Chapter" href="BatReturn.html"> <link title="BatScanf" rel="Chapter" href="BatScanf.html"> <link title="BatSeq" rel="Chapter" href="BatSeq.html"> <link title="BatSet" rel="Chapter" href="BatSet.html"> <link title="BatSplay" rel="Chapter" href="BatSplay.html"> <link title="BatStack" rel="Chapter" href="BatStack.html"> <link title="BatStream" rel="Chapter" href="BatStream.html"> <link title="BatString" rel="Chapter" href="BatString.html"> <link title="BatSubstring" rel="Chapter" href="BatSubstring.html"> <link title="BatSys" rel="Chapter" href="BatSys.html"> <link title="BatText" rel="Chapter" href="BatText.html"> <link title="BatTuple" rel="Chapter" href="BatTuple.html"> <link title="BatUChar" rel="Chapter" href="BatUChar.html"> <link title="BatUTF8" rel="Chapter" href="BatUTF8.html"> <link title="BatUnit" rel="Chapter" href="BatUnit.html"> <link title="BatUnix" rel="Chapter" href="BatUnix.html"> <link title="BatUref" rel="Chapter" href="BatUref.html"> <link title="BatVect" rel="Chapter" href="BatVect.html"> <link title="Batteries" rel="Chapter" href="Batteries.html"> <link title="BatteriesConfig" rel="Chapter" href="BatteriesConfig.html"> <link title="BatteriesPrint" rel="Chapter" href="BatteriesPrint.html"> <link title="BatteriesThread" rel="Chapter" href="BatteriesThread.html"> <link title="Extlib" rel="Chapter" href="Extlib.html"><link title="Usual operations" rel="Section" href="#6_Usualoperations"> <link title="Operations specific to floating-point numbers" rel="Section" href="#6_Operationsspecifictofloatingpointnumbers"> <link title="Operations on the internal representation of floating-point numbers" rel="Section" href="#6_Operationsontheinternalrepresentationoffloatingpointnumbers"> <link title="Boilerplate code" rel="Section" href="#6_Boilerplatecode"> <title>Batteries user guide : BatFloat.Safe_float</title> </head> <body> <div class="navbar"><a class="pre" href="BatFloat.Compare.html" title="BatFloat.Compare">Previous</a> <a class="up" href="BatFloat.html" title="BatFloat">Up</a> </div> <h1>Module <a href="type_BatFloat.Safe_float.html">BatFloat.Safe_float</a></h1> <pre><span class="keyword">module</span> Safe_float: <code class="code"><span class="keyword">sig</span></code> <a href="BatFloat.Safe_float.html">..</a> <code class="code"><span class="keyword">end</span></code></pre><div class="info module top"> Operations on floating-point numbers, with exceptions raised in case of error. <p> The operations implemented in this module are the same as the operations implemented in module <code class="code"><span class="constructor">Float</span></code>, with the exception that no operation returns <code class="code">nan</code>, <code class="code">infinity</code> or <code class="code">neg_infinity</code>. In case of overflow, instead of returning <code class="code">infinity</code> or <code class="code">neg_infinity</code>, operations raise exception <code class="code"><span class="constructor">Number</span>.<span class="constructor">Overflow</span></code>. In case of <code class="code">nan</code>, operations raise exception <code class="code"><span class="constructor">Number</span>.<span class="constructor">NaN</span></code>. <p> OCaml's floating-point numbers follow the IEEE 754 standard, using double precision (64 bits) numbers. Floating-point operations never raise an exception on overflow, underflow, division by zero, etc. Instead, special IEEE numbers are returned as appropriate, such as <code class="code">infinity</code> for <code class="code">1.0 /. 0.0</code>, <code class="code">neg_infinity</code> for <code class="code">-1.0 /. 0.0</code>, and <code class="code">nan</code> (``not a number'') for <code class="code">0.0 /. 0.0</code>. These special numbers then propagate through floating-point computations as expected: for instance, <code class="code">1.0 /. infinity</code> is <code class="code">0.0</code>, and any operation with <code class="code">nan</code> as argument returns <code class="code">nan</code> as result. <p> For more precision, see <a href="http://en.wikipedia.org/wiki/IEEE_754">The Wikipedia entry on standard IEEE 754</a>.<br> <b>Author(s):</b> David Teller<br> </div> <hr width="100%"> <pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> = <code class="type">float</code> </pre> <div class="info "> The type of floating-point numbers. <p> Floating-point numbers are the default representation of real numbers by OCaml.<br> </div> <br> <h6 id="6_Usualoperations">Usual operations</h6><br> <pre><span id="VALzero"><span class="keyword">val</span> zero</span> : <code class="type">float</code></pre><div class="info "> Floating number zero. This is the same thing as <code class="code">0.</code><br> </div> <pre><span id="VALone"><span class="keyword">val</span> one</span> : <code class="type">float</code></pre><div class="info "> Floating number one. This is the same thing as <code class="code">1.</code><br> </div> <pre><span id="VALneg"><span class="keyword">val</span> neg</span> : <code class="type">float -> float</code></pre> <pre><span id="VALsucc"><span class="keyword">val</span> succ</span> : <code class="type">float -> float</code></pre><div class="info "> Add <code class="code">1.</code> to a floating number. Note that, as per IEEE 754, if <code class="code">x</code> is a large enough float number, <code class="code">succ x</code> might be equal to <code class="code">x</code>, due to rounding.<br> </div> <pre><span id="VALpred"><span class="keyword">val</span> pred</span> : <code class="type">float -> float</code></pre><div class="info "> Substract <code class="code">1.</code> from a floating number. Note that, as per IEEE 754, if <code class="code">x</code> is a large enough float number, <code class="code">pred x</code> might be equal to <code class="code">x</code>, due to rounding.<br> </div> <pre><span id="VALabs"><span class="keyword">val</span> abs</span> : <code class="type">float -> float</code></pre><div class="info "> The absolute value of a floating point number.<br> </div> <pre><span id="VALadd"><span class="keyword">val</span> add</span> : <code class="type">float -> float -> float</code></pre> <pre><span id="VALsub"><span class="keyword">val</span> sub</span> : <code class="type">float -> float -> float</code></pre> <pre><span id="VALmul"><span class="keyword">val</span> mul</span> : <code class="type">float -> float -> float</code></pre> <pre><span id="VALdiv"><span class="keyword">val</span> div</span> : <code class="type">float -> float -> float</code></pre> <pre><span id="VALmodulo"><span class="keyword">val</span> modulo</span> : <code class="type">float -> float -> float</code></pre> <pre><span id="VALpow"><span class="keyword">val</span> pow</span> : <code class="type">float -> float -> float</code></pre> <pre><span id="VALmin_num"><span class="keyword">val</span> min_num</span> : <code class="type">float</code></pre> <pre><span id="VALmax_num"><span class="keyword">val</span> max_num</span> : <code class="type">float</code></pre> <pre><span id="VALcompare"><span class="keyword">val</span> compare</span> : <code class="type">float -> float -> int</code></pre> <pre><span id="VALof_int"><span class="keyword">val</span> of_int</span> : <code class="type">int -> float</code></pre> <pre><span id="VALto_int"><span class="keyword">val</span> to_int</span> : <code class="type">float -> int</code></pre> <pre><span id="VALof_float"><span class="keyword">val</span> of_float</span> : <code class="type">float -> float</code></pre> <pre><span id="VALto_float"><span class="keyword">val</span> to_float</span> : <code class="type">float -> float</code></pre> <pre><span id="VALof_string"><span class="keyword">val</span> of_string</span> : <code class="type">string -> float</code></pre> <pre><span id="VALto_string"><span class="keyword">val</span> to_string</span> : <code class="type">float -> string</code></pre> <pre><span id="VAL(+)"><span class="keyword">val</span> (+)</span> : <code class="type"><a href="BatFloat.Safe_float.html#TYPEt">t</a> -> <a href="BatFloat.Safe_float.html#TYPEt">t</a> -> <a href="BatFloat.Safe_float.html#TYPEt">t</a></code></pre> <pre><span id="VAL(-)"><span class="keyword">val</span> (-)</span> : <code class="type"><a href="BatFloat.Safe_float.html#TYPEt">t</a> -> <a href="BatFloat.Safe_float.html#TYPEt">t</a> -> <a href="BatFloat.Safe_float.html#TYPEt">t</a></code></pre> <pre><span id="VAL( * )"><span class="keyword">val</span> ( * )</span> : <code class="type"><a href="BatFloat.Safe_float.html#TYPEt">t</a> -> <a href="BatFloat.Safe_float.html#TYPEt">t</a> -> <a href="BatFloat.Safe_float.html#TYPEt">t</a></code></pre> <pre><span id="VAL(/)"><span class="keyword">val</span> (/)</span> : <code class="type"><a href="BatFloat.Safe_float.html#TYPEt">t</a> -> <a href="BatFloat.Safe_float.html#TYPEt">t</a> -> <a href="BatFloat.Safe_float.html#TYPEt">t</a></code></pre> <pre><span id="VAL( ** )"><span class="keyword">val</span> ( ** )</span> : <code class="type"><a href="BatFloat.Safe_float.html#TYPEt">t</a> -> <a href="BatFloat.Safe_float.html#TYPEt">t</a> -> <a href="BatFloat.Safe_float.html#TYPEt">t</a></code></pre> <pre><span id="VALoperations"><span class="keyword">val</span> operations</span> : <code class="type"><a href="BatFloat.Safe_float.html#TYPEt">t</a> <a href="BatNumber.html#TYPEnumeric">BatNumber.numeric</a></code></pre><br> <h6 id="6_Operationsspecifictofloatingpointnumbers">Operations specific to floating-point numbers</h6><br> <pre><span id="VALexp"><span class="keyword">val</span> exp</span> : <code class="type">float -> float</code></pre><div class="info "> Exponential.<br> </div> <pre><span id="VALlog"><span class="keyword">val</span> log</span> : <code class="type">float -> float</code></pre><div class="info "> Natural logarithm.<br> </div> <pre><span id="VALlog10"><span class="keyword">val</span> log10</span> : <code class="type">float -> float</code></pre><div class="info "> Base 10 logarithm.<br> </div> <pre><span id="VALcos"><span class="keyword">val</span> cos</span> : <code class="type">float -> float</code></pre><div class="info "> See <a href="BatFloat.Safe_float.html#VALatan2"><code class="code"><span class="constructor">BatFloat</span>.<span class="constructor">Safe_float</span>.atan2</code></a>.<br> </div> <pre><span id="VALsin"><span class="keyword">val</span> sin</span> : <code class="type">float -> float</code></pre><div class="info "> See <a href="BatFloat.Safe_float.html#VALatan2"><code class="code"><span class="constructor">BatFloat</span>.<span class="constructor">Safe_float</span>.atan2</code></a>.<br> </div> <pre><span id="VALtan"><span class="keyword">val</span> tan</span> : <code class="type">float -> float</code></pre><div class="info "> See <a href="BatFloat.Safe_float.html#VALatan2"><code class="code"><span class="constructor">BatFloat</span>.<span class="constructor">Safe_float</span>.atan2</code></a>.<br> </div> <pre><span id="VALacos"><span class="keyword">val</span> acos</span> : <code class="type">float -> float</code></pre><div class="info "> See <a href="BatFloat.Safe_float.html#VALatan2"><code class="code"><span class="constructor">BatFloat</span>.<span class="constructor">Safe_float</span>.atan2</code></a>.<br> </div> <pre><span id="VALasin"><span class="keyword">val</span> asin</span> : <code class="type">float -> float</code></pre><div class="info "> See <a href="BatFloat.Safe_float.html#VALatan2"><code class="code"><span class="constructor">BatFloat</span>.<span class="constructor">Safe_float</span>.atan2</code></a>.<br> </div> <pre><span id="VALatan"><span class="keyword">val</span> atan</span> : <code class="type">float -> float</code></pre><div class="info "> See <a href="BatFloat.Safe_float.html#VALatan2"><code class="code"><span class="constructor">BatFloat</span>.<span class="constructor">Safe_float</span>.atan2</code></a>.<br> </div> <pre><span id="VALatan2"><span class="keyword">val</span> atan2</span> : <code class="type">float -> float -> float</code></pre><div class="info "> The usual trigonometric functions.<br> </div> <pre><span id="VALcosh"><span class="keyword">val</span> cosh</span> : <code class="type">float -> float</code></pre><div class="info "> See <a href="BatFloat.Safe_float.html#VALtanh"><code class="code"><span class="constructor">BatFloat</span>.<span class="constructor">Safe_float</span>.tanh</code></a>.<br> </div> <pre><span id="VALsinh"><span class="keyword">val</span> sinh</span> : <code class="type">float -> float</code></pre><div class="info "> See <a href="BatFloat.Safe_float.html#VALtanh"><code class="code"><span class="constructor">BatFloat</span>.<span class="constructor">Safe_float</span>.tanh</code></a>.<br> </div> <pre><span id="VALtanh"><span class="keyword">val</span> tanh</span> : <code class="type">float -> float</code></pre><div class="info "> The usual hyperbolic trigonometric functions.<br> </div> <pre><span id="VALceil"><span class="keyword">val</span> ceil</span> : <code class="type">float -> float</code></pre><div class="info "> See <a href="BatFloat.Safe_float.html#VALfloor"><code class="code"><span class="constructor">BatFloat</span>.<span class="constructor">Safe_float</span>.floor</code></a>.<br> </div> <pre><span id="VALfloor"><span class="keyword">val</span> floor</span> : <code class="type">float -> float</code></pre><div class="info "> Round the given float to an integer value. <code class="code">floor f</code> returns the greatest integer value less than or equal to <code class="code">f</code>. <code class="code">ceil f</code> returns the least integer value greater than or equal to <code class="code">f</code>.<br> </div> <pre><span id="VALinfinity"><span class="keyword">val</span> infinity</span> : <code class="type">float</code></pre><div class="info "> Positive infinity.<br> </div> <pre><span id="VALneg_infinity"><span class="keyword">val</span> neg_infinity</span> : <code class="type">float</code></pre><div class="info "> Negative infinity.<br> </div> <pre><span id="VALnan"><span class="keyword">val</span> nan</span> : <code class="type">float</code></pre><div class="info "> A special floating-point value denoting the result of an undefined operation such as <code class="code">0.0 /. 0.0</code>. Stands for ``not a number''. Any floating-point operation with <code class="code">nan</code> as argument returns <code class="code">nan</code> as result. As for floating-point comparisons, <code class="code">=</code>, <code class="code"><</code>, <code class="code"><=</code>, <code class="code">></code> and <code class="code">>=</code> return <code class="code"><span class="keyword">false</span></code> and <code class="code"><></code> returns <code class="code"><span class="keyword">true</span></code> if one or both of their arguments is <code class="code">nan</code>.<br> </div> <pre><span id="VALis_nan"><span class="keyword">val</span> is_nan</span> : <code class="type">float -> bool</code></pre><div class="info "> <code class="code">is_nan f</code> returns <code class="code"><span class="keyword">true</span></code> if <code class="code">f</code> is <code class="code">nan</code>, <code class="code"><span class="keyword">false</span></code> otherwise.<br> </div> <pre><span id="VALepsilon"><span class="keyword">val</span> epsilon</span> : <code class="type">float</code></pre><div class="info "> The smallest positive float <code class="code">x</code> such that <code class="code">1.0 +. x <> 1.0</code>.<br> </div> <pre><span id="VALpi"><span class="keyword">val</span> pi</span> : <code class="type">float</code></pre><div class="info "> The constant pi (3.14159...)<br> </div> <br> <h6 id="6_Operationsontheinternalrepresentationoffloatingpointnumbers">Operations on the internal representation of floating-point numbers</h6><br> <pre><span id="VALfrexp"><span class="keyword">val</span> frexp</span> : <code class="type">float -> float * int</code></pre><div class="info "> <code class="code">frexp f</code> returns the pair of the significant and the exponent of <code class="code">f</code>. When <code class="code">f</code> is zero, the significant <code class="code">x</code> and the exponent <code class="code">n</code> of <code class="code">f</code> are equal to zero. When <code class="code">f</code> is non-zero, they are defined by <code class="code">f = x *. 2 ** n</code> and <code class="code">0.5 <= x < 1.0</code>.<br> </div> <pre><span id="VALldexp"><span class="keyword">val</span> ldexp</span> : <code class="type">float -> int -> float</code></pre><div class="info "> <code class="code">ldexp x n</code> returns <code class="code">x *. 2 ** n</code>.<br> </div> <pre><span id="VALmodf"><span class="keyword">val</span> modf</span> : <code class="type">float -> float * float</code></pre><div class="info "> <code class="code">modf f</code> returns the pair of the fractional and integral part of <code class="code">f</code>.<br> </div> <pre><span id="TYPEfpkind"><span class="keyword">type</span> <code class="type"></code>fpkind</span> = <code class="type">Pervasives.fpclass</code> = </pre><table class="typetable"> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTfpkind.FP_normal"><span class="constructor">FP_normal</span></span></code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Normal number, none of the below</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTfpkind.FP_subnormal"><span class="constructor">FP_subnormal</span></span></code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Number very close to 0.0, has reduced precision</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTfpkind.FP_zero"><span class="constructor">FP_zero</span></span></code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Number is 0.0 or -0.0</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTfpkind.FP_infinite"><span class="constructor">FP_infinite</span></span></code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Number is positive or negative infinity</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTfpkind.FP_nan"><span class="constructor">FP_nan</span></span></code></td> <td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Not a number: result of an undefined operation</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td> </tr></table> <div class="info "> Classes of floating point numbers <p> The five classes of floating-point numbers, as determined by the <a href="BatFloat.Safe_float.html#VALclassify"><code class="code"><span class="constructor">BatFloat</span>.<span class="constructor">Safe_float</span>.classify</code></a> function.<br> </div> <pre><span id="VALclassify"><span class="keyword">val</span> classify</span> : <code class="type">float -> <a href="BatFloat.Safe_float.html#TYPEfpkind">fpkind</a></code></pre><div class="info "> Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.<br> </div> <br> <h6 id="6_Boilerplatecode">Boilerplate code</h6><br> <pre><span id="VALprint"><span class="keyword">val</span> print</span> : <code class="type">'a <a href="BatInnerIO.html#TYPEoutput">BatInnerIO.output</a> -> <a href="BatFloat.Safe_float.html#TYPEt">t</a> -> unit</code></pre><div class="info "> <div class="h7" id="7_Printing">Printing</div><br> </div> </body></html>