Commit 1a28573c authored by Jiri (George) Lebl's avatar Jiri (George) Lebl

relase 1.0.11 and other minor tidbits

Thu Sep 09 22:47:54 2010  Jiri (George) Lebl <jirka@5z.com>

	* Release 1.0.11

	* src/gnome-genius.desktop.in: add %U to command line

	* help/C/genius.xml: some minor updates and clarifications
parent ad02ea6e
Thu Sep 09 22:47:54 2010 Jiri (George) Lebl <jirka@5z.com>
* Release 1.0.11
* src/gnome-genius.desktop.in: add %U to command line
* help/C/genius.xml: some minor updates and clarifications
Thu Sep 09 21:29:33 2010 Jiri (George) Lebl <jirka@5z.com>
* src/genius.c, src/calc.h, src/gnome-genius.c: In a fit of
......
Changes to 1.0.11
* Build fix for some versions of ncurses (Stephan Hegel)
* Minor documentation updates
Changes to 1.0.10
* Allow changing variable names for all plotting functions
......
AC_INIT(src/calc.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(genius,1.0.10)
AM_INIT_AUTOMAKE(genius,1.0.11)
dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
......
......@@ -69,7 +69,7 @@
application or this manual, follow the directions in the GNOME Feedback
Page.
This manual describes version 1.0.10 of Genius.
This manual describes version 1.0.11 of Genius.
----------------------------------------------------------------------
......@@ -909,10 +909,9 @@ Using Functions
function b(x) = x*x;
f(b,2)
If you want to pass a function that doesn't exist yet, you can use an
anonymous function (see the Section called Defining Functions).
Syntax:
To pass functions which are not defined, you can use an anonymous function
(see the Section called Defining Functions). That is, you want to pass a
function without giving it a name. Syntax:
function(<comma separated arguments>) = <function body>
`(<comma separated arguments>) = <function body>
......@@ -922,6 +921,8 @@ Using Functions
function f(a,b) = a(b)+1;
f(`(x) = x*x,2)
This will return 5.
----------------------------------------------------------------------
Operations on Functions
......@@ -931,22 +932,25 @@ Using Functions
exp(sin*cos+4)
will return a function that does
will return a function that takes x and returns exp(sin(x)*cos(x)+4). It
is functionally equivalent to typing
exp(sin(x)*cos(x)+4)
`(x) = exp(sin(x)*cos(x)+4)
This can be useful when quickly defining functions. For example to create
a function to perform the above operation, you can just type:
This operation can be useful when quickly defining functions. For example
to create a function called f to perform the above operation, you can just
type:
f = exp(sin*cos+4)
This can also be used in plotting. For example, to plot sin squared you
can enter:
It can also be used in plotting. For example, to plot sin squared you can
enter:
LinePlot(sin^2)
Warning Not all functions can be used in this way. In addition, when you
use a binary operation the functions must take the same arguments.
Warning Not all functions can be used in this way. For example, when you
use a binary operation the functions must take the same number of
arguments.
----------------------------------------------------------------------
......@@ -989,12 +993,17 @@ Separator
Modular Evaluation
Sometimes when working with large numbers, it might be faster if results
are modded after each calculation. To use it you just add "mod <integer>"
after the expression. Example:
Genius implements modular arithmetic. To use it you just add "mod
<integer>" after the expression. Example:
2^(5!) * 3^(6!) mod 5
It could be possible to do modular arithmetic by computing with integers
and then modding in the end with the % operator, but that may be time
consuming if not impossible when working with larger numbers. For example
10^(10^10) % 6 will simply not work (the exponent will be too large),
while 10^(10^10) mod 6 is instanteneous.
You can calculate the inverses of numbers mod some integer by just using
rational numbers (of course the inverse has to exist). Examples:
......@@ -1026,8 +1035,9 @@ Modular Evaluation
List of GEL Operators
As everything in gel is really just an expression, it is really just all
connected together with operators. Here is a list of the operators in GEL.
Everything in gel is really just an expression. Expressions are stringed
together with different operators. As we have seen, even the separator is
simply a binary operator in GEL. Here is a list of the operators in GEL.
a;b
......@@ -1105,7 +1115,7 @@ List of GEL Operators
a.%b
Element by element the mod operator. Returns the remainder after
element by element a./b.
element by element integer a./b.
a mod b
......@@ -1311,9 +1321,11 @@ Loops
do <expression2> while <expression1>
do <expression2> until <expression1>
These are similar to other languages, however they return the result of
the last iteration or NULL if no iteration was done. In the boolean
expression, = is translated into == just as for the if statement.
These are similar to other languages. However, as in gel it is simply an
expression that must have some return value, these constructs will simply
return the result of the last iteration or NULL if no iteration was done.
In the boolean expression, = is translated into == just as for the if
statement.
----------------------------------------------------------------------
......@@ -1344,8 +1356,9 @@ Loops
for <identifier> in <matrix> do <body>
For each element, going row by row from left to right do the body. To
print numbers 1,2,3 and 4 in this order you could do:
For each element in the matrix, going row by row from left to right we
execute the body with the identifier set to the current element. To print
numbers 1,2,3 and 4 in this order you could do:
for n in [1,2:3,4] do print(n)
......
......@@ -3,8 +3,8 @@
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY app "<application>Genius Mathematics Tool</application>">
<!ENTITY appname "Genius">
<!ENTITY appversion "1.0.10">
<!ENTITY date "August 2010">
<!ENTITY appversion "1.0.11">
<!ENTITY date "September 2010">
<!ENTITY legal SYSTEM "legal.xml">
......@@ -998,10 +998,10 @@ Example:
function b(x) = x*x;
f(b,2)
</programlisting>
If you want to pass a function that doesn&rsquo;t exist yet, you can use an anonymous function (see <xref linkend="genius-gel-functions-defining" />).
</para>
<para>
To pass functions which are not defined,
you can use an anonymous function (see <xref linkend="genius-gel-functions-defining" />). That is, you want to pass a function without giving it a name.
Syntax:
<programlisting><![CDATA[function(<comma separated arguments>) = <function body>
`(<comma separated arguments>) = <function body>
......@@ -1010,6 +1010,7 @@ Example:
<programlisting>function f(a,b) = a(b)+1;
f(`(x) = x*x,2)
</programlisting>
This will return 5.
</para>
</sect2>
......@@ -1020,20 +1021,23 @@ f(`(x) = x*x,2)
Some functions allow arithmetic operations, and some single argument functions such as <function>exp</function> or <function>ln</function>, to operate on the function. For example,
<programlisting>exp(sin*cos+4)
</programlisting>
will return a function that does
<programlisting>exp(sin(x)*cos(x)+4)
will return a function that takes <varname>x</varname> and returns <userinput>exp(sin(x)*cos(x)+4)</userinput>. It is functionally equivalent
to typing
<programlisting>`(x) = exp(sin(x)*cos(x)+4)
</programlisting>
This can be useful when quickly defining functions. For example to create a function to perform the above operation, you can just type:
This operation can be useful when quickly defining functions. For example to create a function called <varname>f</varname>
to perform the above operation, you can just type:
<programlisting>f = exp(sin*cos+4)
</programlisting>
This can also be used in plotting. For example, to plot sin squared you can enter:
It can also be used in plotting. For example, to plot sin squared you can enter:
<programlisting>LinePlot(sin^2)
</programlisting>
</para>
<warning>
<para>
Not all functions can be used in this way. In addition, when you use a binary operation the functions must take the same arguments.
Not all functions can be used in this way. For example, when you use a binary operation the functions must take the same number of arguments.
</para>
</warning>
</sect2>
......@@ -1085,10 +1089,18 @@ the code if it is executed too often as there is one more operator involved.
<sect1 id="genius-gel-modular-evaluation">
<title>Modular Evaluation</title>
<para>
Sometimes when working with large numbers, it might be faster if results are
modded after each calculation. To use it you just add "mod &lt;integer&gt;" after
&appname; implements modular arithmetic.
To use it you just add "mod &lt;integer&gt;" after
the expression. Example:
<programlisting>2^(5!) * 3^(6!) mod 5</programlisting>
It could be possible to do modular arithmetic by computing with integers and then modding in the end with
the <literal>%</literal> operator, but
that may be time consuming if not impossible when working with larger numbers.
For example <userinput>10^(10^10) % 6</userinput> will simply not work (the exponent
will be too large), while
<userinput>10^(10^10) mod 6</userinput> is instanteneous.
</para>
<para>
You can calculate the inverses of numbers mod some integer by just using
rational numbers (of course the inverse has to exist).
Examples:
......@@ -1123,9 +1135,9 @@ genius> 2*2 mod 7
<title>List of GEL Operators</title>
<para>
As everything in gel is really just an expression, it is really just
all connected together with operators. Here is a list of the
operators in GEL.
Everything in gel is really just an expression. Expressions are stringed together with
different operators. As we have seen, even the separator is simply a binary operator
in GEL. Here is a list of the operators in GEL.
</para>
<variablelist>
......@@ -1311,7 +1323,7 @@ different from <literal>=</literal> because it never gets translated to a
<listitem>
<para>
Element by element the mod operator. Returns the remainder
after element by element <userinput>a./b</userinput>.
after element by element integer <userinput>a./b</userinput>.
</para>
</listitem>
</varlistentry>
......@@ -1706,7 +1718,8 @@ until <expression1> do <expression2>
do <expression2> while <expression1>
do <expression2> until <expression1>]]></programlisting>
These are similar to other languages, however they return the result of the last iteration or <literal>NULL</literal> if no iteration was done. In the boolean expression, <literal>=</literal> is translated into <literal>==</literal> just as for the <literal>if</literal> statement.
These are similar to other languages. However, as in gel it is simply an expression that must have some return value, these
constructs will simply return the result of the last iteration or <literal>NULL</literal> if no iteration was done. In the boolean expression, <literal>=</literal> is translated into <literal>==</literal> just as for the <literal>if</literal> statement.
</para>
</sect2>
......@@ -1729,7 +1742,8 @@ Loop with identifier being set to all values from <literal>&lt;from&gt;</literal
Syntax:
<programlisting><![CDATA[for <identifier> in <matrix> do <body>]]></programlisting>
For each element, going row by row from left to right do the body. To
For each element in the matrix, going row by row from left to right we execute the body
with the identifier set to the current element. To
print numbers 1,2,3 and 4 in this order you could do:
<programlisting>for n in [1,2:3,4] do print(n)
</programlisting>
......
......@@ -4,16 +4,18 @@ if [ ! -d /home/jirka/ ]; then
exit
fi
echo rm -f *.html *.pdf
rm -f *.html *.pdf
echo rm -f *.html *.pdf *.ps
rm -f *.html *.pdf *.ps
echo SP_ENCODING=\"utf-8\" docbook2html genius.xml
SP_ENCODING="utf-8" docbook2html genius.xml
echo docbook2ps genius.xml
docbook2ps genius.xml
echo ps2pdf genius.ps genius.pdf
ps2pdf genius.ps genius.pdf
echo docbook2pdf genius.xml
docbook2pdf genius.xml
#echo docbook2ps genius.xml
#docbook2ps genius.xml
#echo ps2pdf genius.ps genius.pdf
#ps2pdf genius.ps genius.pdf
echo scp *.html zinc.5z.com:/home/www/html/jirka/genius-documentation/
scp *.html zinc.5z.com:/home/www/html/jirka/genius-documentation/
......
[Desktop Entry]
Encoding=UTF-8
Type=Application
Exec=gnome-genius
Exec=gnome-genius %U
Icon=gnome-genius
Terminal=false
Categories=GNOME;Science;Math;Education;Calculator;Utility;
......
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