Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUdvO-0006Bj-5s for pgsql-general@arkaria.postgresql.org; Wed, 05 Dec 2018 20:37:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gUdvK-00047t-Ub for pgsql-general@arkaria.postgresql.org; Wed, 05 Dec 2018 20:37:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUdvK-00047m-Dl for pgsql-general@lists.postgresql.org; Wed, 05 Dec 2018 20:37:34 +0000 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gUdvG-0005xL-FK for pgsql-general@lists.postgresql.org; Wed, 05 Dec 2018 20:37:32 +0000 Received: by mail-qt1-x844.google.com with SMTP id r14so23942442qtp.1 for ; Wed, 05 Dec 2018 12:37:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=vUnbwtncsPfo8xFlRjtPnEla8e1BLYqIlFrfXlyLbyA=; b=L7n59bMVdaI00XZUuQUm7hf5M79gpYf5RY+qv+lWxC3wR7PYIplq8NA71yJ1G4fXqs 9D+S0NMifT7oqXbiC0Ri/+7VvaX4jIf6lUJ8Yf+YjtqP320zmv9owJNEZwqrT3Dubg0p HGtw1UFADIfdHHISHiLOyL2c/wU/aSO2ESa3iUF/lZtrxWDyUy2AxDy/mr99AT6dePhG gHVsOEmMRm90cXwDiVUCx091PdWzyVmnm0EFizIDia0YuvZLBMAb17yz89GTkbvIjqDq 0yvMKMkNn5mPBte65qiqQDIZuRhLenmfWZ+sppUEGaXfC4kaWBLyYC9AzeLwLF9i1fPD qwxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=vUnbwtncsPfo8xFlRjtPnEla8e1BLYqIlFrfXlyLbyA=; b=Xdln0LfZ/kKesEtm5NgjNxLYlA8HxeVyo+BRvU927ySW2sbwm3jMdk+MdHZJHjGicy ngzcdywqxZJf8R9Nntr25MQQd/TLG2dHKyvwKIKKMKx9mCRrZ4QP7W/fXQomd39xyCDW Vft8QwquTxLQ2TK7koTcpGurXDeFxxybWDVXyZAomBxtn6IHbMv43p16UVy3ar/ms+KB 0VoKenUU9CrNye0EVEXkw/KgWV/LlN1zJ6SCC2dA60fiefWlanx+WY5a1e2wXAEfDY3J iN7DfXc7XcvJFb9c1AbtnG89wAjH61Me7qLenV49DgCRJ1xHCQ9VdxYECp6vBBSS4Xcf acYA== X-Gm-Message-State: AA+aEWYTnG+lqBsioXINBcS83p/fpie3DtuQYG8Rc6oC17Loje/K3DBx koErFpM4yqwn5iAGAHLh8QIWT8sXaO0= X-Google-Smtp-Source: AFSGD/VJAyqZ7mB89tF8DzYGZVzyGtQi0Tw7sq/Hb/yCpTXfuhc6kqWPW2YD8qtfjdxnco+PHwAJJA== X-Received: by 2002:a0c:a8e3:: with SMTP id h35mr24732173qvc.92.1544042249414; Wed, 05 Dec 2018 12:37:29 -0800 (PST) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id g23sm14986353qta.24.2018.12.05.12.37.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Dec 2018 12:37:28 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 0F45572F; Wed, 5 Dec 2018 17:37:27 -0300 (-03) Date: Wed, 5 Dec 2018 17:37:27 -0300 From: Alvaro Herrera To: Gavin Flower Cc: Adrian Klaver , Geoff Winkless , pgsql-general@lists.postgresql.org Subject: Re: simple division Message-ID: <20181205203727.lo6fadn6ttwyjqia@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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