1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>intlog10</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="ch06s02.html" title="Digital TV (DVB) devices"><link rel="prev" href="API-intlog2.html" title="intlog2"><link rel="next" href="API-dvb-ringbuffer-pkt-write.html" title="dvb_ringbuffer_pkt_write"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">intlog10</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-intlog2.html">Prev</a> </td><th width="60%" align="center">Digital TV (DVB) devices</th><td width="20%" align="right"> <a accesskey="n" href="API-dvb-ringbuffer-pkt-write.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-intlog10"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>intlog10 — 
2     computes log10 of a value; the result is shifted left by 24 bits
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">unsigned int <b class="fsfunc">intlog10 </b>(</code></td><td>u32 <var class="pdparam">value</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="id-1.8.3.20.5"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>value</code></em></span></dt><dd><p>
4     The value (must be != 0)
5    </p></dd></dl></div></div><div class="refsect1"><a name="id-1.8.3.20.6"></a><h2>to use rational values you can use the following method</h2><p>
6   intlog10(value) = intlog10(value * 10^x) - x * 2^24
7</p></div><div class="refsect1"><a name="id-1.8.3.20.7"></a><h2>An usecase example</h2><div class="informalexample"><pre class="programlisting">
8   	intlog10(1000) will give 3 &lt;&lt; 24 = 3 * 2^24
9     due to the implementation intlog10(1000) might be not exactly 3 * 2^24
10
11   look at intlog2 for similar examples
12</pre></div></div><div class="refsect1"><a name="id-1.8.3.20.8"></a><h2>return</h2><p>
13   log10(value) * 2^24
14</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-intlog2.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch06s02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-dvb-ringbuffer-pkt-write.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">intlog2</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">dvb_ringbuffer_pkt_write</span></td></tr></table></div></body></html>
15