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 1ilkUA-0004D8-QN for pgsql-docs@arkaria.postgresql.org; Mon, 30 Dec 2019 02:08:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ilkT9-0003Jm-OF for pgsql-docs@arkaria.postgresql.org; Mon, 30 Dec 2019 02:07:43 +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 1ilkT9-0003Jf-Cs for pgsql-docs@lists.postgresql.org; Mon, 30 Dec 2019 02:07:43 +0000 Received: from sraihb2.sra.co.jp ([202.32.10.6]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ilkT5-0005jJ-U4 for pgsql-docs@lists.postgresql.org; Mon, 30 Dec 2019 02:07:41 +0000 Received: from srascf.sra.co.jp (srascf [133.137.8.80]) by sraihb2.sra.co.jp (Postfix) with ESMTP id A1AF82A15F3 for ; Mon, 30 Dec 2019 11:07:37 +0900 (JST) Received: from srascb.sra.co.jp (unknown [133.137.8.65]) by srascf.sra.co.jp with smtp id 269c_03b2_98a62c15_deff_4019_b73b_b83410c45c3f; Mon, 30 Dec 2019 11:07:37 +0900 Received: from sranhm.sra.co.jp (osspc25 [133.137.174.97]) by srascb.sra.co.jp (Postfix) with ESMTP id 7D70D2D6943 for ; Mon, 30 Dec 2019 11:07:37 +0900 (JST) Received: from localhost (sraihb-hub.sra.co.jp [133.137.8.6]) by sranhm.sra.co.jp (Postfix) with ESMTP id 42266A026C; Mon, 30 Dec 2019 11:07:37 +0900 (JST) Date: Mon, 30 Dec 2019 11:07:36 +0900 (JST) Message-Id: <20191230.110736.1393438990550013054.t-ishii@sraoss.co.jp> To: vik.fearing@2ndquadrant.com Cc: pgsql-docs@lists.postgresql.org Subject: Re: Question to datatype.sgml From: Tatsuo Ishii In-Reply-To: <79565c24-89ed-abfd-46df-4a23cde21b04@2ndquadrant.com> References: <20191230.093451.1762483750956466101.t-ishii@sraoss.co.jp> <79565c24-89ed-abfd-46df-4a23cde21b04@2ndquadrant.com> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On 30/12/2019 01:34, Tatsuo Ishii wrote: >> Hi, >> >> Can you please someone elaborate what's the meaning of "even" in >> datatype.sgml? >> >> >> By default, floating point values are output in text form in th= eir >> shortest precise decimal representation; the decimal value prod= uced is >> closer to the true stored binary value than to any other value >> representable in the same binary precision. (However, the outpu= t value is >> currently never exactly midway between two= >> representable values, in order to avoid a widespread bug where = input >> routines do not properly respect the round-to-even rule.) This = value will >> ~~~~~~~~~~~~~~~~~~~ >> use at most 17 significant decimal digits for float8 >> values, and at most 9 digits for float4 values. >> >> >> I think "even" means "equality" here, not "even" of "even and odd". > = > = > It does actually mean "even and odd".=A0 This kind of rounding is als= o > called "Banker's Rounding". > = > https://en.wikipedia.org/wiki/Rounding#Round_half_to_even Oh, Thanks! The link is very helpful. -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese:http://www.sraoss.co.jp