pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Gavin Flower <GavinFlower@archidevsys.co.nz>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Geoff Winkless <pgsqladmin@geoff.dj>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: simple division
Date: Wed, 5 Dec 2018 17:37:27 -0300
Message-ID: <20181205203727.lo6fadn6ttwyjqia@alvherre.pgsql> (raw)
In-Reply-To: <d5a77ae7-5e41-57bd-c9a8-85b7c0b9f3e2@archidevsys.co.nz>

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




view thread (25+ messages)

Message-ID: <20181205203727.lo6fadn6ttwyjqia@alvherre.pgsql>
Permalink:  ../20181205203727.lo6fadn6ttwyjqia@alvherre.pgsql/
Also on:    postgresql.org/message-id/20181205203727.lo6fadn6ttwyjqia@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: alvherre@2ndquadrant.com, GavinFlower@archidevsys.co.nz, adrian.klaver@aklaver.com, pgsqladmin@geoff.dj
  Subject: Re: simple division
  In-Reply-To: <20181205203727.lo6fadn6ttwyjqia@alvherre.pgsql>
  References: <d5a77ae7-5e41-57bd-c9a8-85b7c0b9f3e2@archidevsys.co.nz> <20181205203727.lo6fadn6ttwyjqia@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox