Git commit acb3c2226dbb773f2e3e77e78c2967b6e0b44219 by Tomas Mecir.
Committed on 04/07/2015 at 16:17.
Pushed by mecir into branch 'frameworks'.

Improve the documentation for the CEIL, CEILING, and FLOOR functions as 
suggested in bug 142563

Patch by Gabe Giles

BUG: 142563

M  +12   -6    doc/sheets/functions.docbook
M  +12   -6    sheets/functions/math.xml

http://commits.kde.org/calligra/acb3c2226dbb773f2e3e77e78c2967b6e0b44219

diff --git a/doc/sheets/functions.docbook b/doc/sheets/functions.docbook
index c239df6..00d23a0 100644
--- a/doc/sheets/functions.docbook
+++ b/doc/sheets/functions.docbook
@@ -5663,9 +5663,9 @@ all changes will be overwritten on the next script run
 
 <sect3 id="CEIL">
 <title>CEIL</title>
-<para>The CEIL() function rounds x up to the nearest integer, returning that 
value as a double.</para>
+<para>The CEIL() function rounds x up to the nearest integer which is greater 
than the input, returning that value as a double.</para>
 <para><segmentedlist><segtitle>Return type</segtitle>
-<seglistitem><seg>A floating point value (like 1.3, 0.343, 253 
)</seg></seglistitem></segmentedlist></para>
+<seglistitem><seg>An integer (like 0, -5, 14 
)</seg></seglistitem></segmentedlist></para>
 <variablelist>
 <varlistentry><term>Syntax</term>
 <listitem><para>CEIL(x)</para></listitem>
@@ -5684,6 +5684,8 @@ all changes will be overwritten on the next script run
 <listitem><simplelist>
 <member><link linkend="CEILING">CEILING</link>&nbsp;</member>
 <member><link linkend="FLOOR">FLOOR</link>&nbsp;</member>
+<member><link linkend="ROUND">ROUND</link>&nbsp;</member>
+<member><link linkend="ROUNDUP">ROUNDUP</link>&nbsp;</member>
 </simplelist></listitem>
 </varlistentry>
 </variablelist>
@@ -5691,9 +5693,9 @@ all changes will be overwritten on the next script run
 
 <sect3 id="CEILING">
 <title>CEILING</title>
-<para>The CEILING() function rounds x up (away from zero) to the nearest 
multiple of Significance. The default value for Significance is 1 (or -1 if the 
value is negative), which means rounding up to the nearest integer. If the Mode 
parameter is non-zero, the function rounds away from zero, instead of up 
towards the positive infinity.</para>
+<para>The CEILING() function rounds x up (away from zero) to the nearest 
multiple of Significance which is greater than the input. The default value for 
Significance is 1 (or -1 if the value is negative), which means rounding up to 
the nearest integer. If the Mode parameter is non-zero, the function rounds 
away from zero, instead of up towards the positive infinity.</para>
 <para><segmentedlist><segtitle>Return type</segtitle>
-<seglistitem><seg>A floating point value (like 1.3, 0.343, 253 
)</seg></seglistitem></segmentedlist></para>
+<seglistitem><seg>An integer (like 0, -5, 14 
)</seg></seglistitem></segmentedlist></para>
 <variablelist>
 <varlistentry><term>Syntax</term>
 <listitem><para>CEILING(x)</para></listitem>
@@ -5720,6 +5722,8 @@ all changes will be overwritten on the next script run
 <listitem><simplelist>
 <member><link linkend="CEIL">CEIL</link>&nbsp;</member>
 <member><link linkend="FLOOR">FLOOR</link>&nbsp;</member>
+<member><link linkend="ROUND">ROUND</link>&nbsp;</member>
+<member><link linkend="ROUNDUP">ROUNDUP</link>&nbsp;</member>
 </simplelist></listitem>
 </varlistentry>
 </variablelist>
@@ -6037,14 +6041,14 @@ all changes will be overwritten on the next script run
 <sect3 id="FLOOR">
 <title>FLOOR</title>
 <para>Round a number x down to the nearest multiple of the second parameter, 
Significance.</para>
-<para>The FLOOR() function rounds x down (towards zero) to the nearest 
multiple of Significance.
+<para>The FLOOR() function rounds x down (towards zero) to the nearest 
multiple of Significance which is smaller than the input.
                 The default value for Significance is 1, if x is positive. It 
is -1, if the value is negative,
                 which means rounding up to the nearest integer.
                 If mode is given and not equal to zero, the amount of x is 
rounded toward zero to a multiple
                 of significance and then the sign applied. Otherwise, it 
rounds toward negative infinity.
                     If any of the two parameters x or Significance is zero, 
the result is zero.</para>
 <para><segmentedlist><segtitle>Return type</segtitle>
-<seglistitem><seg>A floating point value (like 1.3, 0.343, 253 
)</seg></seglistitem></segmentedlist></para>
+<seglistitem><seg>An integer (like 0, -5, 14 
)</seg></seglistitem></segmentedlist></para>
 <variablelist>
 <varlistentry><term>Syntax</term>
 <listitem><para>FLOOR(x)</para></listitem>
@@ -6071,6 +6075,8 @@ all changes will be overwritten on the next script run
 <listitem><simplelist>
 <member><link linkend="CEIL">CEIL</link>&nbsp;</member>
 <member><link linkend="CEILING">CEILING</link>&nbsp;</member>
+<member><link linkend="ROUND">ROUND</link>&nbsp;</member>
+<member><link linkend="ROUNDDOWN">ROUNDDOWN</link>&nbsp;</member>
 </simplelist></listitem>
 </varlistentry>
 </variablelist>
diff --git a/sheets/functions/math.xml b/sheets/functions/math.xml
index 5b47291..05bcf7e 100644
--- a/sheets/functions/math.xml
+++ b/sheets/functions/math.xml
@@ -827,24 +827,26 @@
 
     <Function>
         <Name>CEIL</Name>
-        <Type>Float</Type>
+        <Type>Integer</Type>
         <Parameter>
             <Comment>A floating point value</Comment>
             <Type>Float</Type>
         </Parameter>
         <Help>
-            <Text>The CEIL() function rounds x up to the nearest integer, 
returning that value as a double.</Text>
+            <Text>The CEIL() function rounds x up to the nearest integer which 
is greater than the input, returning that value as a double.</Text>
             <Syntax>CEIL(x)</Syntax>
             <Example>CEIL(12.5) equals 13</Example>
             <Example>CEIL(-12.5) equals -12</Example>
             <Related>CEILING</Related>
             <Related>FLOOR</Related>
+           <Related>ROUND</Related>
+           <Related>ROUNDUP</Related>
         </Help>
     </Function>
 
     <Function>
         <Name>CEILING</Name>
-        <Type>Float</Type>
+        <Type>Integer</Type>
         <Parameter>
             <Comment>A floating point value</Comment>
             <Type>Float</Type>
@@ -858,7 +860,7 @@
             <Type>Float</Type>
         </Parameter>
         <Help>
-            <Text>The CEILING() function rounds x up (away from zero) to the 
nearest multiple of Significance. The default value for Significance is 1 (or 
-1 if the value is negative), which means rounding up to the nearest integer. 
If the Mode parameter is non-zero, the function rounds away from zero, instead 
of up towards the positive infinity.</Text>
+            <Text>The CEILING() function rounds x up (away from zero) to the 
nearest multiple of Significance which is greater than the input. The default 
value for Significance is 1 (or -1 if the value is negative), which means 
rounding up to the nearest integer. If the Mode parameter is non-zero, the 
function rounds away from zero, instead of up towards the positive 
infinity.</Text>
             <Syntax>CEILING(x)</Syntax>
             <Example>CEILING(12.5) equals 13</Example>
             <Example>CEILING(6.43; 4) equals 8</Example>
@@ -866,12 +868,14 @@
             <Example>CEILING(-6.43; -4; 0) equals -4</Example>
             <Related>CEIL</Related>
             <Related>FLOOR</Related>
+           <Related>ROUND</Related>
+           <Related>ROUNDUP</Related>
         </Help>
     </Function>
 
     <Function>
         <Name>FLOOR</Name>
-        <Type>Float</Type>
+        <Type>Integer</Type>
         <Parameter>
             <Comment>A floating point value</Comment>
             <Type>Float</Type>
@@ -887,7 +891,7 @@
         <Help>
             <Text>Round a number x down to the nearest multiple of the second 
parameter, Significance.</Text>
             <!--FIXME remove wordwrap, leads to strange looking translation 
messages-->
-            <Text>The FLOOR() function rounds x down (towards zero) to the 
nearest multiple of Significance.
+            <Text>The FLOOR() function rounds x down (towards zero) to the 
nearest multiple of Significance which is smaller than the input.
                 The default value for Significance is 1, if x is positive. It 
is -1, if the value is negative,
                 which means rounding up to the nearest integer.
                 If mode is given and not equal to zero, the amount of x is 
rounded toward zero to a multiple
@@ -900,6 +904,8 @@
                     <Example>FLOOR(5; 2.2) equals 4.4</Example>
                     <Related>CEIL</Related>
                     <Related>CEILING</Related>
+                   <Related>ROUND</Related>
+                   <Related>ROUNDDOWN</Related>
                 </Help>
             </Function>
 

Reply via email to