## reduce-algebra-developers — Discussion of development, administration and support for Reduce

You can subscribe to this list here.

 2009 2010 2011 2012 2013 2014 Jan (2) Feb (5) Mar Apr May (2) Jun (8) Jul (4) Aug Sep Oct (2) Nov (6) Dec Jan (1) Feb (1) Mar (3) Apr (2) May (2) Jun (2) Jul (18) Aug (13) Sep (7) Oct Nov Dec (2) Jan Feb (11) Mar Apr (4) May Jun (1) Jul (18) Aug (16) Sep (12) Oct (12) Nov (19) Dec (42) Jan (16) Feb (3) Mar (8) Apr (14) May (30) Jun (5) Jul (7) Aug (3) Sep (10) Oct (4) Nov (10) Dec (1) Jan (14) Feb (8) Mar (5) Apr (3) May (9) Jun (19) Jul Aug (27) Sep (5) Oct (18) Nov (12) Dec (8) Jan (5) Feb (8) Mar (20) Apr (22) May (28) Jun (9) Jul (6) Aug (46) Sep (40) Oct (15) Nov (8) Dec (27)
S M T W T F S

1

2

3

4

5

6

7

8

9

10

11
(1)
12
(3)
13

14

15
(2)
16
(2)
17

18

19
(3)
20

21
(2)
22
(2)
23

24

25

26
(1)
27
(2)
28

29

30

31

Showing 18 results of 18

 Re: [Reduce-algebra-developers] Real solutions of solve From: Arthur Norman - 2011-07-27 13:40:18 ```On Wed, 27 Jul 2011, Simon Weitzhofer wrote: > Hi there, > > is it possible to get only the real solutions of an equation from solve? (Such > that solve(x^4=1,x) returns only {x=1, x=-1}) > > Thank you, > Simon > You may wish to investigate realroots(x^2 + 1) {} realroots(x^2 - 1) {x = -1 , x = 1} for cases where you KNOW that you will be getting numeric roots...? In terms of an objection to "i", I note that at present the simplification of sqrt reads symbolic procedure simpsqrt u; if u=0 then nil ./ 1 else if null !*keepsqrts then simpexpt1(car u, simpexpon '(quotient 1 2), nil) else begin scalar x,y; x := xsimp car u; return if null numr x then nil ./ 1 else if denr x=1 and domainp numr x and !:minusp numr x then if numr x=-1 then simp 'i else multsq(simp 'i, simpsqrt list prepd !:minus numr x) else if y := domainvalchk('sqrt,list x) then y else simprad(x,2) end; so "sqrt(-1)" is turned into "i" at a fairly low level. Arthur ```
 [Reduce-algebra-developers] Real solutions of solve From: Simon Weitzhofer - 2011-07-27 12:46:54 ```Hi there, is it possible to get only the real solutions of an equation from solve? (Such that solve(x^4=1,x) returns only {x=1, x=-1}) Thank you, Simon ```
 [Reduce-algebra-developers] Arithmetic on Infinity From: Simon Weitzhofer - 2011-07-26 09:33:58 ```Hi there, as described in the manual reduce has no proper arithmetic on infinity, e.g. infinity + infinity gives 2*infinity. Is there any workaround known for this problem? Thank you, Simon ```
 Re: [Reduce-algebra-developers] Rounding odd when pri off From: Ted Kosan - 2011-07-22 21:39:29 ```Rainer wrote: >> (:rd: . 1.2) is the internal representation of the rounded number 1.2. The >> expression is expanded correctly, but printed incorrectly, ie. it is a bug in >> the part of the printer that is exercised when the switch pri is off. > > I have a preliminary correction for this; it isn't really tested right now, but > apparently solves your problem.  Redefine the procedure xprint as > > symbolic procedure xprint(u,flg); >   % U is a standard term. >   % Flg is a flag which is true if a term has preceded this term. >   % Procedure prints the term and returns NIL. >   begin scalar v,w; >      v := tc u; >      u := tpow u; >      if (w := kernlp v) and w neq 1 >        then <               if minusf w >                 then <>>>; >      if flg then oprin 'plus; >      if w and w neq 1 >        then <>; >      xprinp u; >      if v neq 1 then <> >   end; > > by adding this code to your input. > > I will test this further before committing the update. Thank you very much for coming up with a solution to this problem. Ted ```
 [Reduce-algebra-developers] MacOSX Lion From: Arthur Norman - 2011-07-22 09:47:36 ```To survive this update you may wish to (a) update everything from subversion (a.1) I tend to go "svn -R revert ." and then "scripts/stamp.sh" to be really certain files are all in sync with the server and timestamps are in the expected order. (b) rm trunk/csl/wxWidgets (c) mv cslbuild old-cslbuild [or delete it if you are SURE you do not have valuable stuff there] (d) ./configure --with-csl [other options] If you want to try the wxWidgets experiment then at present you MUST go ./configure --with-csl --with-wx --without-lionSDK where the last option causes the build to use the 10.6 version of the SDK because incompatible changes in the 10.7 version cause pain. The new setup will ONLY use the 10.6 or 10.7 SDKs and it sets DEPLOYMENT_TARGET=10.6 so those who remain pre-Snow-Leopard may want to check out older revisions or hack the files for themselves. The builds also now ONLY target x86_64 and so i686 and ppc users also need to go back to earlier revisions or hack. Doing this simplifies things somewhat so I hoep not too many people will be inconvenienced - please scream if you are! Since I have only had Lion for under 24 hours there may be more problems so let me know please... Arthur ```
 [Reduce-algebra-developers] Integrator corrections From: Rainer Schöpf - 2011-07-21 22:01:34 ```Hi everybody, I've just checked in two patches to the integrator (files driver.red and isolve.red) that are supposed to solve some problems in conjunction with algint. algint uses the fluid intvar to store the integration variable, but the standard integrator didn't always update this when it performs a substitution before calling algint. (I would appreciate if someone would look over these patches.) In particular, this improves the result for the integral of 1/(sqrt(d-x)*sqrt(c-x)*sqrt(b-x)*sqrt(a-x)*(a*b-a*x-b*x+x**2)); as reported in http://sourceforge.net/tracker/?func=detail&aid=2507063&group_id=248416&atid=1126256 Note: run it with "on ezgcd", otherwise it takes at least 10 times as long to compute. You still get the "Zero divisor" error messages, though. Another example that went very wrong is load_package algint; on ezgcd; on algint; on factor; kk := 1/(sqrt((a-x)*(b-x)*(x-1)*x)); ll:=kk/(x*(a*b*x - a*b - a*x**2 + a*x - b*x**2 + b*x + x**3 - x**2)); sauvetasoeur:=int(ll,x); verif:=df(sauvetasoeur,x)-ll; This one gives the correct result only when precise is off, and the final result with precise on suggests to me that there is a problem with a sign of a sqrt term. Rainer ```
 Re: [Reduce-algebra-developers] Rounding odd when pri off From: Rainer Schöpf - 2011-07-21 16:21:30 ```Hello Simon, concerning the problem you reported two days ago: > The goal is to expand the term 1.2*x*(x+1). The expected result is 1.2*x^2+1.2*x. > With switch pri set to on the result is 1.2*x*(x + 1), with switch pri off the result is (:rd: . 1.2)*x^2 + (:rd: . 1.2)*x. > (rounded is set to on and roundall, numval to off). I checked in a correction and confirmed that a freshly built Java version of REDUCE does no longer exhibit the problem. Rainer ```
 Re: [Reduce-algebra-developers] Rounding odd when pri off From: Tony Hearn - 2011-07-19 16:50:26 ```> (To other developers: given that the value of variable w can be an arbitrary > domain element, shouldn't the comparisons of w to 1 better be done by > calling !:onep on it?) Sounds reasonable to me. __________________________________________________________________________ This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ```
 Re: [Reduce-algebra-developers] Rounding odd when pri off From: Rainer Schöpf - 2011-07-19 14:29:07 ```On Tue, 19 Jul 2011 at 14:47 +0200, Simon Weitzhofer wrote: > my name is Simon Weitzhofer and I'm working on the GeoGebra project > (www.geogebra.org), a educational mathematic software. We are going to use > the java version of reduce for the next version of GeoGebra and now I ran > into a problem with expanding an expression. > > The goal is to expand the term 1.2*x*(x+1). The expected result is > 1.2*x^2+1.2*x. With switch pri set to on the result is 1.2*x*(x + 1), with > switch pri off the result is (:rd: . 1.2)*x^2 + (:rd: . 1.2)*x. (rounded is > set to on and roundall, numval to off). > Any idea how to get rid of the :rd: thing or another way to expand this > expression? (:rd: . 1.2) is the internal representation of the rounded number 1.2. The expression is expanded correctly, but printed incorrectly, ie. it is a bug in the part of the printer that is exercised when the switch pri is off. I have a preliminary correction for this; it isn't really tested right now, but apparently solves your problem. Redefine the procedure xprint as symbolic procedure xprint(u,flg); % U is a standard term. % Flg is a flag which is true if a term has preceded this term. % Procedure prints the term and returns NIL. begin scalar v,w; v := tc u; u := tpow u; if (w := kernlp v) and w neq 1 then <>>>; if flg then oprin 'plus; if w and w neq 1 then <>; xprinp u; if v neq 1 then <> end; by adding this code to your input. I will test this further before committing the update. (To other developers: given that the value of variable w can be an arbitrary domain element, shouldn't the comparisons of w to 1 better be done by calling !:onep on it?) Regards, Rainer ```
 [Reduce-algebra-developers] Rounding odd when pri off From: Simon Weitzhofer - 2011-07-19 13:09:33 ```Hello, my name is Simon Weitzhofer and I'm working on the GeoGebra project (www.geogebra.org), a educational mathematic software. We are going to use the java version of reduce for the next version of GeoGebra and now I ran into a problem with expanding an expression. The goal is to expand the term 1.2*x*(x+1). The expected result is 1.2*x^2+1.2*x. With switch pri set to on the result is 1.2*x*(x + 1), with switch pri off the result is (:rd: . 1.2)*x^2 + (:rd: . 1.2)*x. (rounded is set to on and roundall, numval to off). Any idea how to get rid of the :rd: thing or another way to expand this expression? Thank you, Simon ```
 Re: [Reduce-algebra-developers] Turing off automatic simplification. From: Rainer Schöpf - 2011-07-16 19:54:48 ```On Fri, 15 Jul 2011 at 14:18 -0400, Ted Kosan wrote: > This past May I submitted the following question to the Reduce forum > which was about turning off automatic simplification: > > http://sourceforge.net/projects/reduce-algebra/forums/forum/899364/topic/4499010 > > The revalp code that Tony submitted provides a partial solution, but a > full solution would allow functions like NUM, DEN, and SUB to be used > on the expression so that it can be analysed and manipulated. At one > point I thought that I could add this feature myself, but I found that > I will have to study Rlisp further before I have the skills needed to > do it properly. Actually, you have to understand how the simplification process works (basically what the functions in packages/alg/reval.red do). The problem here is that things that look similar in function may be quite different. NUM/DEN are good examples: the argument of these operators is fully simplified before the actual numerator or denominator is taken. Which is to say right now that they will not work in "no-simp" (ie. OFF REVALP) mode. The same goes for SUB: substitution happens by simplifying and converting the expression into a standard quotient and descending into the constituents of this standard representation, performing the substitutions on the way. This is necessary to perform more complicated substitutions, like replacements for products of several terms. Consider a product like a*b*c in which you want to replace a*c by something else. Clearly this substitution must happen even if if there are many factors between a and c. On the other hand, PART and friends work on an expression "as it is", ie. without simplifying their arguments. So, accessing parts of an expression is possible even without simplification. I believe it would be possible to implement these "syntactical" access functions to work in no-simp mode. Variants of NUM/DEN could then be defined in terms of these functions: procedure NUM2 u; if ARGLENGTH u = -1 then u % number of symbol else if not (part(u,0)=quotient) then u % toplevel operator is not quotient else part(u,1); procedure DEN2 u; if ARGLENGTH u = -1 then u else if not (part(u,0)=quotient) then u else part(u,2); One could add definitions like these for many of the standard operators, to be used in no-simp mode, instead of the standard ones. This may be the easiest solution. > I am asking for this capability on behalf of the GeoGebra project > (http://GeoGebra.org) because they are in the process of adopting the > Java version of Reduce as the CAS computation engine for GeoGebra. By > the way, GeoGebra has millions of users worldwide and its level of > adoption continues to increase. They are very excited about the idea > of using the commercial-quality Reduce CAS as the computation engine > for GeoGebra and their plan is to ship Reduce with the new GeoGebra > 4.0 in August. > > I have asked Simon Weitzhofer, who is a GeoGebra developer, to join > this email list so that he can provide more information on the > no-simplification feature that they need for GeoGebra. That would be very helpful. > I am hoping > that this feature can be added to Reduce without too much difficulty. Well, first of all we need to understand what is actually needed. Thanks, Rainer ```
 Re: [Reduce-algebra-developers] Multiplying lists and a predicate function for lists From: Ted Kosan - 2011-07-16 16:10:31 ```Rainer wrote: > More generally, one should have various boolean operators for testing type, at > least for those types that can be declared, like matrix, vector, etc. Here is a list of most of MathPiper's boolean operators just for reference: IsAmicablePair, IsAtom, IsBoolean, IsBound, IsCarmichaelNumber, IsComposite, IsConstant, IsCoprime, IsDecimal, IsDiagonal, IsEquation, IsEven, IsEvenFunction, IsFreeOf, IsFunction, IsGaussianInteger, IsGaussianPrime, IsGaussianUnit, IsGreaterThan, IsHermitian, IsIdempotent, IsInfinity, IsInfix, IsInteger, IsIrregularPrime, IsLessThan, IsList, IsListOfLists, IsLowerTriangular, IsMatrix, IsMonomial, IsNegativeInteger, IsNegativeNumber, IsNegativeReal, IsNonObject, IsNonZeroInteger, IsNotZero, IsNumber, IsNumericList, IsOdd, IsOddFunction, IsOrthogonal, IsPositiveInteger, IsPositiveNumber, IsPositiveReal, IsPostfix, IsPrefix, IsPrime, IsPrimePower, IsQuadraticResidue, IsRational, IsScalar, IsSkewSymmetric, IsSmallPrime, IsSquareFree, IsSquareMatrix, IsString, IsSumOfTerms, IsSymmetric, IsTwinPrime, IsUnitary, IsUpperTriangular, IsVector, IsZero, IsZeroVector. Ted ```
 Re: [Reduce-algebra-developers] Multiplying lists and a predicate function for lists From: Rainer Schöpf - 2011-07-15 19:51:28 ```On Tue, 12 Jul 2011 at 18:13 +0100, Arthur Norman wrote: > On Tue, 12 Jul 2011, Ted Kosan wrote: > > > Is it possible to multiply all of the members in a list by a value in > > a manner which is similar to this example from MathPiper?: > > > > In> 3 * {a,b,c} > > Result: {3*a,3*b,3*c} > > > > > > 1: a := {x,y,z}; > > a := {x,y,z} > > 2: for each p in a collect 3*p; > > {3*x,3*y,3*z} > > 3: > > One could imagine trying to find where the "Illegal operatio on lists" is > produced and turn > V op {A,B,C} > into > {V op A, V op B, V op C} > and similarly if the list and item were the other way around. With care so > that > {a,b}*{c,d} > gave > {{a,b)*c, {a,b}*d} > and hence > {{a*c, b*c}, {a*d, b*d}} > if that would be the right way round... It is trickier than that. Try this: 1: a:={x,y,z}; a := {x,y,z} 2: 3*a+3; ***** Illegal operation on lists 3: 3+3*a; ***** a invalid as scalar The problem here that the expression analysis (in getrtype) is incomplete, so that the expression 3*a+3 is recognized as one containing a list, but 3+3*a is not. (More precisely, for addition and subtraction, the first operand determines the type, where as for products and quotients, it looks through all the operands until it finds a nontrivial type. I'm at a loss to explain why this is the case.) > > Also, is there a predicate function like NUMBERP that determines if an > > expression is a list and that can be used in algebraic mode? The > > IsList function is used in MathPiper for this and here is an example > > of it being used for reference: > > > > In> IsList(a) > > Result: False > > > > In> IsList(4) > > Result: False > > > > In> IsList(2*a) > > Result: False > > > > In> IsList({a,b,c}) > > Result: True > > > > Looking at packages/rlisp/list.red to see how "first" etc are implemeted > for lists providing a listp function should be easy... This can be done with the arglength and part operators. part(x,0) returns the toplevel operator of expression x. One needs to guard against atomic expressions, so that algebraic procedure islist l; arglength l > -1 and part(l,0)=list; is a suitable definition. (Note that the name listp cannot be used; there exists a symbolic procedure of the same name already.) > Also that file would be where one hacked in support for other operations > over lists... I might feel the need to think for a bit about whether > anything could be broken by installing those things but they may be > safe... you can look at list.red and see what you thing! More generally, one should have various boolean operators for testing type, at least for those types than can be declared, like matrix, vector, etc. Rainer ```
 [Reduce-algebra-developers] Turing off automatic simplification. From: Ted Kosan - 2011-07-15 18:18:18 ```This past May I submitted the following question to the Reduce forum which was about turning off automatic simplification: http://sourceforge.net/projects/reduce-algebra/forums/forum/899364/topic/4499010 The revalp code that Tony submitted provides a partial solution, but a full solution would allow functions like NUM, DEN, and SUB to be used on the expression so that it can be analysed and manipulated. At one point I thought that I could add this feature myself, but I found that I will have to study Rlisp further before I have the skills needed to do it properly. I am asking for this capability on behalf of the GeoGebra project (http://GeoGebra.org) because they are in the process of adopting the Java version of Reduce as the CAS computation engine for GeoGebra. By the way, GeoGebra has millions of users worldwide and its level of adoption continues to increase. They are very excited about the idea of using the commercial-quality Reduce CAS as the computation engine for GeoGebra and their plan is to ship Reduce with the new GeoGebra 4.0 in August. I have asked Simon Weitzhofer, who is a GeoGebra developer, to join this email list so that he can provide more information on the no-simplification feature that they need for GeoGebra. I am hoping that this feature can be added to Reduce without too much difficulty. Thanks, Ted ```
 Re: [Reduce-algebra-developers] Running reduce on remote machines From: Martin Gregory - 2011-07-12 20:31:24 ```Dear Raffaele, probably a naive suggestion, but why not try using at or cron? I tried putting a call to a trivial program in a shell script, bottles.sh (don't forget to make it executable): #!/bin/bash # bottles.sh cd ~/reduce reduce bottles.red and submitting with at: \$ at -m now at> ~/reduce/bottles.sh at> C-d job 4 at Tue Jul 12 22:24:00 2011 and it created ~/reduce/bottles.out without any problems. With at or cron there is no need to remain logged in and if you set up mail forwarding on the server the -m option to at will tell when the job completed. Kind regards, Martin Gregory ```
 Re: [Reduce-algebra-developers] Multiplying lists and a predicate function for lists From: Arthur Norman - 2011-07-12 17:13:59 ``` On Tue, 12 Jul 2011, Ted Kosan wrote: > Is it possible to multiply all of the members in a list by a value in > a manner which is similar to this example from MathPiper?: > > In> 3 * {a,b,c} > Result: {3*a,3*b,3*c} > > 1: a := {x,y,z}; a := {x,y,z} 2: for each p in a collect 3*p; {3*x,3*y,3*z} 3: One could imagine trying to find where the "Illegal operatio on lists" is produced and turn V op {A,B,C} into {V op A, V op B, V op C} and similarly if the list and item were the other way around. With care so that {a,b}*{c,d} gave {{a,b)*c, {a,b}*d} and hence {{a*c, b*c}, {a*d, b*d}} if that would be the right way round... > > Also, is there a predicate function like NUMBERP that determines if an > expression is a list and that can be used in algebraic mode? The > IsList function is used in MathPiper for this and here is an example > of it being used for reference: > > In> IsList(a) > Result: False > > In> IsList(4) > Result: False > > In> IsList(2*a) > Result: False > > In> IsList({a,b,c}) > Result: True > Looking at packages/rlisp/list.red to see how "first" etc are implemeted for lists providing a listp function should be easy... Also that file would be where one hacked in support for other operations over lists... I might feel the need to think for a bit about whether anything could be broken by installing those things but they may be safe... you can look at list.red and see what you thing! Arthur ```
 [Reduce-algebra-developers] Multiplying lists and a predicate function for lists From: Ted Kosan - 2011-07-12 16:53:50 ```Is it possible to multiply all of the members in a list by a value in a manner which is similar to this example from MathPiper?: In> 3 * {a,b,c} Result: {3*a,3*b,3*c} Also, is there a predicate function like NUMBERP that determines if an expression is a list and that can be used in algebraic mode? The IsList function is used in MathPiper for this and here is an example of it being used for reference: In> IsList(a) Result: False In> IsList(4) Result: False In> IsList(2*a) Result: False In> IsList({a,b,c}) Result: True Thanks, Ted ```
 Re: [Reduce-algebra-developers] Running reduce on remote machines From: Raffaele Vitolo - 2011-07-11 16:01:31 ```Dear All, so far I sent a message about problems running reduce in background on a remote server. The problem was: as soon as I logged out, 'something' shut down my reduce process. My administrator solved the problem: it was the following weird daemon: http://manpages.ubuntu.com/manpages/hardy/man8/runsvdir.8.html who shut down all my background processes when I logged off. After removing this software everything went smoothly. A friend of mine, Alik Verbovetsky, also suggested a new way to run reduce in the background which might be of independent interest: we start emacs as a daemon on the remote machine with the command \$ emacs --daemon then we start emacs as a client in the ssh terminal with the command \$ emacsclient -t the client connects to the emacs server, we can start reduce from within emacs using reduce IDE or just a shell. Then after closing the client with C-x C-c the server, with the reduce process inside, keeps everything running up to the next reconnection. This is very good for all those who develop reduce within emacs (like me). Best wishes, raf. > On Tue, 19 Apr 2011, Raffaele Vitolo wrote: >> Dear All, >> >> I'm developing reduce software for computations in the geometry of >> differential equations. The computations are quite heavy, so after >> 'easy' >> cases I would like to run the software on a server. This means log in >> into >> a server via ssh, launch the computation, logout, and then login the day >> after and see the results. >> >> But here I have the following problems: >> 1 - using `nohup reduce -w infile -- outfile &' does not work because (I >> guess) reduce refuses to go in background. As I try to run a computation >> in background the job stops. > > I just tried that on OpenSuSE and reduce seemed to run in the background > for me OK... I can try again with Ubuntu, but it is not clear to me why > that should differ. Hmm have just had a bash with Ubuntu 10.10/64 and when > I log in again I see Reduce running in the background. The output to the > log file does not get flushed until a buffer fills so I do not see output > very early. So with nohup I might try > nohup ./reduce -w input.red > ans look at nohup.out for the results. > > So we may need to interacft more to see just what is happening for you. I > am using a today's build from subversion, but it is not clear that I have > changed anything that would obviously interact recently. > But I will be budt with Easter-like things for the rest of this week, so > if you can find me better leads next week I may try some more. > > >> 2 - using gnu screen does not work because after I logout and login >> again >> the screen sessions holding reduce computations are `dead' (in screen >> terminology). screen keeps reduce working only if I do not close the ssh >> connection. >> > I have never investigated gnu screen, so can not instantly help - you may > be more of an expert than me. > >> The above problems happen both with latest binaries and with 20101007 >> binaries from Sourceforge, my local and remote systems are Ubuntu 64bit. >> > Hmmm ugh. > >> The only thing that works is vnc; for the moment it is a good solution. >> I suspect that the above two problems have the same origin, but I have >> no >> clues... of course I can use vnc forever but it would be nice to know >> what >> is going wrong. >> >> Thank you very much and best wishes, >> >> raf. > > I am glad that vnc lets you survive. Calculations that last that long > leave me jolly nervouse re bugs and glitches! If you can either help me > re-create the oddity or find a clue as to what is bad I will try to fix... > maybe! > > Arthur > > -- Raffaele Vitolo, Dipartimento di Matematica 'E. De Giorgi' Universita' del Salento, via per Arnesano 73100 Lecce ITALY tel.: +39 0832 297425 (office) fax.: +39 0832 297594 home page: http://poincare.unile.it/vitolo Messaggio automatico istituzionale del sistema non eliminabile e che non interpreta necessariamente la volonta' del mittente: Il futuro della Ricerca Scientifica ha bisogno del tuo aiuto. Dona il 5 x mille all'Universita' del Salento - Codice Fiscale: 80008870752 ```

Showing 18 results of 18