Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fnAs6-0002GM-Mh for pgsql-docs@arkaria.postgresql.org; Tue, 07 Aug 2018 22:54:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fnAs3-0001Yv-TF for pgsql-docs@arkaria.postgresql.org; Tue, 07 Aug 2018 22:54:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fnAs3-0001Yo-Nk for pgsql-docs@lists.postgresql.org; Tue, 07 Aug 2018 22:54:31 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fnAs0-0004m7-5K for pgsql-docs@lists.postgresql.org; Tue, 07 Aug 2018 22:54:30 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1fnAry-0005Vv-Ck; Tue, 07 Aug 2018 18:54:26 -0400 Date: Tue, 7 Aug 2018 18:54:26 -0400 From: Bruce Momjian To: sebastien.clement@canada.ca, pgsql-docs@lists.postgresql.org Subject: Re: decimal digits precision for real and double precision types Message-ID: <20180807225426.GA19156@momjian.us> References: <153185494190.1395.13365433184520865716@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <153185494190.1395.13365433184520865716@wrigleys.postgresql.org> User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Jul 17, 2018 at 07:15:41PM +0000, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/10/static/datatype-numeric.html > Description: > > In table 8.2 for numeric types, when the documentation states "6 decimal > digits precision" for the real type, we are talking about 6 digits after the > decimal point or 6 digits in total (before and after)? Well the number is stored as a mantissa and exponent, so it is 6 mantissa digits plus an exponent from 1E-37 to 1E+37. -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +