Commit c09bc96b authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

remove IsGaussianInteger, we already have IsGaussInteger alias


Tue Oct 23 11:33:56 2007  Jiri (George) Lebl <jirka@5z.com>

	* lib/functions/numerical.gel: remove IsGaussianInteger, we already
	  have IsGaussInteger alias IsComplexInteger

	* help/C/gel-function-list.xml: updates and fixes


svn path=/trunk/; revision=574
parent 81dca6c8
Tue Oct 23 11:33:56 2007 Jiri (George) Lebl <jirka@5z.com>
* lib/functions/numerical.gel: remove IsGaussianInteger, we already
have IsGaussInteger alias IsComplexInteger
* help/C/gel-function-list.xml: updates and fixes
Tue Oct 23 10:51:24 2007 Jiri (George) Lebl <jirka@5z.com> Tue Oct 23 10:51:24 2007 Jiri (George) Lebl <jirka@5z.com>
* src/gnome-genius.c: better logic for figuring out something is a * src/gnome-genius.c: better logic for figuring out something is a
......
...@@ -685,7 +685,7 @@ avoid them being accidentally overridden.</para> ...@@ -685,7 +685,7 @@ avoid them being accidentally overridden.</para>
<ulink url="http://planetmath.org/encyclopedia/AbsoluteValue.html">Planetmath (absolute value)</ulink>, <ulink url="http://planetmath.org/encyclopedia/AbsoluteValue.html">Planetmath (absolute value)</ulink>,
<ulink url="http://planetmath.org/encyclopedia/ModulusOfComplexNumber.html">Planetmath (modulus)</ulink>, <ulink url="http://planetmath.org/encyclopedia/ModulusOfComplexNumber.html">Planetmath (modulus)</ulink>,
<ulink url="http://mathworld.wolfram.com/AbsoluteValue.html">Mathworld (absolute value)</ulink> or <ulink url="http://mathworld.wolfram.com/AbsoluteValue.html">Mathworld (absolute value)</ulink> or
<ulink url="http://mathworld.wolfram.com/AbsoluteValue.html">Mathworld (complex modulus)</ulink> <ulink url="http://mathworld.wolfram.com/ComplexModulus.html">Mathworld (complex modulus)</ulink>
for more information. for more information.
</para> </para>
</listitem> </listitem>
...@@ -774,14 +774,6 @@ for more information. ...@@ -774,14 +774,6 @@ for more information.
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id="gel-function-IsGaussianInteger">
<term>IsGaussianInteger</term>
<listitem>
<synopsis>IsGaussianInteger (z)</synopsis>
<para>Check if argument is a gaussian integer.</para>
</listitem>
</varlistentry>
<varlistentry id="gel-function-IsInteger"> <varlistentry id="gel-function-IsInteger">
<term>IsInteger</term> <term>IsInteger</term>
<listitem> <listitem>
...@@ -3354,7 +3346,28 @@ function of two arguments or it can be a matrix giving a sesquilinear form. ...@@ -3354,7 +3346,28 @@ function of two arguments or it can be a matrix giving a sesquilinear form.
<term>Multinomial</term> <term>Multinomial</term>
<listitem> <listitem>
<synopsis>Multinomial (v,arg...)</synopsis> <synopsis>Multinomial (v,arg...)</synopsis>
<para>Calculate multinomial coefficients.</para> <para>Calculate multinomial coefficients. Takes a vector of
<varname>k</varname>
nonnegative integers and computes the multinomial coefficient.
This corresponds to the coefficient in the homogeneous polynomial
in <varname>k</varname> variables with the corresponding powers.
</para>
<para>
The formula for <userinput>Multinomial(a,b,c)</userinput>
can be written as:
<programlisting>(a+b+c)! / (a!b!c!)
</programlisting>
In other words, if we would have only two elements, then
<userinput>Multinomial(a,b)</userinput> is the same thing as
<userinput>Binomial(a+b,a)</userinput> or
<userinput>Binomial(a+b,b)</userinput>.
</para>
<para>
See
<ulink url="http://planetmath.org/encyclopedia/MultinomialTheorem.html">Planetmath</ulink>,
<ulink url="http://mathworld.wolfram.com/MultinomialCoefficient.html">Mathworld</ulink>, or
<ulink url="http://en.wikipedia.org/wiki/Multinomial_theorem">Wikipedia</ulink> for more information.
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -3403,7 +3416,12 @@ do ( ...@@ -3403,7 +3416,12 @@ do (
<term>Permutations</term> <term>Permutations</term>
<listitem> <listitem>
<synopsis>Permutations (k,n)</synopsis> <synopsis>Permutations (k,n)</synopsis>
<para>Get all permutations of k numbers from 1 to n as a vector of vectors.</para> <para>Get all permutations of <varname>k</varname> numbers from 1 to <varname>n</varname> as a vector of vectors.</para>
<para>
See
<ulink url="http://mathworld.wolfram.com/Permutation.html">Mathworld</ulink> or
<ulink url="http://en.wikipedia.org/wiki/Permutation">Wikipedia</ulink> for more information.
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -3486,7 +3504,13 @@ do ( ...@@ -3486,7 +3504,13 @@ do (
<term>nPr</term> <term>nPr</term>
<listitem> <listitem>
<synopsis>nPr (n,r)</synopsis> <synopsis>nPr (n,r)</synopsis>
<para>Calculate permutations.</para> <para>Calculate the number of permutations of size
<varname>r</varname>of numbers from 1 to <varname>n</varname>.</para>
<para>
See
<ulink url="http://mathworld.wolfram.com/Permutation.html">Mathworld</ulink> or
<ulink url="http://en.wikipedia.org/wiki/Permutation">Wikipedia</ulink> for more information.
</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -4366,7 +4390,7 @@ do ( ...@@ -4366,7 +4390,7 @@ do (
<listitem> <listitem>
<synopsis>SymbolicDerivativeTry (f)</synopsis> <synopsis>SymbolicDerivativeTry (f)</synopsis>
<para>Attempt to symbolically differentiate the function f, where f is a function of one variable, returns null if unsuccessful but is silent. <para>Attempt to symbolically differentiate the function f, where f is a function of one variable, returns null if unsuccessful but is silent.
(See <link linkend="gel-function-SymbolicDerivative">SymbolicDerivative</link>) (See <link linkend="gel-function-SymbolicDerivative"><function>SymbolicDerivative</function></link>)
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -4376,7 +4400,7 @@ do ( ...@@ -4376,7 +4400,7 @@ do (
<listitem> <listitem>
<synopsis>SymbolicNthDerivative (f,n)</synopsis> <synopsis>SymbolicNthDerivative (f,n)</synopsis>
<para>Attempt to symbolically differentiate a function n times. <para>Attempt to symbolically differentiate a function n times.
(See <link linkend="gel-function-SymbolicDerivative">SymbolicDerivative</link>) (See <link linkend="gel-function-SymbolicDerivative"><function>SymbolicDerivative</function></link>)
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -4386,7 +4410,7 @@ do ( ...@@ -4386,7 +4410,7 @@ do (
<listitem> <listitem>
<synopsis>SymbolicNthDerivativeTry (f,n)</synopsis> <synopsis>SymbolicNthDerivativeTry (f,n)</synopsis>
<para>Attempt to symbolically differentiate a function n times quietly and return null on failure <para>Attempt to symbolically differentiate a function n times quietly and return null on failure
(See <link linkend="gel-function-SymbolicNthDerivative">SymbolicNthDerivative</link>) (See <link linkend="gel-function-SymbolicNthDerivative"><function>SymbolicNthDerivative</function></link>)
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -4396,7 +4420,7 @@ do ( ...@@ -4396,7 +4420,7 @@ do (
<listitem> <listitem>
<synopsis>SymbolicTaylorApproximationFunction (f,x0,n)</synopsis> <synopsis>SymbolicTaylorApproximationFunction (f,x0,n)</synopsis>
<para>Attempt to construct the taylor approximation function around x0 to the nth degree. <para>Attempt to construct the taylor approximation function around x0 to the nth degree.
(See <link linkend="gel-function-SymbolicDerivative">SymbolicDerivative</link>) (See <link linkend="gel-function-SymbolicDerivative"><function>SymbolicDerivative</function></link>)
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -4418,7 +4442,7 @@ do ( ...@@ -4418,7 +4442,7 @@ do (
<varname>x1</varname>, <varname>x2</varname>, <varname>x1</varname>, <varname>x2</varname>,
<varname>y1</varname>, <varname>y2</varname>. If limits are not <varname>y1</varname>, <varname>y2</varname>. If limits are not
specified, then the currently set limits apply specified, then the currently set limits apply
(See <link linkend="gel-function-LinePlotWindow">LinePlotWindow</link>) (See <link linkend="gel-function-LinePlotWindow"><function>LinePlotWindow</function></link>)
</para> </para>
<para> <para>
Examples: Examples:
...@@ -4475,8 +4499,8 @@ do ( ...@@ -4475,8 +4499,8 @@ do (
<synopsis>LinePlotParametric (xfunc,yfunc,t1,t2,tinc,x1,x2,y1,y2)</synopsis> <synopsis>LinePlotParametric (xfunc,yfunc,t1,t2,tinc,x1,x2,y1,y2)</synopsis>
<para> <para>
Plot a parametric function with a line. First come the functions Plot a parametric function with a line. First come the functions
for x and y then optionally the t limits as t1,t2,tinc, then optionally the for <varname>x</varname> and <varname>y</varname> then optionally the <varname>t</varname> limits as <userinput>t1,t2,tinc</userinput>, then optionally the
limits as x1,x2,y1,y2. limits as <userinput>x1,x2,y1,y2</userinput>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -4489,8 +4513,9 @@ limits as x1,x2,y1,y2. ...@@ -4489,8 +4513,9 @@ limits as x1,x2,y1,y2.
<synopsis>LinePlotCParametric (func,t1,t2,tinc,x1,x2,y1,y2)</synopsis> <synopsis>LinePlotCParametric (func,t1,t2,tinc,x1,x2,y1,y2)</synopsis>
<para> <para>
Plot a parametric complex valued function with a line. First comes Plot a parametric complex valued function with a line. First comes
the function that returns x+iy then optionally the t limits as t1,t2,tinc, then the function that returns <computeroutput>x+iy</computeroutput>,
optionally the limits as x1,x2,y1,y2. then optionally the <varname>t</varname> limits as <userinput>t1,t2,tinc</userinput>, then
optionally the limits as <userinput>x1,x2,y1,y2</userinput>.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -4505,7 +4530,7 @@ optionally the limits as x1,x2,y1,y2. ...@@ -4505,7 +4530,7 @@ optionally the limits as x1,x2,y1,y2.
<varname>y1</varname>, <varname>y2</varname>, <varname>y1</varname>, <varname>y2</varname>,
<varname>z1</varname>, <varname>z2</varname>. If limits are not <varname>z1</varname>, <varname>z2</varname>. If limits are not
specified, then the currently set limits apply specified, then the currently set limits apply
(See <link linkend="gel-function-SurfacePlotWindow">SurfacePlotWindow</link>). (See <link linkend="gel-function-SurfacePlotWindow"><function>SurfacePlotWindow</function></link>).
Genius can only plot a single surface function at this time. Genius can only plot a single surface function at this time.
</para> </para>
<para> <para>
......
...@@ -2256,12 +2256,6 @@ ...@@ -2256,12 +2256,6 @@
Check if argument is a possibly complex integer. Check if argument is a possibly complex integer.
IsGaussianInteger
IsGaussianInteger (z)
Check if argument is a gaussian integer.
IsInteger IsInteger
IsInteger (num) IsInteger (num)
...@@ -4148,7 +4142,20 @@ ...@@ -4148,7 +4142,20 @@
Multinomial (v,arg...) Multinomial (v,arg...)
Calculate multinomial coefficients. Calculate multinomial coefficients. Takes a vector of k
nonnegative integers and computes the multinomial coefficient.
This corresponds to the coefficient in the homogeneous polynomial
in k variables with the corresponding powers.
The formula for Multinomial(a,b,c) can be written as:
(a+b+c)! / (a!b!c!)
In other words, if we would have only two elements, then
Multinomial(a,b) is the same thing as Binomial(a+b,a) or
Binomial(a+b,b).
See Planetmath, Mathworld, or Wikipedia for more information.
NextCombination NextCombination
...@@ -4192,6 +4199,8 @@ ...@@ -4192,6 +4199,8 @@
Get all permutations of k numbers from 1 to n as a vector of Get all permutations of k numbers from 1 to n as a vector of
vectors. vectors.
See Mathworld or Wikipedia for more information.
RisingFactorial RisingFactorial
RisingFactorial (n,k) RisingFactorial (n,k)
...@@ -4251,7 +4260,10 @@ ...@@ -4251,7 +4260,10 @@
nPr (n,r) nPr (n,r)
Calculate permutations. Calculate the number of permutations of size rof numbers from 1 to
n.
See Mathworld or Wikipedia for more information.
---------------------------------------------------------------------- ----------------------------------------------------------------------
...@@ -5001,7 +5013,7 @@ ...@@ -5001,7 +5013,7 @@
LinePlotCParametric (func,t1,t2,tinc,x1,x2,y1,y2) LinePlotCParametric (func,t1,t2,tinc,x1,x2,y1,y2)
Plot a parametric complex valued function with a line. First Plot a parametric complex valued function with a line. First
comes the function that returns x+iy then optionally the t limits comes the function that returns x+iy, then optionally the t limits
as t1,t2,tinc, then optionally the limits as x1,x2,y1,y2. as t1,t2,tinc, then optionally the limits as x1,x2,y1,y2.
SurfacePlot SurfacePlot
......
...@@ -57,14 +57,6 @@ function Chop(x) = ...@@ -57,14 +57,6 @@ function Chop(x) =
) )
protect ("Chop") protect ("Chop")
#-----
# A complex number is a gaussian integer iff
# its real and complex parts are integers
SetHelp ("IsGaussianInteger", "numeric", "Check if argument is a gaussian integer")
function IsGaussianInteger(z) = ( IsInteger(Re(z)) and IsInteger(Im(z)) )
protect ("IsGaussianInteger")
#----- #-----
# Mod (built-in) # Mod (built-in)
# FIXME: Mod with offset (m mod n offset d = something in [d,d+n-1]) # FIXME: Mod with offset (m mod n offset d = something in [d,d+n-1])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment