Re: simple division

Gavin Flower <gavinflower@archidevsys.co.nz>

From: Gavin Flower <GavinFlower@archidevsys.co.nz>
To: Adrian Klaver <adrian.klaver@aklaver.com>, Geoff Winkless <pgsqladmin@geoff.dj>, pgsql-general@lists.postgresql.org
Date: 2018-12-05T17:31:29Z
Lists: pgsql-general
On 06/12/2018 02:32, Adrian Klaver wrote:
> On 12/5/18 4:45 AM, Gavin Flower wrote:
>> On 06/12/2018 00:05, Geoff Winkless wrote:
>>> On Wed, 5 Dec 2018 at 09:13, Gavin Flower 
>>> <GavinFlower@archidevsys.co.nz> wrote:
>>>> SELECT ceil(10/4.0);
>
>>> Geoff
>>>
>> If you divide one integer by another, then it is logical to get an 
>> integer as as the answer.
>
> Hmm, grab any of my calculators and divide 10/4 and get 2.5. Seems not 
> everybody agrees with that logic:)
>
>
Calculators normally work in floating point (in fact, as far as I am 
aware, they never work in integer mode by default) , unless you are 
either doing symbolic maths or numbers that are integer based like 
hexadecimal.

So your example does not contrdict what I said.