Re: simple division

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Gavin Flower <GavinFlower@archidevsys.co.nz>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>, Geoff Winkless <pgsqladmin@geoff.dj>, pgsql-general@lists.postgresql.org
Date: 2018-12-05T20:37:27Z
Lists: pgsql-general
On 2018-Dec-06, Gavin Flower wrote:

> Calculators normally work in floating point (in fact, as far as I am aware,
> they never work in integer mode by default),

The reason they don't work in "integer mode" is because it doesn't make
sense.

We only have this thing called "integer division" because it's a cheap
thing to implement in terms of machine instructions.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services