[gnumeric] Docs: note that numtheory functions now have tests



commit 5372904093fda28b850f5e4c50e88f9879377f1e
Author: Morten Welinder <terra gnome org>
Date:   Sat Nov 18 21:10:27 2017 -0500

    Docs: note that numtheory functions now have tests

 doc/C/func.defs                  |   10 ++++++++++
 doc/C/functions.xml              |   33 +++++++++++++++++++++++++++++++++
 plugins/fn-numtheory/numtheory.c |    8 ++++----
 3 files changed, 47 insertions(+), 4 deletions(-)
---
diff --git a/doc/C/func.defs b/doc/C/func.defs
index 8f76d0e..54167ee 100644
--- a/doc/C/func.defs
+++ b/doc/C/func.defs
@@ -3848,6 +3848,16 @@ QUOTIENT (@{numerator},@{denominator})⨉@{denominator}+MOD(@{numerator},@{denom
 @SEEALSO=PI,DEGREES
 
 @CATEGORY=Mathematics
+@FUNCTION=REDUCEPI
+@SHORTDESC=reduce modulo Pi divided by a power of 2
+@SYNTAX=REDUCEPI(x,e,q)
+@ARGUMENTDESCRIPTION=@{x}: number
+@{e}: scale
+@{q}: get lower bits of quotient, defaults to FALSE
+@NOTE=This function returns a value, xr, such that @{x}=xr+j*Pi/2^@{e} where j is an integer and the 
absolute value of xr does not exceed Pi/2^(@{e}+1).  If optional argument @{q} is TRUE, returns instead the 
@e+1 lower bits of j.  The reduction is performed as-if using an exact value of Pi. The lowest valid @{e} is 
-1 representing reduction modulo 2*Pi; the highest is 7 representing reduction modulo Pi/256.
+@SEEALSO=PI
+
+@CATEGORY=Mathematics
 @FUNCTION=ROMAN
 @SHORTDESC=@{n} as a roman numeral text
 @SYNTAX=ROMAN(n,type)
diff --git a/doc/C/functions.xml b/doc/C/functions.xml
index 1262c94..c41de82 100644
--- a/doc/C/functions.xml
+++ b/doc/C/functions.xml
@@ -12821,6 +12821,39 @@
       </para>
       </refsect1>
     </refentry>
+    <refentry id="gnumeric-function-REDUCEPI">
+      <refmeta>
+        <refentrytitle>
+          <function>REDUCEPI</function>
+        </refentrytitle>
+      </refmeta>
+      <refnamediv>
+        <refname>
+          <function>REDUCEPI</function>
+        </refname>
+        <refpurpose>
+        reduce modulo Pi divided by a power of 2
+      </refpurpose>
+      </refnamediv>
+      <refsynopsisdiv>
+        
<synopsis><function>REDUCEPI</function>(<parameter>x</parameter>,<parameter>e</parameter>,<parameter>q</parameter>)</synopsis>
+      </refsynopsisdiv>
+      <refsect1>
+        <title>Arguments</title>
+        <para><parameter>x</parameter>: number</para>
+        <para><parameter>e</parameter>: scale</para>
+        <para><parameter>q</parameter>: get lower bits of quotient, defaults to FALSE</para>
+      </refsect1>
+      <refsect1>
+        <title>Note</title>
+        <para>This function returns a value, xr, such that 
<parameter>x</parameter>=xr+j*Pi/2^<parameter>e</parameter> where j is an integer and the absolute value of 
xr does not exceed Pi/2^(<parameter>e</parameter>+1).  If optional argument <parameter>q</parameter> is TRUE, 
returns instead the <parameter>e</parameter>+1 lower bits of j.  The reduction is performed as-if using an 
exact value of Pi. The lowest valid <parameter>e</parameter> is -1 representing reduction modulo 2*Pi; the 
highest is 7 representing reduction modulo Pi/256.</para>
+      </refsect1>
+      <refsect1>
+        <title>See also</title>
+        <para><link linkend="gnumeric-function-PI"><function>PI</function></link>.
+      </para>
+      </refsect1>
+    </refentry>
     <refentry id="gnumeric-function-ROMAN">
       <refmeta>
         <refentrytitle>
diff --git a/plugins/fn-numtheory/numtheory.c b/plugins/fn-numtheory/numtheory.c
index 28a5d12..786ba73 100644
--- a/plugins/fn-numtheory/numtheory.c
+++ b/plugins/fn-numtheory/numtheory.c
@@ -675,10 +675,10 @@ go_plugin_shutdown (GOPlugin *plugin, GOCmdContext *cc)
 const GnmFuncDescriptor num_theory_functions[] = {
        {"ithprime", "f", help_ithprime,
         &gnumeric_ithprime, NULL, NULL, NULL,
-        GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
+        GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
        {"pfactor", "f", help_pfactor,
         &gnumeric_pfactor, NULL, NULL, NULL,
-        GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
+        GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
        {"nt_omega",   "f", help_nt_omega,
         &gnumeric_nt_omega,  NULL, NULL, NULL,
         GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_EXHAUSTIVE },
@@ -693,10 +693,10 @@ const GnmFuncDescriptor num_theory_functions[] = {
         GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_EXHAUSTIVE },
        {"isprime",  "f", help_isprime,
         &gnumeric_isprime,  NULL, NULL, NULL,
-        GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
+        GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
        {"nt_pi",    "f", help_nt_pi,
         &gnumeric_nt_pi,    NULL, NULL, NULL,
-        GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_NO_TESTSUITE },
+        GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_BASIC },
        {"nt_mu",    "f", help_nt_mu,
         &gnumeric_nt_mu,    NULL, NULL, NULL,
         GNM_FUNC_SIMPLE, GNM_FUNC_IMPL_STATUS_UNIQUE_TO_GNUMERIC, GNM_FUNC_TEST_STATUS_EXHAUSTIVE },


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]