On 09/14/2014 06:32 PM, Peter Eisentraut wrote:
On 9/12/14 3:13 PM, Andreas 'ads' Scherbaum wrote:
Of course a general rule how to link to WP would be nice ...
I think Wikipedia links should be avoided altogether. We can assume
that readers are technically proficient to look up general technical
concepts on their own using a reference system of their choice.
In cases where a link is warranted, it is better to construct a proper
bibliographic citation to the primary source material, such as an IEEE
standard or an academic paper, in a way that will stand the test of time.
That's a clear statement, and makes sense. Should be written down
somewhere, so it can be found again.
Independent of that, it is actually not correct that "we use the IEEE's
rules", because "we" don't use any rules, that is up to the operating
system/platform. While most platforms indeed do use the IEEE
floating-point standard more less, some don't. Section 8.1.3 tries to
point that out.
New version attached, WP link removed, wording changed.
Regards,
--
Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors
Volunteer Regional Contact, Germany - PostgreSQL Project
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 13c71af..d54cf58 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -924,6 +924,25 @@
</tgroup>
</table>
+ <para>
+ For functions like round(), log() and sqrt() which run against
+ either fixed-precision (NUMERIC) or floating-point numbers (e.g. REAL),
+ note that the results of these operations will differ according
+ to the input type due to rounding. This is most observable with
+ round(), which can end up rounding down as well as up for
+ any #.5 value. <productname>PostgreSQL</productname>'s handling
+ of floating-point values depends on the operating system, which
+ may or may not follow the IEEE floating-point standard.
+ </para>
+
+ <para>
+ The bitwise operators work only on integral data types, whereas
+ the others are available for all numeric data types. The bitwise
+ operators are also available for the bit string types
+ <type>bit</type> and <type>bit varying</type>, as
+ shown in <xref linkend="functions-bit-string-op-table">.
+ </para>
+
<para>
<xref linkend="functions-math-random-table"> shows functions for
generating random numbers.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers