[genius] Tue Mar 20 11:39:45 2012 Jiri (George) Lebl <jirka 5z com>
- From: George Lebl <jirka src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [genius] Tue Mar 20 11:39:45 2012 Jiri (George) Lebl <jirka 5z com>
- Date: Tue, 20 Mar 2012 17:45:02 +0000 (UTC)
commit 0605ee9bdba454424e38e924640e622c3fb0836f
Author: Jiri (George) Lebl <jirka 5z com>
Date: Tue Mar 20 12:44:32 2012 -0500
Tue Mar 20 11:39:45 2012 Jiri (George) Lebl <jirka 5z com>
* help/C/gel-function-list.xml, help/C/genius.xml: Add Commutative
Algebra section and document the Macaulay stuff (at least stub it).
Also add a note to the doc on ceil.
* src/graphing.c: Fix zooming using pointer for functions that take
a long time to draw by moving the zooming code into an idle
handler.
* lib/number_theory/primes.gel: update where GIMPS has gotten in
doublechecking
* po/POTFILES.in: remove glade-helper.c
ChangeLog | 15 ++++++
NEWS | 14 ++++-
configure.in | 2 +-
help/C/gel-function-list.xml | 45 +++++++++++++++++-
help/C/genius.xml | 14 +++--
help/cs/cs.po | 2 +-
help/es/es.po | 4 +-
help/fr/fr.po | 2 +-
help/genius.txt | 67 ++++++++++++++++++++++----
lib/number_theory/primes.gel | 6 +-
po/POTFILES.in | 1 -
src/calc.h | 2 +-
src/graphing.c | 108 ++++++++++++++++++++++++++----------------
13 files changed, 212 insertions(+), 70 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 862792a..8011b8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Tue Mar 20 11:39:45 2012 Jiri (George) Lebl <jirka 5z com>
+
+ * help/C/gel-function-list.xml, help/C/genius.xml: Add Commutative
+ Algebra section and document the Macaulay stuff (at least stub it).
+ Also add a note to the doc on ceil.
+
+ * src/graphing.c: Fix zooming using pointer for functions that take
+ a long time to draw by moving the zooming code into an idle
+ handler.
+
+ * lib/number_theory/primes.gel: update where GIMPS has gotten in
+ doublechecking
+
+ * po/POTFILES.in: remove glade-helper.c
+
Sun Dec 25 10:28:09 2011 Jiri (George) Lebl <jirka 5z com>
* lib/number_theory/primes.gel: update where GIMPS has gotten in
diff --git a/NEWS b/NEWS
index 1fb81fc..d573342 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,17 @@
Changes to 1.0.15
-* New functions MacaulayRep, MacaulayLowerOperator, MacaulayBound
-* FIXME: TEST AND DOCUMENT the above
-* New functions CurrentTime (DOCUMENTED)
+* New functions CurrentTime, MacaulayRep, MacaulayLowerOperator, MacaulayBound.
* Fix rational powers of negative numbers, and exact negative rational powers.
+* Fix zooming in graphs using the mouse when the functions take long to run
+* Accept log instead of ln for symbolic derivative when used with only
+ one parameter
+* Translation updates (Maria Majadas, Juan Matias Olmos, Daniel Mustieles,
+ Gustavo Jasso, Jiro Matsuawa, Marek Cernocky, Bruno Brouard, Matej Urbanic,
+ Mario Blattermann, Juan Carlos Vallejo Lopez, Christian Kirbach, Jorge
+ Gonzales, Martin Strebotnjak, Wolfgang Stoggl, Kjartan Maraas)
+
+* For some of the changes the author (Jiri) was partially supported by
+ NSF grant DMS 0900885 and the University of Wisconsin-Madison
Changes to 1.0.14
diff --git a/configure.in b/configure.in
index 9b809aa..03a9741 100644
--- a/configure.in
+++ b/configure.in
@@ -1,7 +1,7 @@
AC_INIT(src/calc.c)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(genius,1.0.14)
+AM_INIT_AUTOMAKE(genius,1.0.15)
dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS")
diff --git a/help/C/gel-function-list.xml b/help/C/gel-function-list.xml
index 6825c88..1eff94e 100644
--- a/help/C/gel-function-list.xml
+++ b/help/C/gel-function-list.xml
@@ -1108,7 +1108,21 @@ value then <function>Sign</function> returns the direction or 0.
<listitem>
<synopsis>ceil (x)</synopsis>
<para>Aliases: <function>Ceiling</function></para>
- <para>Get the lowest integer more than or equal to n.</para>
+ <para>Get the lowest integer more than or equal to <varname>n</varname>. Examples:
+ <screen><prompt>genius></prompt> <userinput>ceil(1.1)</userinput>
+= 2
+<prompt>genius></prompt> <userinput>ceil(-1.1)</userinput>
+= -1
+</screen>
+ </para>
+ <para>Note that you should be careful and notice that floating point
+ numbers are stored an binary and so may not be what you
+ expect. For example <userinput>ceil(420/4.2)</userinput>
+ returns 101 instead of the expected 100. This is because
+ 4.2 is actually very slightly less than 4.2. Use rational
+ representation <userinput>42/10</userinput> if you want
+ exact arithmetic.
+ </para>
</listitem>
</varlistentry>
@@ -5118,6 +5132,35 @@ and has period <userinput>b-a</userinput>.</para>
</variablelist>
</sect1>
+ <sect1 id="genius-gel-function-list-commutative-algebra">
+ <title>Commutative Algebra</title>
+ <variablelist>
+ <varlistentry id="gel-function-MacaulayBound">
+ <term>MacaulayBound</term>
+ <listitem>
+ <synopsis>MacaulayBound (c,d)</synopsis>
+ <para>For a Hilbert function that is c for degree d, given the Macaulay bound for the Hilbert function of degree d+1 (The c^<d> operator from Green's proof).</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="gel-function-MacaulayLowerOperator">
+ <term>MacaulayLowerOperator</term>
+ <listitem>
+ <synopsis>MacaulayLowerOperator (c,d)</synopsis>
+ <para>The c_<d> operator from Green's proof of Macaulay's Theorem.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="gel-function-MacaulayRep">
+ <term>MacaulayRep</term>
+ <listitem>
+ <synopsis>MacaulayRep (c,d)</synopsis>
+ <para>Return the dth Macaulay representation of a positive integer c.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </sect1>
+
<sect1 id="genius-gel-function-list-miscellaneous">
<title>Miscellaneous</title>
<variablelist>
diff --git a/help/C/genius.xml b/help/C/genius.xml
index dd8a861..422b8bc 100644
--- a/help/C/genius.xml
+++ b/help/C/genius.xml
@@ -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.13">
- <!ENTITY date "July 2011">
+ <!ENTITY appversion "1.0.15">
+ <!ENTITY date "March 2012">
<!ENTITY legal SYSTEM "legal.xml">
@@ -37,7 +37,7 @@
<title>&appname; Manual</title>
<copyright>
- <year>1997-2011</year>
+ <year>1997-2012</year>
<holder>Jiří (George) Lebl</holder>
</copyright>
<copyright>
@@ -65,7 +65,7 @@
<firstname>Jiří</firstname>
<surname>Lebl</surname>
<affiliation>
- <orgname>University of Illinois, Urbana-Champaign</orgname>
+ <orgname>University of Wisconsin-Madison</orgname>
<address> <email>jirka 5z com</email> </address>
</affiliation>
</author>
@@ -3117,8 +3117,10 @@ type="http">Genius Web page</ulink>.
COPYING included with the source code of this program. </para>
<para>Jiří Lebl was during various parts of the development
- partially supported for the work by NSF grant DMS 0900885 and
- the University of Illinois at Urbana-Champaign. The software has
+ partially supported for the work by NSF grant DMS 0900885,
+ the University of Illinois at Urbana-Champaign,
+ the University of California at San Diego and
+ the University of Wisconsin-Madison. The software has
been used for both teaching and research.</para>
</chapter>
diff --git a/help/cs/cs.po b/help/cs/cs.po
index 8580049..3cfa5ae 100644
--- a/help/cs/cs.po
+++ b/help/cs/cs.po
@@ -7649,7 +7649,7 @@ msgid ""
"\"><function>MillerRabinTestSure</function></link> but it may take a lot "
"longer."
msgstr ""
-"KdyÅ je vrÃceno <constant>false<constant>, mÅÅete si bÃt jisti, Åe se jednà "
+"KdyÅ je vrÃceno <constant>false</constant>, mÅÅete si bÃt jisti, Åe se jednà "
"o sloÅenà ÄÃslo. JestliÅe si potÅebujete bÃt absolutnÄ jistÃ, Åe mÃte "
"prvoÄÃslo, mÅÅete pouÅÃt funkci <link linkend=\"gel-function-"
"MillerRabinTestSure\"><function>MillerRabinTestSure</function></link>, ale "
diff --git a/help/es/es.po b/help/es/es.po
index cd129bd..b83bfb5 100644
--- a/help/es/es.po
+++ b/help/es/es.po
@@ -2712,8 +2712,8 @@ msgid ""
"the normal mathematical way, e.g.: (1<x<=y<5) is a legal boolean "
"expression and means just what it should, that is (1<x and xây and y<5)"
msgstr ""
-"Los operadores de comparaciÃn (excepto el operador <operator><=></"
-"operator> que se comporta de un modo normal), no son estrictamente "
+"Los operadores de comparaciÃn (excepto el operador <=> "
+"que se comporta de un modo normal), no son estrictamente "
"operadores binarios, de hecho pueden agruparse agruparse de una forma "
"matemÃtica estÃndar, ej.: (1<x<=y<5) es una expresiÃn booleana "
"vÃlida y significa lo que deberÃa, es decir, (1<x and xây and y<5)"
diff --git a/help/fr/fr.po b/help/fr/fr.po
index f519a33..a8e0619 100644
--- a/help/fr/fr.po
+++ b/help/fr/fr.po
@@ -13764,7 +13764,7 @@ msgstr ""
"jusqu'à dix au plus, sont les fonctions à tracer. Vous pouvez ensuite "
"rajouter quatre paramÃtres <varname>x1</varname>, <varname>x2</varname>, "
"<varname>y1</varname> et <varname>y2</varname> pour spÃcifier les limites de "
-"la fenÃtre de tracÃ.<br>Si les limites de la fenÃtre de tracà ne sont pas "
+"la fenÃtre de tracÃ. Si les limites de la fenÃtre de tracà ne sont pas "
"indiquÃes alors les limites dÃfinies par <link linkend=\"gel-function-"
"LinePlotWindow\"><function>LinePlotWindow</function></link> sont appliquÃes. "
diff --git a/help/genius.txt b/help/genius.txt
index 9406695..f756d3d 100644
--- a/help/genius.txt
+++ b/help/genius.txt
@@ -2,7 +2,7 @@ Genius Manual
JiÅÃ Lebl
- University of Illinois, Urbana-Champaign
+ University of Wisconsin-Madison
<jirka 5z com>
@@ -12,7 +12,7 @@ Kai Willadsen
<kaiw itee uq edu au>
- Copyright  1997-2011 JiÅà (George) Lebl
+ Copyright  1997-2012 JiÅà (George) Lebl
Copyright  2004 Kai Willadsen
@@ -75,7 +75,7 @@ Kai Willadsen
To report a bug or make a suggestion regarding the Genius
Mathematics Tool application or this manual, follow the
directions in the GNOME Feedback Page.
- This manual describes version 1.0.13 of Genius.
+ This manual describes version 1.0.15 of Genius.
__________________________________________________________
Table of Contents
@@ -185,6 +185,7 @@ Kai Willadsen
Statistics
Polynomials
Set Theory
+ Commutative Algebra
Miscellaneous
Symbolic Operations
Plotting
@@ -2265,6 +2266,14 @@ chdir (dir)
Changes current directory, same as the cd.
+ CurrentTime
+
+CurrentTime
+
+ Returns the current UNIX time with microsecond precision
+ as a floating point number. That is, returns the number
+ of seconds since January 1st 1970.
+
display
display (str,expr)
@@ -2898,6 +2907,19 @@ ceil (x)
Aliases: Ceiling
Get the lowest integer more than or equal to n.
+ Examples:
+
+genius> ceil(1.1)
+= 2
+genius> ceil(-1.1)
+= -1
+
+ Note that you should be careful and notice that floating
+ point numbers are stored an binary and so may not be
+ what you expect. For example ceil(420/4.2) returns 101
+ instead of the expected 100. This is because 4.2 is
+ actually very slightly less than 4.2. Use rational
+ representation 42/10 if you want exact arithmetic.
exp
@@ -5900,6 +5922,31 @@ Union (X,Y)
vectors pretending to be sets).
__________________________________________________________
+Commutative Algebra
+
+ MacaulayBound
+
+MacaulayBound (c,d)
+
+ For a Hilbert function that is c for degree d, given the
+ Macaulay bound for the Hilbert function of degree d+1
+ (The c^<d> operator from Green's proof).
+
+ MacaulayLowerOperator
+
+MacaulayLowerOperator (c,d)
+
+ The c_<d> operator from Green's proof of Macaulay's
+ Theorem.
+
+ MacaulayRep
+
+MacaulayRep (c,d)
+
+ Return the dth Macaulay representation of a positive
+ integer c.
+ __________________________________________________________
+
Miscellaneous
ASCIIToString
@@ -6320,12 +6367,13 @@ Output
Genius Mathematics Tool and then uncheck it again.
Display errors in a dialog
- If set the errors will be displayed in a seprate dialog,
- if unset the errors will be printed on the console.
+ If set the errors will be displayed in a separate
+ dialog, if unset the errors will be printed on the
+ console.
Display information messages in a dialog
If set the information messages will be displayed in a
- seprate dialog, if unset the information messages will
+ separate dialog, if unset the information messages will
be printed on the console.
Maximum errors to display
@@ -6435,6 +6483,7 @@ About Genius Mathematics Tool
program.
JiÅÃ Lebl was during various parts of the development partially
- supported for the work by NSF grant DMS 0900885 and the
- University of Illinois at Urbana-Champaign. The software has
- been used for both teaching and research.
+ supported for the work by NSF grant DMS 0900885, the University
+ of Illinois at Urbana-Champaign, the University of California
+ at San Diego and the University of Wisconsin-Madison. The
+ software has been used for both teaching and research.
diff --git a/lib/number_theory/primes.gel b/lib/number_theory/primes.gel
index 8c91ec8..58dc14b 100644
--- a/lib/number_theory/primes.gel
+++ b/lib/number_theory/primes.gel
@@ -120,10 +120,10 @@ function IsMersennePrimeExponent(p) = (
return true;
# http://www.mersenne.org / GIMPS doublechecked everything up
- # to 24,052,939 (on Dec. 25, 2011)
- if p <= 24052939 then
+ # to 24,077,267 (on Mar. 20, 2012)
+ if p <= 24077267 then
return false;
- error("IsMersennePrimeExponent: Number too large (known values up to: " + 24052939 + ")");
+ error("IsMersennePrimeExponent: Number too large (known values up to: " + 24077267 + ")");
bailout
);
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 93da2df..75d234a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -36,5 +36,4 @@ src/plugin.c
src/symbolic.c
src/testplugin.c
src/util.c
-ve/glade-helper.c
ve/ve-nongnome.c
diff --git a/src/calc.h b/src/calc.h
index 4501852..239743f 100644
--- a/src/calc.h
+++ b/src/calc.h
@@ -29,7 +29,7 @@
#include "structs.h"
-#define GENIUS_COPYRIGHT_STRING N_("Copyright (C) 1997-2011 JiÅÃ (George) Lebl, Ph.D.")
+#define GENIUS_COPYRIGHT_STRING N_("Copyright (C) 1997-2012 JiÅÃ (George) Lebl, Ph.D.")
typedef enum {
GEL_NO_ERROR = 0,
diff --git a/src/graphing.c b/src/graphing.c
index 996b991..b7c83e0 100644
--- a/src/graphing.c
+++ b/src/graphing.c
@@ -1,5 +1,5 @@
/* GENIUS Calculator
- * Copyright (C) 2003-2011 Jiri (George) Lebl
+ * Copyright (C) 2003-2012 Jiri (George) Lebl
*
* Author: Jiri (George) Lebl
*
@@ -1388,6 +1388,64 @@ plot_resetzoom_cb (void)
}
}
+static guint dozoom_idle_id = 0;
+static gdouble dozoom_xmin;
+static gdouble dozoom_ymin;
+static gdouble dozoom_xmax;
+static gdouble dozoom_ymax;
+static gboolean dozoom_just_click;
+
+static gboolean
+dozoom_idle (gpointer data)
+{
+ dozoom_idle_id = 0;
+
+ if (plot_in_progress == 0 && line_plot != NULL) {
+ double len;
+ gboolean last_info = genius_setup.info_box;
+ gboolean last_error = genius_setup.error_box;
+ genius_setup.info_box = TRUE;
+ genius_setup.error_box = TRUE;
+
+ /* just click, so zoom in */
+ if (dozoom_just_click) {
+ len = plotx2 - plotx1;
+ plotx1 += len * dozoom_xmin - len / 4.0;
+ plotx2 = plotx1 + len / 2.0;
+
+ len = ploty2 - ploty1;
+ ploty1 += len * dozoom_ymin - len / 4.0;
+ ploty2 = ploty1 + len / 2.0;
+ } else {
+ len = plotx2 - plotx1;
+ plotx1 += len * dozoom_xmin;
+ plotx2 = plotx1 + (len * (dozoom_xmax-dozoom_xmin));
+
+ len = ploty2 - ploty1;
+ ploty1 += len * dozoom_ymin;
+ ploty2 = ploty1 + (len * (dozoom_ymax-dozoom_ymin));
+ }
+
+ /* sanity */
+ if (plotx2 - plotx1 < MINPLOT)
+ plotx2 = plotx1 + MINPLOT;
+ /* sanity */
+ if (ploty2 - ploty1 < MINPLOT)
+ ploty2 = ploty1 + MINPLOT;
+
+ plot_axis ();
+
+ if (gel_interrupted)
+ gel_interrupted = FALSE;
+
+ gel_printout_infos ();
+ genius_setup.info_box = last_info;
+ genius_setup.error_box = last_error;
+ }
+
+ return FALSE;
+}
+
static void
plot_select_region (GtkPlotCanvas *canvas,
gdouble xmin,
@@ -1397,11 +1455,11 @@ plot_select_region (GtkPlotCanvas *canvas,
{
double len;
double px, py, pw, ph;
- gboolean just_click = FALSE;
+ dozoom_just_click = FALSE;
if (fabs(xmin-xmax) < 0.001 ||
fabs(ymin-ymax) < 0.001) {
- just_click = TRUE;
+ dozoom_just_click = TRUE;
}
/* FIXME: evil because this is the selection thingie,
@@ -1468,45 +1526,13 @@ plot_select_region (GtkPlotCanvas *canvas,
/* only for line plots! */
if (plot_in_progress == 0 && line_plot != NULL) {
- gboolean last_info = genius_setup.info_box;
- gboolean last_error = genius_setup.error_box;
- genius_setup.info_box = TRUE;
- genius_setup.error_box = TRUE;
-
- /* just click, so zoom in */
- if (just_click) {
- len = plotx2 - plotx1;
- plotx1 += len * xmin - len / 4.0;
- plotx2 = plotx1 + len / 2.0;
-
- len = ploty2 - ploty1;
- ploty1 += len * ymin - len / 4.0;
- ploty2 = ploty1 + len / 2.0;
- } else {
- len = plotx2 - plotx1;
- plotx1 += len * xmin;
- plotx2 = plotx1 + (len * (xmax-xmin));
-
- len = ploty2 - ploty1;
- ploty1 += len * ymin;
- ploty2 = ploty1 + (len * (ymax-ymin));
+ dozoom_xmin = xmin;
+ dozoom_xmax = xmax;
+ dozoom_ymin = ymin;
+ dozoom_ymax = ymax;
+ if (dozoom_idle_id == 0) {
+ dozoom_idle_id = g_idle_add (dozoom_idle, NULL);
}
-
- /* sanity */
- if (plotx2 - plotx1 < MINPLOT)
- plotx2 = plotx1 + MINPLOT;
- /* sanity */
- if (ploty2 - ploty1 < MINPLOT)
- ploty2 = ploty1 + MINPLOT;
-
- plot_axis ();
-
- if (gel_interrupted)
- gel_interrupted = FALSE;
-
- gel_printout_infos ();
- genius_setup.info_box = last_info;
- genius_setup.error_box = last_error;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]