public inbox for [email protected]
help / color / mirror / Atom feedQuestion to datatype.sgml
6+ messages / 3 participants
[nested] [flat]
* Question to datatype.sgml
@ 2019-12-30 00:34 Tatsuo Ishii <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Tatsuo Ishii @ 2019-12-30 00:34 UTC (permalink / raw)
To: [email protected]
Hi,
Can you please someone elaborate what's the meaning of "even" in
datatype.sgml?
<para>
By default, floating point values are output in text form in their
shortest precise decimal representation; the decimal value produced is
closer to the true stored binary value than to any other value
representable in the same binary precision. (However, the output value is
currently never <emphasis>exactly</emphasis> 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 <type>float8</type>
values, and at most 9 digits for <type>float4</type> values.
</para>
I think "even" means "equality" here, not "even" of "even and odd".
Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Question to datatype.sgml
@ 2019-12-30 00:52 Vik Fearing <[email protected]>
parent: Tatsuo Ishii <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Vik Fearing @ 2019-12-30 00:52 UTC (permalink / raw)
To: Tatsuo Ishii <[email protected]>; [email protected]
On 30/12/2019 01:34, Tatsuo Ishii wrote:
> Hi,
>
> Can you please someone elaborate what's the meaning of "even" in
> datatype.sgml?
>
> <para>
> By default, floating point values are output in text form in their
> shortest precise decimal representation; the decimal value produced is
> closer to the true stored binary value than to any other value
> representable in the same binary precision. (However, the output value is
> currently never <emphasis>exactly</emphasis> 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 <type>float8</type>
> values, and at most 9 digits for <type>float4</type> values.
> </para>
>
> I think "even" means "equality" here, not "even" of "even and odd".
It does actually mean "even and odd". This kind of rounding is also
called "Banker's Rounding".
https://en.wikipedia.org/wiki/Rounding#Round_half_to_even
--
Vik Fearing
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Question to datatype.sgml
@ 2019-12-30 02:07 Tatsuo Ishii <[email protected]>
parent: Vik Fearing <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Tatsuo Ishii @ 2019-12-30 02:07 UTC (permalink / raw)
To: [email protected]; +Cc: [email protected]
> On 30/12/2019 01:34, Tatsuo Ishii wrote:
>> Hi,
>>
>> Can you please someone elaborate what's the meaning of "even" in
>> datatype.sgml?
>>
>> <para>
>> By default, floating point values are output in text form in their
>> shortest precise decimal representation; the decimal value produced is
>> closer to the true stored binary value than to any other value
>> representable in the same binary precision. (However, the output value is
>> currently never <emphasis>exactly</emphasis> 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 <type>float8</type>
>> values, and at most 9 digits for <type>float4</type> values.
>> </para>
>>
>> I think "even" means "equality" here, not "even" of "even and odd".
>
>
> It does actually mean "even and odd". This kind of rounding is also
> 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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Question to datatype.sgml
@ 2019-12-30 04:51 Tom Lane <[email protected]>
parent: Tatsuo Ishii <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Tom Lane @ 2019-12-30 04:51 UTC (permalink / raw)
To: Tatsuo Ishii <[email protected]>; +Cc: [email protected]; [email protected]
Tatsuo Ishii <[email protected]> writes:
>>> Can you please someone elaborate what's the meaning of "even" in
>>> datatype.sgml?
>>>> representable values, in order to avoid a widespread bug where input
>>>> routines do not properly respect the round-to-even rule.) This value will
>> It does actually mean "even and odd". This kind of rounding is also
>> called "Banker's Rounding".
>> https://en.wikipedia.org/wiki/Rounding#Round_half_to_even
> Oh, Thanks! The link is very helpful.
I think actually the standard terminology is "round-to-nearest-even".
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Question to datatype.sgml
@ 2019-12-30 22:26 Tatsuo Ishii <[email protected]>
parent: Tom Lane <[email protected]>
0 siblings, 1 reply; 6+ messages in thread
From: Tatsuo Ishii @ 2019-12-30 22:26 UTC (permalink / raw)
To: [email protected]; +Cc: [email protected]; [email protected]
>>> It does actually mean "even and odd". This kind of rounding is also
>>> called "Banker's Rounding".
>>> https://en.wikipedia.org/wiki/Rounding#Round_half_to_even
>
>> Oh, Thanks! The link is very helpful.
>
> I think actually the standard terminology is "round-to-nearest-even".
Ok, I will change it to "round-to-nearest-even" if there's no objection.
Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Question to datatype.sgml
@ 2020-01-05 11:04 Tatsuo Ishii <[email protected]>
parent: Tatsuo Ishii <[email protected]>
0 siblings, 0 replies; 6+ messages in thread
From: Tatsuo Ishii @ 2020-01-05 11:04 UTC (permalink / raw)
To: [email protected]; [email protected]; [email protected]
>> I think actually the standard terminology is "round-to-nearest-even".
>
> Ok, I will change it to "round-to-nearest-even" if there's no objection.
Done.
Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2020-01-05 11:04 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-12-30 00:34 Question to datatype.sgml Tatsuo Ishii <[email protected]>
2019-12-30 00:52 ` Vik Fearing <[email protected]>
2019-12-30 02:07 ` Tatsuo Ishii <[email protected]>
2019-12-30 04:51 ` Tom Lane <[email protected]>
2019-12-30 22:26 ` Tatsuo Ishii <[email protected]>
2020-01-05 11:04 ` Tatsuo Ishii <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox