On Sat, Oct 18, 2014 at 4:12 AM, Andreas 'ads' Scherbaum
<[email protected]> wrote:
> 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.
Documentation format is still incorrect. The function names should be
put in a block <function>, same for the value 0.5 with <literal> and
the data types NUMERIC and REAL. Corrected patch is attached. The rest
looks fine to me, I am switching it to Ready for committer.
--
Michael
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 6f30946..f6b865e 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -939,6 +939,26 @@
</tgroup>
</table>
+ <para>
+ For functions like <function>round()</>, <function>log()</> and
+ <function>sqrt()</> which run against either fixed-precision
+ (<literal>NUMERIC</>) or floating-point numbers (e.g. <literal>REAL</>),
+ note that the results of these operations will differ according
+ to the input type due to rounding. This is most observable with
+ <function>round()</>, which can end up rounding down as well as up for
+ any <literal>0.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 ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers