Popular recipes tagged "float" but not "range"http://code.activestate.com/recipes/tags/float-range/2012-05-17T13:47:07-07:00ActiveState Code RecipesFunction that supports dividing timedelta by float (Python)
2012-05-17T13:47:07-07:00Ben Hoythttp://code.activestate.com/recipes/users/4170919/http://code.activestate.com/recipes/578136-function-that-supports-dividing-timedelta-by-float/
<p style="color: grey">
Python
recipe 578136
by <a href="/recipes/users/4170919/">Ben Hoyt</a>
(<a href="/recipes/tags/datetime/">datetime</a>, <a href="/recipes/tags/division/">division</a>, <a href="/recipes/tags/float/">float</a>).
</p>
<p>Python 2.x doesn't support dividing a timedelta by a float (only works with int). This function adds support for that.</p>
How to Mutate a Float (Python)
2012-05-14T16:49:13-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578132-how-to-mutate-a-float/
<p style="color: grey">
Python
recipe 578132
by <a href="/recipes/users/2608421/">Stephen Chappell</a>
(<a href="/recipes/tags/ctypes/">ctypes</a>, <a href="/recipes/tags/experiment/">experiment</a>, <a href="/recipes/tags/float/">float</a>, <a href="/recipes/tags/structure/">structure</a>).
</p>
<p>This is just an experiment to test my mental understanding of Python. It should not be used in any code as is violates the design principle that floats are to be immutable. The code also abuses <code>ctypes</code> and an understanding of how <code>floats</code> are currently arranged in memory. <code>set_float</code> is not guaranteed to work properly on any system, and may fail to work in the future if the data's arrangement changes.</p>
Floating point bitwise operations (Python)
2011-11-28T23:47:25-08:00Pyry Pakkanenhttp://code.activestate.com/recipes/users/4180119/http://code.activestate.com/recipes/577967-floating-point-bitwise-operations/
<p style="color: grey">
Python
recipe 577967
by <a href="/recipes/users/4180119/">Pyry Pakkanen</a>
(<a href="/recipes/tags/bitwise/">bitwise</a>, <a href="/recipes/tags/float/">float</a>, <a href="/recipes/tags/floating/">floating</a>, <a href="/recipes/tags/point/">point</a>).
</p>
<p>Implements bitwise operations for real numbers by using an infinite one's complement representation.</p>
"Comma float" to float (Python)
2010-02-11T22:19:41-08:00Matevz Leskohttp://code.activestate.com/recipes/users/4173032/http://code.activestate.com/recipes/577054-comma-float-to-float/
<p style="color: grey">
Python
recipe 577054
by <a href="/recipes/users/4173032/">Matevz Lesko</a>
(<a href="/recipes/tags/comma/">comma</a>, <a href="/recipes/tags/float/">float</a>, <a href="/recipes/tags/numbers/">numbers</a>, <a href="/recipes/tags/string/">string</a>).
Revision 2.
</p>
<p>Convert comma separated floating point number (12,3456) to float.</p>