A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-January/070708.html below:

[Python-Dev] Floor division

[Python-Dev] Floor division [Python-Dev] Floor divisionGuido van Rossum guido at python.org
Sat Jan 20 02:32:27 CET 2007
Probably because I tend not to know what I'm doing when numerics are
concerned. :-(

On 1/19/07, Raymond Hettinger <raymond.hettinger at verizon.net> wrote:
> I bumped into an oddity today:
>
>     6.0 // 0.001 != math.floor(6.0 / 0.001)
>
> In looking at Objects/floatobject.c, I was surprised to find that
> float_floor_division() is implemented in terms of float_divmod().  Does anyone
> know why it takes such a circuitous path?  I had expected something simpler and
> faster:
>
>      return PyFloat_FromDouble(floor(a/b));
>
>
> Raymond
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4