You can subscribe to this list here.
2009 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
(2) |
Jun
(8) |
Jul
(4) |
Aug
|
Sep
|
Oct
(2) |
Nov
(6) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(2) |
May
(2) |
Jun
(2) |
Jul
(18) |
Aug
(13) |
Sep
(7) |
Oct
|
Nov
|
Dec
(2) |
2011 |
Jan
|
Feb
(11) |
Mar
|
Apr
(4) |
May
|
Jun
(1) |
Jul
(18) |
Aug
(16) |
Sep
(12) |
Oct
(12) |
Nov
(19) |
Dec
(42) |
2012 |
Jan
(16) |
Feb
(3) |
Mar
(8) |
Apr
(14) |
May
(30) |
Jun
(5) |
Jul
(7) |
Aug
(3) |
Sep
(10) |
Oct
(4) |
Nov
(10) |
Dec
(1) |
2013 |
Jan
(14) |
Feb
(8) |
Mar
(5) |
Apr
(3) |
May
(9) |
Jun
(19) |
Jul
|
Aug
(27) |
Sep
(5) |
Oct
(18) |
Nov
(12) |
Dec
(8) |
2014 |
Jan
(5) |
Feb
(8) |
Mar
(20) |
Apr
(22) |
May
(28) |
Jun
(9) |
Jul
(6) |
Aug
(46) |
Sep
(40) |
Oct
(15) |
Nov
(8) |
Dec
(34) |
2015 |
Jan
(20) |
Feb
(15) |
Mar
(18) |
Apr
(20) |
May
(3) |
Jun
(13) |
Jul
(10) |
Aug
(19) |
Sep
(8) |
Oct
(31) |
Nov
(26) |
Dec
(13) |
2016 |
Jan
(13) |
Feb
(4) |
Mar
(14) |
Apr
(28) |
May
(19) |
Jun
(7) |
Jul
(1) |
Aug
|
Sep
(19) |
Oct
(5) |
Nov
(4) |
Dec
(9) |
2017 |
Jan
(4) |
Feb
(30) |
Mar
|
Apr
(5) |
May
(1) |
Jun
(1) |
Jul
(3) |
Aug
(2) |
Sep
(11) |
Oct
(3) |
Nov
(1) |
Dec
(6) |
2018 |
Jan
(5) |
Feb
(12) |
Mar
(5) |
Apr
(12) |
May
(22) |
Jun
(86) |
Jul
(7) |
Aug
(5) |
Sep
(6) |
Oct
(17) |
Nov
(1) |
Dec
(3) |
2019 |
Jan
(17) |
Feb
(4) |
Mar
(2) |
Apr
(7) |
May
(1) |
Jun
(2) |
Jul
(7) |
Aug
(9) |
Sep
|
Oct
(11) |
Nov
(20) |
Dec
(24) |
2020 |
Jan
(13) |
Feb
(1) |
Mar
(9) |
Apr
(2) |
May
(6) |
Jun
(6) |
Jul
(4) |
Aug
(2) |
Sep
(4) |
Oct
(1) |
Nov
(2) |
Dec
(6) |
2021 |
Jan
(10) |
Feb
(49) |
Mar
(26) |
Apr
(2) |
May
(1) |
Jun
|
Jul
(4) |
Aug
(6) |
Sep
|
Oct
(8) |
Nov
(5) |
Dec
(11) |
2022 |
Jan
|
Feb
|
Mar
(14) |
Apr
(19) |
May
(14) |
Jun
(4) |
Jul
|
Aug
|
Sep
(6) |
Oct
(4) |
Nov
|
Dec
(1) |
2023 |
Jan
|
Feb
(4) |
Mar
(6) |
Apr
|
May
|
Jun
(6) |
Jul
|
Aug
|
Sep
(13) |
Oct
(1) |
Nov
|
Dec
(16) |
2024 |
Jan
(66) |
Feb
(13) |
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Francis W. <f.j...@li...> - 2024-03-09 11:31:06
|
REDUCE IDE version 1.12 is now available<https://reduce-algebra.sourceforge.io/reduce-ide/>. * Fix a bug in the display of the current procedure name. * Improve reduce-tagify-dir-recursively, which previously failed on the REDUCE packages directory. * Tidy up the way REDUCE IDE runs REDUCE on Microsoft Windows and retain the current working directory in CSL REDUCE. * General improvements to the way REDUCE IDE runs REDUCE that allow it to be run directly without involving a shell, which is most useful on Microsoft Windows. Please see the end of the README file<https://sourceforge.net/p/reduce-algebra/code/HEAD/tree/trunk/generic/emacs/README.md> for details. Francis |
From: Eberhard S. <esc...@ca...> - 2024-03-06 12:01:46
|
On 05.03.24 22:24, Francisco Frutos-Alfaro wrote: Are you trying to compile the latest version from sourceforge? Can you please tell us which version you are using? Eberhard > Hi > > I have following error on my computer > > > [x86_64-unknown-ubuntu22.04] CXX csl-arith01.o > In file included from > /home/frutos/Downloads/reduce-algebra-master/csl/cslbase/headers.h:230, > from > /home/frutos/Downloads/reduce-algebra-master/csl/cslbase/arith01.cpp:41: > /home/frutos/Downloads/reduce-algebra-master/csl/cslbase/version.h:56:6: > in ‘constexpr’ expansion of ‘<lambda closure > object><lambda()>{}.<lambda()>()’ > /home/frutos/Downloads/reduce-algebra-master/csl/cslbase/version.h:52:35: > error: array subscript value ‘15’ is outside the bounds of array type > ‘const char [5]’ > 52 | const char* d = &VERSION_ID[15]; > | ^ > gmake[2]: *** [Makefile:2674: csl-arith01.o] Error 1 > gmake[2]: Leaving directory > '/home/frutos/Downloads/reduce-algebra-master/cslbuild/x86_64-unknown-ubuntu22.04/csl' > gmake[1]: *** [Makefile:1440: all] Error 2 > gmake[1]: Leaving directory > '/home/frutos/Downloads/reduce-algebra-master/cslbuild/x86_64-unknown-ubuntu22.04/csl' > > Reduce build tasks finished: Highest return code 2 > make: [Makefile:34: all] Error 2 (ignored) > > > Best regards > > > Francisco > > > > _______________________________________________ > Reduce-algebra-developers mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers |
From: Francisco Frutos-A. <fru...@gm...> - 2024-03-05 21:25:08
|
Hi I have following error on my computer [x86_64-unknown-ubuntu22.04] CXX csl-arith01.o In file included from /home/frutos/Downloads/reduce-algebra-master/csl/cslbase/headers.h:230, from /home/frutos/Downloads/reduce-algebra-master/csl/cslbase/arith01.cpp:41: /home/frutos/Downloads/reduce-algebra-master/csl/cslbase/version.h:56:6: in ‘constexpr’ expansion of ‘<lambda closure object><lambda()>{}.<lambda()>()’ /home/frutos/Downloads/reduce-algebra-master/csl/cslbase/version.h:52:35: error: array subscript value ‘15’ is outside the bounds of array type ‘const char [5]’ 52 | const char* d = &VERSION_ID[15]; | ^ gmake[2]: *** [Makefile:2674: csl-arith01.o] Error 1 gmake[2]: Leaving directory '/home/frutos/Downloads/reduce-algebra-master/cslbuild/x86_64-unknown-ubuntu22.04/csl' gmake[1]: *** [Makefile:1440: all] Error 2 gmake[1]: Leaving directory '/home/frutos/Downloads/reduce-algebra-master/cslbuild/x86_64-unknown-ubuntu22.04/csl' Reduce build tasks finished: Highest return code 2 make: [Makefile:34: all] Error 2 (ignored) Best regards Francisco |
From: Prof T. R. <Pro...@pr...> - 2024-03-01 22:15:13
|
Hi all, a working solution exists. However, I did not see that "lisp tolerance" made any difference. What is working for my test program is the following adjustment to Arthur's code: change his first two lines to the following three lines share tolerance; symbolic procedure zeroSmall v; if floatp v and v <= cdr(car(car(cdr tolerance))) then 0.0 then it looks like one can change tolerance at will through the execution. The attached script is the test I used. It also shows how I gradually stripped "tolerance" of its data structures to just get down to the bare number to be used in the test. Hopefully this stripping is robust enough. Tony On 2/3/2024 1:09 am, Francis Wright wrote: > Point 1: I'm not sure, but I think negative values will always be represented as (minus positive-number) provided you are looking at a fully simplified prefix form. > > Point 2: Yes, you need to use share to transfer values between algebraic and symbolic mode. But the value of tolerance also needs to be an explicit number acceptable to the underlying Lisp, which might not be the case if you compute its value in algebraic mode. My guess is that's why your modified version of kill fails. I suggest you try looking at > > lisp tolerance; > > immediately after you compute it. > > Francis > > --------------------------------------------------------------- > > From: Prof Tony Roberts via Reduce-algebra-developers [<red...@li...>](mailto:red...@li...) > Sent: 28 February 2024 8:12 PM > To: red...@li... [<red...@li...>](mailto:red...@li...) > Subject: Re: [Reduce-algebra-developers] how to zero small coefficients in combined numeric-algebra > > Hi, > > thanks for this procedure, works so far. Two questions follow: > > On 24/2/2024 8:01 pm, Arthur Norman wrote: >> symbolic procedure kill v; >> if floatp v and v <= 1.0e-6 then 0.0 >> else if atom v then v >> else kill car v . kill cdr v; > > 1. Why do I not need "abs(v)<=" I can see in the trace that so > far negative values appears to be always stored as (minus > positive-number) so abs(v) is apparently not needed, but is that > really always the case? > > 2. In the interim I have found that my current problem really needs > the threshold to vary depending upon the overall norm of stuff that > I am dealing with, so I want to code something like > > symbolic procedure kill v; > if floatp v and v <= tolerance then 0.0 > else if atom v then v > else kill car v . kill cdr v; > ... > on rounded; > for i:=1:99 do begin > ... > tolerance:=1e-8*normStuff; > kill(v); > ... > end; > > But then kill(v) fails. I have tried declaring "share tolerance;" > but that also fails. > > Tony > > -- > --------------------------------------------------------------------- > Four books and a toolbox: > > * (2020) Linear Algebra for the 21st Century > Oxford University Press. isbn: 978-0-19-885640-5, 978-0-19-885639-9 > https://global.oup.com/academic/product/linear-algebra-for-the-21st-century-9780198856399 > > * (2015) Model emergent dynamics in complex systems > SIAM, Philadelphia. isbn: 9781611973556. > https://epubs.siam.org/doi/10.1137/1.9781611973563 > > * (2009) Elementary calculus of financial mathematics > SIAM, Philadelphia. isbn: 978-0-898716-67-2. > https://epubs.siam.org/doi/10.1137/1.9780898718225 > > * (1994) A one-dimensional introduction to continuum mechanics > World Sci. isbn: 978-981-02-1913-0. > > * (2020) with John Maclean, and J. E. Bunder; Equation-Free > function toolbox for Matlab/Octave. > http://github.com/uoa1184615/EquationFreeGit > > Emeritus Professor A.J. Roberts, FAustMS > School of Mathematical Sciences, University of Adelaide > https://profajroberts.github.io/ > mailto:Pro...@pr... > http://orcid.org/0000-0001-8930-1552 > > _______________________________________________ > Reduce-algebra-developers mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers -- --------------------------------------------------------------------- Four books and a toolbox: * (2020) Linear Algebra for the 21st Century Oxford University Press. isbn: 978-0-19-885640-5, 978-0-19-885639-9 https://global.oup.com/academic/product/linear-algebra-for-the-21st-century-9780198856399 * (2015) Model emergent dynamics in complex systems SIAM, Philadelphia. isbn: 9781611973556. https://epubs.siam.org/doi/10.1137/1.9781611973563 * (2009) Elementary calculus of financial mathematics SIAM, Philadelphia. isbn: 978-0-898716-67-2. https://epubs.siam.org/doi/10.1137/1.9780898718225 * (1994) A one-dimensional introduction to continuum mechanics World Sci. isbn: 978-981-02-1913-0. * (2020) with John Maclean, and J. E. Bunder; Equation-Free function toolbox for Matlab/Octave. http://github.com/uoa1184615/EquationFreeGit Emeritus Professor A.J. Roberts, FAustMS School of Mathematical Sciences, University of Adelaide https://profajroberts.github.io/ mailto:Pro...@pr... http://orcid.org/0000-0001-8930-1552 |
From: Francis W. <f.j...@li...> - 2024-03-01 15:11:19
|
Point 1: I'm not sure, but I think negative values will always be represented as (minus positive-number) provided you are looking at a fully simplified prefix form. Point 2: Yes, you need to use share to transfer values between algebraic and symbolic mode. But the value of tolerance also needs to be an explicit number acceptable to the underlying Lisp, which might not be the case if you compute its value in algebraic mode. My guess is that's why your modified version of kill fails. I suggest you try looking at lisp tolerance; immediately after you compute it. Francis ________________________________ From: Prof Tony Roberts via Reduce-algebra-developers <red...@li...> Sent: 28 February 2024 8:12 PM To: red...@li... <red...@li...> Subject: Re: [Reduce-algebra-developers] how to zero small coefficients in combined numeric-algebra Hi, thanks for this procedure, works so far. Two questions follow: On 24/2/2024 8:01 pm, Arthur Norman wrote: > symbolic procedure kill v; > if floatp v and v <= 1.0e-6 then 0.0 > else if atom v then v > else kill car v . kill cdr v; 1. Why do I not need "abs(v)<=" I can see in the trace that so far negative values appears to be always stored as (minus positive-number) so abs(v) is apparently not needed, but is that really always the case? 2. In the interim I have found that my current problem really needs the threshold to vary depending upon the overall norm of stuff that I am dealing with, so I want to code something like symbolic procedure kill v; if floatp v and v <= tolerance then 0.0 else if atom v then v else kill car v . kill cdr v; ... on rounded; for i:=1:99 do begin ... tolerance:=1e-8*normStuff; kill(v); ... end; But then kill(v) fails. I have tried declaring "share tolerance;" but that also fails. Tony -- --------------------------------------------------------------------- Four books and a toolbox: * (2020) Linear Algebra for the 21st Century Oxford University Press. isbn: 978-0-19-885640-5, 978-0-19-885639-9 https://global.oup.com/academic/product/linear-algebra-for-the-21st-century-9780198856399 * (2015) Model emergent dynamics in complex systems SIAM, Philadelphia. isbn: 9781611973556. https://epubs.siam.org/doi/10.1137/1.9781611973563 * (2009) Elementary calculus of financial mathematics SIAM, Philadelphia. isbn: 978-0-898716-67-2. https://epubs.siam.org/doi/10.1137/1.9780898718225 * (1994) A one-dimensional introduction to continuum mechanics World Sci. isbn: 978-981-02-1913-0. * (2020) with John Maclean, and J. E. Bunder; Equation-Free function toolbox for Matlab/Octave. http://github.com/uoa1184615/EquationFreeGit Emeritus Professor A.J. Roberts, FAustMS School of Mathematical Sciences, University of Adelaide https://profajroberts.github.io/ mailto:Pro...@pr... http://orcid.org/0000-0001-8930-1552 _______________________________________________ Reduce-algebra-developers mailing list Red...@li... https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers |
From: Prof T. R. <Pro...@pr...> - 2024-02-28 20:13:12
|
Hi, thanks for this procedure, works so far. Two questions follow: On 24/2/2024 8:01 pm, Arthur Norman wrote: > symbolic procedure kill v; > if floatp v and v <= 1.0e-6 then 0.0 > else if atom v then v > else kill car v . kill cdr v; 1. Why do I not need "abs(v)<=" I can see in the trace that so far negative values appears to be always stored as (minus positive-number) so abs(v) is apparently not needed, but is that really always the case? 2. In the interim I have found that my current problem really needs the threshold to vary depending upon the overall norm of stuff that I am dealing with, so I want to code something like symbolic procedure kill v; if floatp v and v <= tolerance then 0.0 else if atom v then v else kill car v . kill cdr v; ... on rounded; for i:=1:99 do begin ... tolerance:=1e-8*normStuff; kill(v); ... end; But then kill(v) fails. I have tried declaring "share tolerance;" but that also fails. Tony -- --------------------------------------------------------------------- Four books and a toolbox: * (2020) Linear Algebra for the 21st Century Oxford University Press. isbn: 978-0-19-885640-5, 978-0-19-885639-9 https://global.oup.com/academic/product/linear-algebra-for-the-21st-century-9780198856399 * (2015) Model emergent dynamics in complex systems SIAM, Philadelphia. isbn: 9781611973556. https://epubs.siam.org/doi/10.1137/1.9781611973563 * (2009) Elementary calculus of financial mathematics SIAM, Philadelphia. isbn: 978-0-898716-67-2. https://epubs.siam.org/doi/10.1137/1.9780898718225 * (1994) A one-dimensional introduction to continuum mechanics World Sci. isbn: 978-981-02-1913-0. * (2020) with John Maclean, and J. E. Bunder; Equation-Free function toolbox for Matlab/Octave. http://github.com/uoa1184615/EquationFreeGit Emeritus Professor A.J. Roberts, FAustMS School of Mathematical Sciences, University of Adelaide https://profajroberts.github.io/ mailto:Pro...@pr... http://orcid.org/0000-0001-8930-1552 |
From: Rainer S. <rai...@gm...> - 2024-02-28 17:19:50
|
With the latest checkin, svd should no longer hang. A comparison of the algorithm with the version in the book "Numerical recipes" showed a misplaced closing paren, causing the algorithm to run endlessly. At the same time I added an upper limit for the number of iterations. Even if the computation doesn't converge it will now stop after a while. The sparse package shows the same error. However, trying its spsvd routine on some non-square matrices uncovered other problems. I will look into these next. Best regards, Rainer On Fri, 23 Feb 2024 at 20:17 -0000, Prof Tony Roberts via Reduce-algebra-de...: > Hi, > > have run into a problem with package lin_alg (and package sparse > also has similar issues). Can anyone fix? > > Using redcsl (rev 6339) I execute the following script > > on rounded; print_precision 4$ > load linalg; > a:=mat((-2,3),(5,7)); > svda:=svd(a); > b:=a/3; svdb:=svd(b); > c:=a/2; svdc:=svd(c); > end; > > To get the two different failures for matrices b and c. > > 1: in "tmp.txt"$ > [-2 3] > a := [ ] > [5 7] > svda := { > [0.1722 - 0.9851] > [ ] > [0.9851 0.1722 ] > , > [8.713 0 ] > [ ] > [ 0 3.328] > , > [0.5257 0.8507 ] > [ ] > [0.8507 - 0.5257] > } > [ - 0.6667 1 ] > b := [ ] > [ 1.667 2.333] > ***** svd: Non-numeric matrix element at position ( 1 , 1 ) > Cont? (Y or N) > ?y > [ - 1 1.5] > c := [ ] > [2.5 3.5] > > And then redcsl just hangs, and I have to kill the process. Could > someone advise on a work around (for larger matrices). > > The package sparse also causes similar failure. > > Tony > > -- > --------------------------------------------------------------------- > Four books and a toolbox: > > * (2020) Linear Algebra for the 21st Century > Oxford University Press. isbn: 978-0-19-885640-5, 978-0-19-885639-9 > https://global.oup.com/academic/product/linear-algebra-for-the-21st-century-9780198856399 > > * (2015) Model emergent dynamics in complex systems > SIAM, Philadelphia. isbn: 9781611973556. > https://epubs.siam.org/doi/10.1137/1.9781611973563 > > * (2009) Elementary calculus of financial mathematics > SIAM, Philadelphia. isbn: 978-0-898716-67-2. > https://epubs.siam.org/doi/10.1137/1.9780898718225 > > * (1994) A one-dimensional introduction to continuum mechanics > World Sci. isbn: 978-981-02-1913-0. > > * (2020) with John Maclean, and J. E. Bunder; Equation-Free > function toolbox for Matlab/Octave. > http://github.com/uoa1184615/EquationFreeGit > > Emeritus Professor A.J. Roberts, FAustMS > School of Mathematical Sciences, University of Adelaide > https://profajroberts.github.io/ > mailto:Pro...@pr... > http://orcid.org/0000-0001-8930-1552 > > > > > _______________________________________________ > Reduce-algebra-developers mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers > > Rainer Schöpf |
From: Rainer S. <rai...@gm...> - 2024-02-27 06:34:07
|
You're right, of course. I'm sorry I overlooked that. I suspect this is caused by a numerical insatbility in the algorithm. Which means that it will take some time to understand and correct it. Rainer On Mon, 26 Feb 2024 at 22:45 +0500, Andrey Ignatenko wrote: > Hi, > > I have tried to run this on rev 6658 and find that REDUCE > hangs on the line "c:=a/2; svdc:=svd(c);" > > Andrey. > > > Rainer Schöpf via Reduce-algebra-developers wrote: > > Hi, > > > > rev 6339 is a bit old (June 2022). > > > > I do not see the problem in the current version. Can you please try the > > latest > > snapshot (rev 6658, dated 2023-12-18)? > > > > Looking at the code of the linalg package I believe it can be made more > > robust, > > but this will take some time. > > > > Rainer > > > > > > On Fri, 23 Feb 2024 at 20:17 -0000, Prof Tony Roberts via > > Reduce-algebra-de...: > > > > > Hi, > > > > > > have run into a problem with package lin_alg (and package sparse > > > also has similar issues). Can anyone fix? > > > > > > Using redcsl (rev 6339) I execute the following script > > > > > > on rounded; print_precision 4$ > > > load linalg; > > > a:=mat((-2,3),(5,7)); > > > svda:=svd(a); > > > b:=a/3; svdb:=svd(b); > > > c:=a/2; svdc:=svd(c); > > > end; > > > > > > To get the two different failures for matrices b and c. > > > > > > 1: in "tmp.txt"$ > > > [-2 3] > > > a := [ ] > > > [5 7] > > > svda := { > > > [0.1722 - 0.9851] > > > [ ] > > > [0.9851 0.1722 ] > > > , > > > [8.713 0 ] > > > [ ] > > > [ 0 3.328] > > > , > > > [0.5257 0.8507 ] > > > [ ] > > > [0.8507 - 0.5257] > > > } > > > [ - 0.6667 1 ] > > > b := [ ] > > > [ 1.667 2.333] > > > ***** svd: Non-numeric matrix element at position ( 1 , 1 ) > > > Cont? (Y or N) > > > ?y > > > [ - 1 1.5] > > > c := [ ] > > > [2.5 3.5] > > > > > > And then redcsl just hangs, and I have to kill the process. Could > > > someone advise on a work around (for larger matrices). > > > > > > The package sparse also causes similar failure. > > > > > > Tony > > > > > > -- > > > --------------------------------------------------------------------- > > > Four books and a toolbox: > > > > > > * (2020) Linear Algebra for the 21st Century > > > Oxford University Press. isbn: 978-0-19-885640-5, 978-0-19-885639-9 > > > > > https://global.oup.com/academic/product/linear-algebra-for-the-21st-century-9780198856399 > > > > > > * (2015) Model emergent dynamics in complex systems > > > SIAM, Philadelphia. isbn: 9781611973556. > > > https://epubs.siam.org/doi/10.1137/1.9781611973563 > > > > > > * (2009) Elementary calculus of financial mathematics > > > SIAM, Philadelphia. isbn: 978-0-898716-67-2. > > > https://epubs.siam.org/doi/10.1137/1.9780898718225 > > > > > > * (1994) A one-dimensional introduction to continuum mechanics > > > World Sci. isbn: 978-981-02-1913-0. > > > > > > * (2020) with John Maclean, and J. E. Bunder; Equation-Free > > > function toolbox for Matlab/Octave. > > > http://github.com/uoa1184615/EquationFreeGit > > > > > > Emeritus Professor A.J. Roberts, FAustMS > > > School of Mathematical Sciences, University of Adelaide > > > https://profajroberts.github.io/ > > > mailto:Pro...@pr... > > > http://orcid.org/0000-0001-8930-1552 > > > > > > > > > > > > > > > _______________________________________________ > > > Reduce-algebra-developers mailing list > > > Red...@li... > > > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers > > > > > > > > > > > > > > _______________________________________________ > > Reduce-algebra-developers mailing list > > Red...@li... > > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers > Rainer Schöpf |
From: Andrey I. <and...@ma...> - 2024-02-26 17:45:58
|
Hi, I have tried to run this on rev 6658 and find that REDUCE hangs on the line "c:=a/2; svdc:=svd(c);" Andrey. Rainer Schöpf via Reduce-algebra-developers wrote: > Hi, > > rev 6339 is a bit old (June 2022). > > I do not see the problem in the current version. Can you please try the latest > snapshot (rev 6658, dated 2023-12-18)? > > Looking at the code of the linalg package I believe it can be made more robust, > but this will take some time. > > Rainer > > > On Fri, 23 Feb 2024 at 20:17 -0000, Prof Tony Roberts via Reduce-algebra-de...: > > > Hi, > > > > have run into a problem with package lin_alg (and package sparse > > also has similar issues). Can anyone fix? > > > > Using redcsl (rev 6339) I execute the following script > > > > on rounded; print_precision 4$ > > load linalg; > > a:=mat((-2,3),(5,7)); > > svda:=svd(a); > > b:=a/3; svdb:=svd(b); > > c:=a/2; svdc:=svd(c); > > end; > > > > To get the two different failures for matrices b and c. > > > > 1: in "tmp.txt"$ > > [-2 3] > > a := [ ] > > [5 7] > > svda := { > > [0.1722 - 0.9851] > > [ ] > > [0.9851 0.1722 ] > > , > > [8.713 0 ] > > [ ] > > [ 0 3.328] > > , > > [0.5257 0.8507 ] > > [ ] > > [0.8507 - 0.5257] > > } > > [ - 0.6667 1 ] > > b := [ ] > > [ 1.667 2.333] > > ***** svd: Non-numeric matrix element at position ( 1 , 1 ) > > Cont? (Y or N) > > ?y > > [ - 1 1.5] > > c := [ ] > > [2.5 3.5] > > > > And then redcsl just hangs, and I have to kill the process. Could > > someone advise on a work around (for larger matrices). > > > > The package sparse also causes similar failure. > > > > Tony > > > > -- > > --------------------------------------------------------------------- > > Four books and a toolbox: > > > > * (2020) Linear Algebra for the 21st Century > > Oxford University Press. isbn: 978-0-19-885640-5, 978-0-19-885639-9 > > https://global.oup.com/academic/product/linear-algebra-for-the-21st-century-9780198856399 > > > > * (2015) Model emergent dynamics in complex systems > > SIAM, Philadelphia. isbn: 9781611973556. > > https://epubs.siam.org/doi/10.1137/1.9781611973563 > > > > * (2009) Elementary calculus of financial mathematics > > SIAM, Philadelphia. isbn: 978-0-898716-67-2. > > https://epubs.siam.org/doi/10.1137/1.9780898718225 > > > > * (1994) A one-dimensional introduction to continuum mechanics > > World Sci. isbn: 978-981-02-1913-0. > > > > * (2020) with John Maclean, and J. E. Bunder; Equation-Free > > function toolbox for Matlab/Octave. > > http://github.com/uoa1184615/EquationFreeGit > > > > Emeritus Professor A.J. Roberts, FAustMS > > School of Mathematical Sciences, University of Adelaide > > https://profajroberts.github.io/ > > mailto:Pro...@pr... > > http://orcid.org/0000-0001-8930-1552 > > > > > > > > > > _______________________________________________ > > Reduce-algebra-developers mailing list > > Red...@li... > > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers > > > > > > > > _______________________________________________ > Reduce-algebra-developers mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers |
From: Rainer S. <rai...@gm...> - 2024-02-26 16:09:20
|
Hi, rev 6339 is a bit old (June 2022). I do not see the problem in the current version. Can you please try the latest snapshot (rev 6658, dated 2023-12-18)? Looking at the code of the linalg package I believe it can be made more robust, but this will take some time. Rainer On Fri, 23 Feb 2024 at 20:17 -0000, Prof Tony Roberts via Reduce-algebra-de...: > Hi, > > have run into a problem with package lin_alg (and package sparse > also has similar issues). Can anyone fix? > > Using redcsl (rev 6339) I execute the following script > > on rounded; print_precision 4$ > load linalg; > a:=mat((-2,3),(5,7)); > svda:=svd(a); > b:=a/3; svdb:=svd(b); > c:=a/2; svdc:=svd(c); > end; > > To get the two different failures for matrices b and c. > > 1: in "tmp.txt"$ > [-2 3] > a := [ ] > [5 7] > svda := { > [0.1722 - 0.9851] > [ ] > [0.9851 0.1722 ] > , > [8.713 0 ] > [ ] > [ 0 3.328] > , > [0.5257 0.8507 ] > [ ] > [0.8507 - 0.5257] > } > [ - 0.6667 1 ] > b := [ ] > [ 1.667 2.333] > ***** svd: Non-numeric matrix element at position ( 1 , 1 ) > Cont? (Y or N) > ?y > [ - 1 1.5] > c := [ ] > [2.5 3.5] > > And then redcsl just hangs, and I have to kill the process. Could > someone advise on a work around (for larger matrices). > > The package sparse also causes similar failure. > > Tony > > -- > --------------------------------------------------------------------- > Four books and a toolbox: > > * (2020) Linear Algebra for the 21st Century > Oxford University Press. isbn: 978-0-19-885640-5, 978-0-19-885639-9 > https://global.oup.com/academic/product/linear-algebra-for-the-21st-century-9780198856399 > > * (2015) Model emergent dynamics in complex systems > SIAM, Philadelphia. isbn: 9781611973556. > https://epubs.siam.org/doi/10.1137/1.9781611973563 > > * (2009) Elementary calculus of financial mathematics > SIAM, Philadelphia. isbn: 978-0-898716-67-2. > https://epubs.siam.org/doi/10.1137/1.9780898718225 > > * (1994) A one-dimensional introduction to continuum mechanics > World Sci. isbn: 978-981-02-1913-0. > > * (2020) with John Maclean, and J. E. Bunder; Equation-Free > function toolbox for Matlab/Octave. > http://github.com/uoa1184615/EquationFreeGit > > Emeritus Professor A.J. Roberts, FAustMS > School of Mathematical Sciences, University of Adelaide > https://profajroberts.github.io/ > mailto:Pro...@pr... > http://orcid.org/0000-0001-8930-1552 > > > > > _______________________________________________ > Reduce-algebra-developers mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers > > |
From: Arthur N. <ac...@ca...> - 2024-02-24 09:47:50
|
I am not aware of anything built in that deals with that instantly. I might start with symbolic procedure killsmall v; begin prin2 "killsmall "; print v; % I will need to do things here! return v end; symbolic operator killsmall; on rounded; killsmall (a + 1.0e-4*b + 1.0e-6c + 1.0e-8*d); and there you will see that the input expression has been reduced to a "nice" prefix form. So where it says "need to do" I might next try v := kill v; with symbolic procedure kill v; if floatp v and v <= 1.0e-6 then 0.0 else if atom v then v else kill car v . kill cdr v; where then I see killsmall (a + 1.0e-4*b + 1.0e-6c + 1.0e-8*d); killsmall (plus a (times (!:rd!: . 0.0001) b) (times (!:rd!: . 1.0e-06) c) ( times (!:rd!: . 1.0e-08) d)) a + 0.0001*b and of course once you are confident you can remove the print trace statement - but I suggest you leave that in to start in case odd things happen. What I do here is maybe a bit evil generating (!:rd!: . 0.0) as an explicit zero that I hope gets tidied away later. Also if your expressions became huge the recursion in my kill function could lead to stack overflow which could probably be avoided by messier code... Arthur On Sat, 17 Feb 2024, Prof Tony Roberts via Reduce-algebra-developers wrote: > Hi all, > > I am doing a mixed numerical-algebraic problem via iteration, an > iteration that needs to stop once numerical coefficients are small. > Is there a function in reduce that will go through an expression and > set to zero all coefficients that are less than some tolerance? (I > cannot find anything in the manual.) > > For example, after some iterations I have the following expressions > and I would like to zero every coefficient of magnitude less than > 1e-6 say. So that then the pde becomes a zero vector, and the dudt > expressions simplify to just the significant terms. > > **** ITERATION 14 > pde := mat((0.0000002622*df(uu(1),x)*d - 0.00000001295*df(uu(2),x)*d), > ( - 0.0000003978*df(uu(1),x)*d + > 0.00000006401*df(uu(2),x)*d), > ( - 1.438e-14*uu(1) - 0.00000003801*df(uu(1),x)*d > - 0.00000005106*df(uu(2),x)*d), > (0.00000003801*df(uu(1),x)*d - 0.00000005106*df(uu(2),x)*d), > (0.0000003978*df(uu(1),x)*d + 0.00000006401*df(uu(2),x)*d), > ( - 1.952e-16*uu(1) - 0.0000002622*df(uu(1),x)*d > - 0.00000001295*df(uu(2),x)*d)) > normpde := 0.0000003978 > dudt(0) := 9.939e-15*uu(1) + 3.875e-15*uu(2) + 6.98e-15*df(uu(0),x)*d > - 5.402e-15*df(uu(1),x)*d + 0.6336*df(uu(2),x)*d > dudt(1) := - 0.8371*uu(1) + 3.31e-15*uu(2) + 1.45e-15*df(uu(0),x)*d > - 3.216e-14*df(uu(1),x)*d + 1.505*df(uu(2),x)*d > > Tony > |
From: Prof T. R. <Pro...@pr...> - 2024-02-23 20:18:15
|
Hi, have run into a problem with package lin_alg (and package sparse also has similar issues). Can anyone fix? Using redcsl (rev 6339) I execute the following script on rounded; print_precision 4$ load linalg; a:=mat((-2,3),(5,7)); svda:=svd(a); b:=a/3; svdb:=svd(b); c:=a/2; svdc:=svd(c); end; To get the two different failures for matrices b and c. 1: in "tmp.txt"$ [-2 3] a := [ ] [5 7] svda := { [0.1722 - 0.9851] [ ] [0.9851 0.1722 ] , [8.713 0 ] [ ] [ 0 3.328] , [0.5257 0.8507 ] [ ] [0.8507 - 0.5257] } [ - 0.6667 1 ] b := [ ] [ 1.667 2.333] ***** svd: Non-numeric matrix element at position ( 1 , 1 ) Cont? (Y or N) ?y [ - 1 1.5] c := [ ] [2.5 3.5] And then redcsl just hangs, and I have to kill the process. Could someone advise on a work around (for larger matrices). The package sparse also causes similar failure. Tony -- --------------------------------------------------------------------- Four books and a toolbox: * (2020) Linear Algebra for the 21st Century Oxford University Press. isbn: 978-0-19-885640-5, 978-0-19-885639-9 https://global.oup.com/academic/product/linear-algebra-for-the-21st-century-9780198856399 * (2015) Model emergent dynamics in complex systems SIAM, Philadelphia. isbn: 9781611973556. https://epubs.siam.org/doi/10.1137/1.9781611973563 * (2009) Elementary calculus of financial mathematics SIAM, Philadelphia. isbn: 978-0-898716-67-2. https://epubs.siam.org/doi/10.1137/1.9780898718225 * (1994) A one-dimensional introduction to continuum mechanics World Sci. isbn: 978-981-02-1913-0. * (2020) with John Maclean, and J. E. Bunder; Equation-Free function toolbox for Matlab/Octave. http://github.com/uoa1184615/EquationFreeGit Emeritus Professor A.J. Roberts, FAustMS School of Mathematical Sciences, University of Adelaide https://profajroberts.github.io/ mailto:Pro...@pr... http://orcid.org/0000-0001-8930-1552 |
From: Francis W. <f.j...@li...> - 2024-02-20 19:21:09
|
OK. I'll investigate. Thanks, Francis ________________________________ From: Andrey Ignatenko via Reduce-algebra-developers <red...@li...> Sent: 20 February 2024 3:42 PM To: red...@li... <red...@li...> Subject: Re: [Reduce-algebra-developers] REDUCE-IDE. Problems with reduce-show-proc-name minor mode Hello, When editing code like this --------------------------- procedure func(x); sin(x ;end; --------------------------- in Emacs reduce-mode (Package-Version: 1.11) with reduce-show-proc-name minor mode enabled (it is enabled by default), error messages like "Error running timer ‘reduce--show-proc-name’: (scan-error "Unbalanced parentheses" 112 129)" appear and the cursor jumps to different positions (to the end of "sin" in the above example). Similar misbehaviour occurs relative to another unbalanced constructs such as <<..>>, begin..end in procedure definitions. It is observed in Emacs 28.2 and 29.1 on Linux. Best regards, Andrey Ignatenko _______________________________________________ Reduce-algebra-developers mailing list Red...@li... https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers |
From: Andrey I. <and...@ma...> - 2024-02-20 15:43:02
|
Hello, When editing code like this --------------------------- procedure func(x); sin(x ;end; --------------------------- in Emacs reduce-mode (Package-Version: 1.11) with reduce-show-proc-name minor mode enabled (it is enabled by default), error messages like "Error running timer ‘reduce--show-proc-name’: (scan-error "Unbalanced parentheses" 112 129)" appear and the cursor jumps to different positions (to the end of "sin" in the above example). Similar misbehaviour occurs relative to another unbalanced constructs such as <<..>>, begin..end in procedure definitions. It is observed in Emacs 28.2 and 29.1 on Linux. Best regards, Andrey Ignatenko |
From: Rainer S. <rai...@gm...> - 2024-02-19 16:08:35
|
Thanks a lot for finding and reporting this error. I have just committed the correction and a test file for the regression test suite, based on your test file. Regards, Rainer On Fri, 2 Feb 2024 at 19:02 +0500, Andrey Ignatenko wrote: > Hello, > > The derivative of acoth(x) has incorrect sign. > > Reduce (CSL, rev 6657), 10-Dec-2023 ... > > 1: df(acoth(x),x); > > 1 > -------- > 2 > x - 1 > > The file "packages/alg/elem.red" defining rules for derivative of elementary > functions contains two definitions for df(acoth(x),x): > the first with incorrect sign and the second, a right one, a few lines below. > I removed the first definition (see the patch attached). > > I carried out tests by running scripts/testall.sh for both PSL and CSL > versions before and after applying the patch and did not find any differences > in the results of tests. This means that the existing test suit does not test > acoth(x) derivative. Therefore I wrote tests for derivatives of trigonometric > and hyperbolic functions and their inverses (see trig-test.red in the > attachments) which may be added to the test suit. > > Regards, > Andrey Ignatenko |
From: Prof T. R. <Pro...@pr...> - 2024-02-17 23:25:03
|
Hi all, I am doing a mixed numerical-algebraic problem via iteration, an iteration that needs to stop once numerical coefficients are small. Is there a function in reduce that will go through an expression and set to zero all coefficients that are less than some tolerance? (I cannot find anything in the manual.) For example, after some iterations I have the following expressions and I would like to zero every coefficient of magnitude less than 1e-6 say. So that then the pde becomes a zero vector, and the dudt expressions simplify to just the significant terms. **** ITERATION 14 pde := mat((0.0000002622*df(uu(1),x)*d - 0.00000001295*df(uu(2),x)*d), ( - 0.0000003978*df(uu(1),x)*d + 0.00000006401*df(uu(2),x)*d), ( - 1.438e-14*uu(1) - 0.00000003801*df(uu(1),x)*d - 0.00000005106*df(uu(2),x)*d), (0.00000003801*df(uu(1),x)*d - 0.00000005106*df(uu(2),x)*d), (0.0000003978*df(uu(1),x)*d + 0.00000006401*df(uu(2),x)*d), ( - 1.952e-16*uu(1) - 0.0000002622*df(uu(1),x)*d - 0.00000001295*df(uu(2),x)*d)) normpde := 0.0000003978 dudt(0) := 9.939e-15*uu(1) + 3.875e-15*uu(2) + 6.98e-15*df(uu(0),x)*d - 5.402e-15*df(uu(1),x)*d + 0.6336*df(uu(2),x)*d dudt(1) := - 0.8371*uu(1) + 3.31e-15*uu(2) + 1.45e-15*df(uu(0),x)*d - 3.216e-14*df(uu(1),x)*d + 1.505*df(uu(2),x)*d Tony -- --------------------------------------------------------------------- Four books and a toolbox: * (2020) Linear Algebra for the 21st Century Oxford University Press. isbn: 978-0-19-885640-5, 978-0-19-885639-9 https://global.oup.com/academic/product/linear-algebra-for-the-21st-century-9780198856399 * (2015) Model emergent dynamics in complex systems SIAM, Philadelphia. isbn: 9781611973556. https://epubs.siam.org/doi/10.1137/1.9781611973563 * (2009) Elementary calculus of financial mathematics SIAM, Philadelphia. isbn: 978-0-898716-67-2. https://epubs.siam.org/doi/10.1137/1.9780898718225 * (1994) A one-dimensional introduction to continuum mechanics World Sci. isbn: 978-981-02-1913-0. * (2020) with John Maclean, and J. E. Bunder; Equation-Free function toolbox for Matlab/Octave. http://github.com/uoa1184615/EquationFreeGit Emeritus Professor A.J. Roberts, FAustMS School of Mathematical Sciences, University of Adelaide https://profajroberts.github.io/ mailto:Pro...@pr... http://orcid.org/0000-0001-8930-1552 |
From: Francis W. <f.j...@li...> - 2024-02-10 17:42:23
|
REDUCE IDE version 1.11 is now available<https://reduce-algebra.sourceforge.io/reduce-ide/>. Probably the key update is to make CSL REDUCE interruptible on Linux, thanks to suggestions by Andrey Ignatenko. There are also quite a lot of other minor updates. Please see the end of the README file<https://sourceforge.net/p/reduce-algebra/code/HEAD/tree/trunk/generic/emacs/README.md> for details. Francis |
From: Andrey I. <and...@ma...> - 2024-02-02 14:03:06
|
Hello, The derivative of acoth(x) has incorrect sign. Reduce (CSL, rev 6657), 10-Dec-2023 ... 1: df(acoth(x),x); 1 -------- 2 x - 1 The file "packages/alg/elem.red" defining rules for derivative of elementary functions contains two definitions for df(acoth(x),x): the first with incorrect sign and the second, a right one, a few lines below. I removed the first definition (see the patch attached). I carried out tests by running scripts/testall.sh for both PSL and CSL versions before and after applying the patch and did not find any differences in the results of tests. This means that the existing test suit does not test acoth(x) derivative. Therefore I wrote tests for derivatives of trigonometric and hyperbolic functions and their inverses (see trig-test.red in the attachments) which may be added to the test suit. Regards, Andrey Ignatenko |
From: martin g. <a.m...@ic...> - 2024-01-27 17:16:11
|
Thanks a lot Tony, your comments and the example are very helpful. Your comment on the ;end; got me thinking about echo. If I turn echo off at the start and on at the end of each reduce environment, then the entire input LaTeX is processed. Then I only have “off echo;” at the start of each in the generated LaTeX file and this is easy to remove with a little post-processing. I tried using “off echo $” but this is ignored running inside IN_TEX. Then I tried removing “off echo” and instead using $ to terminate all the commands, but using $ is ignored for any command I tried. I have started looking at the source for IN_TEX, but my lisp is limited to Emacs Lisp, so I have some reading to do. Martin > On 26. Jan 2024, at 20:06, Prof Tony Roberts via Reduce-algebra-developers <red...@li...> wrote: > > Hi, > > I use in_tex extensively for a couple of decades, and indeed it was > I who encouraged AN to incorporate the command into Reduce. So let > me answer two separate issues in two separate emails. > > 1. "off echo" I have never had any trouble with it, nothing like > you describe. So cannot help there without more information. > (Although something changed with "off echo" 5-10 years ago in that > it itself now appears spuriously in some of my output when before it > did not!) > > 2. Re "\begin{reduce} and \end{reduce} " First the ";end;" that > you code also has to be within a "\begin{reduce} ;end; \end{reduce} > " in order for Reduce to execute it. That it is beyond the > \end{document} is immaterial to Reduce. > > Second, I recommend using fancyvrb package to typeset the reduce > code. In your preamble put > > \usepackage{fancyvrb} > \def\reduce{}% protect against earlier defns > \renewenvironment{reduce}% > {\Verbatim[numbers=left,firstnumber=\the\inputlineno]}% > {\endVerbatim} > > The result for your amended example latex document is attached. > > Tony > > > On 26/1/2024 10:13 pm, martin gregory via Reduce-algebra-developers > wrote: >> while trying to use IN_TEX I came across the following questions >> >> 1. using OFF ECHO causes IN_TEX to ignore everything in the input file >> following the first \end{reduce}. If I use a $ terminator for the >> IN_TEX command, only the reduce output and nothing else is >> displayed. Since I would like to be able to display only the output >> and not the commands, how can I do this? >> >> 2. IN_TEX writes \begin{reduce} and \end{reduce} to the output LaTeX >> file which causes a fatal error when compiling the LaTex (TeX Live >> 2023). If I write >> >> \newenvironment{reduce}{}{}% >> >> before the \documentclass command the compilation works. I would >> expect that there is a definition of a reduce environment but >> >> find Reduce-svn6658-src -iname '*.sty' -exec grep "newenv" {} \; >> >> returns only a definition >> >> \newenvironment{describe}[1]{\par{\bf >> #1}\begin{indented}}{\end{indented}} >> >> for the three files: >> >> doc/misc/reduce.sty >> doc/primers/reduce.sty >> doc/util/reduce.sty >> >> Searching in *.tex finds many more but no 'reduce'. Does it exist? >> >> 3. Using IN_TEX always produces a 99 error, e.g. >> >> +++ error: (99 ("End-of-file read in file" "rlfi-01-src.tex")) ( >> "End-of-file read in file" "rlfi-01-src.tex") >> >> even though I have ;end; at the end of the file. Is this expected? >> >> I have compiled revision reduce 6658 (csl) from source on Slackware >> (kernel 5.15.145). >> >> Martin Gregory >> >> Test program and LaTeX file: >> >> --------------------rlfi-01.red------------------------- >> load_package rlfi ; >> out t ; % to drop rlfi preamble >> q:=(y^2+2*y)^2/(2*a); >> on latex, lasimp ; >> out "rlfi-01.tex" ; >> in_tex "rlfi-01-src.tex" ; >> shut "rlfi-01.tex" ; >> off latex ; % after shut to avoid writing \end{document} >> ;end; >> --------------------rlfi-01-src.tex--------------------- >> \documentclass[11pt,a4paper]{article} >> \usepackage[pdftex,bookmarks,colorlinks,linkcolor=blue]{hyperref} >> \title{RLFI in file read by IN\_TEX} >> \author{Martin Gregory} >> \begin{document} >> \maketitle >> We define q as follows: >> >> \begin{reduce} >> write q ; >> \end{reduce} >> \end{document} >> ;end; >> >> >> _______________________________________________ >> Reduce-algebra-developers mailing list >> Red...@li... >> https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers > > -- > --------------------------------------------------------------------- > Four books and a toolbox: > > * (2020) Linear Algebra for the 21st Century > Oxford University Press. isbn: 978-0-19-885640-5, 978-0-19-885639-9 > https://global.oup.com/academic/product/linear-algebra-for-the-21st-century-9780198856399 > > * (2015) Model emergent dynamics in complex systems > SIAM, Philadelphia. isbn: 9781611973556. > https://epubs.siam.org/doi/10.1137/1.9781611973563 > > * (2009) Elementary calculus of financial mathematics > SIAM, Philadelphia. isbn: 978-0-898716-67-2. > https://epubs.siam.org/doi/10.1137/1.9780898718225 > > * (1994) A one-dimensional introduction to continuum mechanics > World Sci. isbn: 978-981-02-1913-0. > > * (2020) with John Maclean, and J. E. Bunder; Equation-Free > function toolbox for Matlab/Octave. > http://github.com/uoa1184615/EquationFreeGit > > Emeritus Professor A.J. Roberts, FAustMS > School of Mathematical Sciences, University of Adelaide > https://profajroberts.github.io/ > mailto:Pro...@pr... > http://orcid.org/0000-0001-8930-1552 > <mg.tex><mg.pdf>_______________________________________________ > Reduce-algebra-developers mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers |
From: Prof T. R. <Pro...@pr...> - 2024-01-26 19:46:28
|
Hi, the second issue is to include Reduce output into the LaTeX document. (I do this in my web services.) I recommend you put it all into the LaTeX document, not have two separate files as you include. For example, see the attached. You can use the highly useful LaTeX package "versions" to control how much of the reduce code is typeset. So you can create a development pdf of the document, and also a more focused readable pdf version all from the same combined latex/reduce source. Also consider whether you want line-breaks in the algebra. Tony On 26/1/2024 10:13 pm, martin gregory via Reduce-algebra-developers wrote: > while trying to use IN_TEX I came across the following questions > > 1. using OFF ECHO causes IN_TEX to ignore everything in the input file > following the first \end{reduce}. If I use a $ terminator for the > IN_TEX command, only the reduce output and nothing else is > displayed. Since I would like to be able to display only the output > and not the commands, how can I do this? > > 2. IN_TEX writes \begin{reduce} and \end{reduce} to the output LaTeX > file which causes a fatal error when compiling the LaTex (TeX Live > 2023). If I write > > \newenvironment{reduce}{}{}% > > before the \documentclass command the compilation works. I would > expect that there is a definition of a reduce environment but > > find Reduce-svn6658-src -iname '*.sty' -exec grep "newenv" {} \; > > returns only a definition > > \newenvironment{describe}[1]{\par{\bf > #1}\begin{indented}}{\end{indented}} > > for the three files: > > doc/misc/reduce.sty > doc/primers/reduce.sty > doc/util/reduce.sty > > Searching in *.tex finds many more but no 'reduce'. Does it exist? > > 3. Using IN_TEX always produces a 99 error, e.g. > > +++ error: (99 ("End-of-file read in file" "rlfi-01-src.tex")) ( > "End-of-file read in file" "rlfi-01-src.tex") > > even though I have ;end; at the end of the file. Is this expected? > > I have compiled revision reduce 6658 (csl) from source on Slackware > (kernel 5.15.145). > > Martin Gregory > > Test program and LaTeX file: > > --------------------rlfi-01.red------------------------- > load_package rlfi ; > out t ; % to drop rlfi preamble > q:=(y^2+2*y)^2/(2*a); > on latex, lasimp ; > out "rlfi-01.tex" ; > in_tex "rlfi-01-src.tex" ; > shut "rlfi-01.tex" ; > off latex ; % after shut to avoid writing \end{document} > ;end; > --------------------rlfi-01-src.tex--------------------- > \documentclass[11pt,a4paper]{article} > \usepackage[pdftex,bookmarks,colorlinks,linkcolor=blue]{hyperref} > \title{RLFI in file read by IN\_TEX} > \author{Martin Gregory} > \begin{document} > \maketitle > We define q as follows: > > \begin{reduce} > write q ; > \end{reduce} > \end{document} > ;end; > > > _______________________________________________ > Reduce-algebra-developers mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers -- --------------------------------------------------------------------- Four books and a toolbox: * (2020) Linear Algebra for the 21st Century Oxford University Press. isbn: 978-0-19-885640-5, 978-0-19-885639-9 https://global.oup.com/academic/product/linear-algebra-for-the-21st-century-9780198856399 * (2015) Model emergent dynamics in complex systems SIAM, Philadelphia. isbn: 9781611973556. https://epubs.siam.org/doi/10.1137/1.9781611973563 * (2009) Elementary calculus of financial mathematics SIAM, Philadelphia. isbn: 978-0-898716-67-2. https://epubs.siam.org/doi/10.1137/1.9780898718225 * (1994) A one-dimensional introduction to continuum mechanics World Sci. isbn: 978-981-02-1913-0. * (2020) with John Maclean, and J. E. Bunder; Equation-Free function toolbox for Matlab/Octave. http://github.com/uoa1184615/EquationFreeGit Emeritus Professor A.J. Roberts, FAustMS School of Mathematical Sciences, University of Adelaide https://profajroberts.github.io/ mailto:Pro...@pr... http://orcid.org/0000-0001-8930-1552 |
From: Prof T. R. <Pro...@pr...> - 2024-01-26 19:07:01
|
Hi, I use in_tex extensively for a couple of decades, and indeed it was I who encouraged AN to incorporate the command into Reduce. So let me answer two separate issues in two separate emails. 1. "off echo" I have never had any trouble with it, nothing like you describe. So cannot help there without more information. (Although something changed with "off echo" 5-10 years ago in that it itself now appears spuriously in some of my output when before it did not!) 2. Re "\begin{reduce} and \end{reduce} " First the ";end;" that you code also has to be within a "\begin{reduce} ;end; \end{reduce} " in order for Reduce to execute it. That it is beyond the \end{document} is immaterial to Reduce. Second, I recommend using fancyvrb package to typeset the reduce code. In your preamble put \usepackage{fancyvrb} \def\reduce{}% protect against earlier defns \renewenvironment{reduce}% {\Verbatim[numbers=left,firstnumber=\the\inputlineno]}% {\endVerbatim} The result for your amended example latex document is attached. Tony On 26/1/2024 10:13 pm, martin gregory via Reduce-algebra-developers wrote: > while trying to use IN_TEX I came across the following questions > > 1. using OFF ECHO causes IN_TEX to ignore everything in the input file > following the first \end{reduce}. If I use a $ terminator for the > IN_TEX command, only the reduce output and nothing else is > displayed. Since I would like to be able to display only the output > and not the commands, how can I do this? > > 2. IN_TEX writes \begin{reduce} and \end{reduce} to the output LaTeX > file which causes a fatal error when compiling the LaTex (TeX Live > 2023). If I write > > \newenvironment{reduce}{}{}% > > before the \documentclass command the compilation works. I would > expect that there is a definition of a reduce environment but > > find Reduce-svn6658-src -iname '*.sty' -exec grep "newenv" {} \; > > returns only a definition > > \newenvironment{describe}[1]{\par{\bf > #1}\begin{indented}}{\end{indented}} > > for the three files: > > doc/misc/reduce.sty > doc/primers/reduce.sty > doc/util/reduce.sty > > Searching in *.tex finds many more but no 'reduce'. Does it exist? > > 3. Using IN_TEX always produces a 99 error, e.g. > > +++ error: (99 ("End-of-file read in file" "rlfi-01-src.tex")) ( > "End-of-file read in file" "rlfi-01-src.tex") > > even though I have ;end; at the end of the file. Is this expected? > > I have compiled revision reduce 6658 (csl) from source on Slackware > (kernel 5.15.145). > > Martin Gregory > > Test program and LaTeX file: > > --------------------rlfi-01.red------------------------- > load_package rlfi ; > out t ; % to drop rlfi preamble > q:=(y^2+2*y)^2/(2*a); > on latex, lasimp ; > out "rlfi-01.tex" ; > in_tex "rlfi-01-src.tex" ; > shut "rlfi-01.tex" ; > off latex ; % after shut to avoid writing \end{document} > ;end; > --------------------rlfi-01-src.tex--------------------- > \documentclass[11pt,a4paper]{article} > \usepackage[pdftex,bookmarks,colorlinks,linkcolor=blue]{hyperref} > \title{RLFI in file read by IN\_TEX} > \author{Martin Gregory} > \begin{document} > \maketitle > We define q as follows: > > \begin{reduce} > write q ; > \end{reduce} > \end{document} > ;end; > > > _______________________________________________ > Reduce-algebra-developers mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers -- --------------------------------------------------------------------- Four books and a toolbox: * (2020) Linear Algebra for the 21st Century Oxford University Press. isbn: 978-0-19-885640-5, 978-0-19-885639-9 https://global.oup.com/academic/product/linear-algebra-for-the-21st-century-9780198856399 * (2015) Model emergent dynamics in complex systems SIAM, Philadelphia. isbn: 9781611973556. https://epubs.siam.org/doi/10.1137/1.9781611973563 * (2009) Elementary calculus of financial mathematics SIAM, Philadelphia. isbn: 978-0-898716-67-2. https://epubs.siam.org/doi/10.1137/1.9780898718225 * (1994) A one-dimensional introduction to continuum mechanics World Sci. isbn: 978-981-02-1913-0. * (2020) with John Maclean, and J. E. Bunder; Equation-Free function toolbox for Matlab/Octave. http://github.com/uoa1184615/EquationFreeGit Emeritus Professor A.J. Roberts, FAustMS School of Mathematical Sciences, University of Adelaide https://profajroberts.github.io/ mailto:Pro...@pr... http://orcid.org/0000-0001-8930-1552 |
From: martin g. <a.m...@ic...> - 2024-01-26 11:43:36
|
while trying to use IN_TEX I came across the following questions 1. using OFF ECHO causes IN_TEX to ignore everything in the input file following the first \end{reduce}. If I use a $ terminator for the IN_TEX command, only the reduce output and nothing else is displayed. Since I would like to be able to display only the output and not the commands, how can I do this? 2. IN_TEX writes \begin{reduce} and \end{reduce} to the output LaTeX file which causes a fatal error when compiling the LaTex (TeX Live 2023). If I write \newenvironment{reduce}{}{}% before the \documentclass command the compilation works. I would expect that there is a definition of a reduce environment but find Reduce-svn6658-src -iname '*.sty' -exec grep "newenv" {} \; returns only a definition \newenvironment{describe}[1]{\par{\bf #1}\begin{indented}}{\end{indented}} for the three files: doc/misc/reduce.sty doc/primers/reduce.sty doc/util/reduce.sty Searching in *.tex finds many more but no 'reduce'. Does it exist? 3. Using IN_TEX always produces a 99 error, e.g. +++ error: (99 ("End-of-file read in file" "rlfi-01-src.tex")) ( "End-of-file read in file" "rlfi-01-src.tex") even though I have ;end; at the end of the file. Is this expected? I have compiled revision reduce 6658 (csl) from source on Slackware (kernel 5.15.145). Martin Gregory Test program and LaTeX file: --------------------rlfi-01.red------------------------- load_package rlfi ; out t ; % to drop rlfi preamble q:=(y^2+2*y)^2/(2*a); on latex, lasimp ; out "rlfi-01.tex" ; in_tex "rlfi-01-src.tex" ; shut "rlfi-01.tex" ; off latex ; % after shut to avoid writing \end{document} ;end; --------------------rlfi-01-src.tex--------------------- \documentclass[11pt,a4paper]{article} \usepackage[pdftex,bookmarks,colorlinks,linkcolor=blue]{hyperref} \title{RLFI in file read by IN\_TEX} \author{Martin Gregory} \begin{document} \maketitle We define q as follows: \begin{reduce} write q ; \end{reduce} \end{document} ;end; |
From: martin g. <mar...@ic...> - 2024-01-25 20:14:39
|
while trying to use IN_TEX I came across the following questions 1. using OFF ECHO causes IN_TEX to ignore everything in the input file following the first \end{reduce}. If I use a $ terminator for the IN_TEX command, only the reduce output and nothing else is displayed. Since I would like to be able to display only the output and not the commands, how can I do this? 2. IN_TEX writes \begin{reduce} and \end{reduce} to the output LaTeX file which causes a fatal error when compiling the LaTex (TeX Live 2023). If I write \newenvironment{reduce}{}{}% before the \documentclass command the compilation works. I would expect that there is a definition of a reduce environment but find Reduce-svn6658-src -iname '*.sty' -exec grep "newenv" {} \; returns only a definition \newenvironment{describe}[1]{\par{\bf #1}\begin{indented}}{\end{indented}} for the three files: doc/misc/reduce.sty doc/primers/reduce.sty doc/util/reduce.sty Searching in *.tex finds many more but no 'reduce'. Does it exist? 3. Using IN_TEX always produces a 99 error, e.g. +++ error: (99 ("End-of-file read in file" "rlfi-01-src.tex")) ( "End-of-file read in file" "rlfi-01-src.tex") even though I have ;end; at the end of the file. Is this expected? I have compiled revision reduce 6658 (csl) from source on Slackware (kernel 5.15.145). Martin Gregory Test program and LaTeX file: --------------------rlfi-01.red------------------------- load_package rlfi ; out t ; % to drop rlfi preamble q:=(y^2+2*y)^2/(2*a); on latex, lasimp ; out "rlfi-01.tex" ; in_tex "rlfi-01-src.tex" ; shut "rlfi-01.tex" ; off latex ; % after shut to avoid writing \end{document} ;end; --------------------rlfi-01-src.tex--------------------- \documentclass[11pt,a4paper]{article} \usepackage[pdftex,bookmarks,colorlinks,linkcolor=blue]{hyperref} \title{RLFI in file read by IN\_TEX} \author{Martin Gregory} \begin{document} \maketitle We define q as follows: \begin{reduce} write q ; \end{reduce} \end{document} ;end; |
From: Andrey I. <and...@ma...> - 2024-01-25 16:52:50
|
Hi, Francis, First of all thank you very much for REDUCE-IDE! I'm very happy that Reduce has its own Emacs mode and interface to the interpreter. My platform is Linux. Currently I am using Debian 12 (Emacs 28.2) and GNU Guix (Emacs 29.1). Andrey. Francis Wright wrote: > Hi, Andrey > > Thanks for your email. I'll consider your suggestions for the next release of REDUCE-IDE. What platform(s) are you using? I think I added the code to remove ansi-color-process-output a very long time ago and the reason probably related to an old version of MS Windows. I can probably now remove it, as least on some platforms. > > Best wishes, > Francis > > ________________________________ > From: Andrey Ignatenko via Reduce-algebra-developers <red...@li...> > Sent: 25 January 2024 2:56 PM > To: red...@li... <red...@li...> > Subject: [Reduce-algebra-developers] SIGINT handling of CSL Reduce inside Emacs Reduce-IDE and TeXmacs interfaces > > Hello all, > > I hope the following may be of interest both to users and developers. > > 1. CSL version of Reduce, when used inside Emacs via Reduce-IDE > interface simply terminates on SIGINT (interrupt) signal generated, > e.g., by C-c C-c keystroke. Very similar behaviour is observed for CSL > Reduce in TeXmacs session when the calculation is interrupted by > pressing to the 'Stop' button. > > I find this behaviour of redcsl inside above-mentioned very useful > Reduce interfaces quite inconvenient. Below I suggest a couple of simple > hacks that allow to get rid of this for Emacs Reduce-IDE. > > 2. First of all, this behaviour is not specific to Reduce-IDE. The same > is observed when 'redcsl -w' is run inside Emacs shell (M-x shell) > buffer. Moreover, it is not specific to Emacs at all since it manifests > themselves when Reduce is run inside ordinary terminal via command 'env > TERM=dumb redcsl -w' which sets environment variable TERM to 'dumb'. > Inside Emacs shell the variable TERM is also set to 'dumb' by default. > > 3. The idea of the hack is to trick redcsl to think that it was run > inside more sophisticated terminal when a 'dumb' terminal. You can > archive this by setting 'reduce-run-commands Reduce-IDE variable to > (("CSL" . "env TERM=<termname> redcsl --nogui") ("PSL" . "redpsl")) with > <termname> replaced by one of the terminals known to your system. For > example, you can try "eterm-color", the default value of TERM variable > inside Emacs terminal (M-x term). With this modification Reduce-IDE (M-x > run-reduce) now reacts properly to C-c C-c interrupts. > > However, Reduce-IDE does not handle terminal color codes now emitted by > redcsl. There are two solution to this problem. First, one can use > <termname> corresponding to terminal that does not support color codes, > e.g. "vt100" or "vremote". Second, one can modify source code of > Reduce-IDE by commenting out the following two lines > > (remove-hook (make-local-variable 'comint-output-filter-functions) > 'ansi-color-process-output t) ; remove locally! > > in "reduce-run.el" file, thus allowing Reduce-ide to process color > codes. Above these two lines there is the following comment > > ;; ansi-color-process-output causes an error when CSL is terminated > ;; and is probably irrelevant anyway, so ... > > However, I do not observe any errors with CSL termination on Emacs 28.2. > Maybe the time has come to remove these lines from Reduce-IDE package? > > Regards, > Andrey Ignatenko > > > _______________________________________________ > Reduce-algebra-developers mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers > |
From: Francis W. <f.j...@li...> - 2024-01-25 15:57:47
|
Hi, Andrey Thanks for your email. I'll consider your suggestions for the next release of REDUCE-IDE. What platform(s) are you using? I think I added the code to remove ansi-color-process-output a very long time ago and the reason probably related to an old version of MS Windows. I can probably now remove it, as least on some platforms. Best wishes, Francis ________________________________ From: Andrey Ignatenko via Reduce-algebra-developers <red...@li...> Sent: 25 January 2024 2:56 PM To: red...@li... <red...@li...> Subject: [Reduce-algebra-developers] SIGINT handling of CSL Reduce inside Emacs Reduce-IDE and TeXmacs interfaces Hello all, I hope the following may be of interest both to users and developers. 1. CSL version of Reduce, when used inside Emacs via Reduce-IDE interface simply terminates on SIGINT (interrupt) signal generated, e.g., by C-c C-c keystroke. Very similar behaviour is observed for CSL Reduce in TeXmacs session when the calculation is interrupted by pressing to the 'Stop' button. I find this behaviour of redcsl inside above-mentioned very useful Reduce interfaces quite inconvenient. Below I suggest a couple of simple hacks that allow to get rid of this for Emacs Reduce-IDE. 2. First of all, this behaviour is not specific to Reduce-IDE. The same is observed when 'redcsl -w' is run inside Emacs shell (M-x shell) buffer. Moreover, it is not specific to Emacs at all since it manifests themselves when Reduce is run inside ordinary terminal via command 'env TERM=dumb redcsl -w' which sets environment variable TERM to 'dumb'. Inside Emacs shell the variable TERM is also set to 'dumb' by default. 3. The idea of the hack is to trick redcsl to think that it was run inside more sophisticated terminal when a 'dumb' terminal. You can archive this by setting 'reduce-run-commands Reduce-IDE variable to (("CSL" . "env TERM=<termname> redcsl --nogui") ("PSL" . "redpsl")) with <termname> replaced by one of the terminals known to your system. For example, you can try "eterm-color", the default value of TERM variable inside Emacs terminal (M-x term). With this modification Reduce-IDE (M-x run-reduce) now reacts properly to C-c C-c interrupts. However, Reduce-IDE does not handle terminal color codes now emitted by redcsl. There are two solution to this problem. First, one can use <termname> corresponding to terminal that does not support color codes, e.g. "vt100" or "vremote". Second, one can modify source code of Reduce-IDE by commenting out the following two lines (remove-hook (make-local-variable 'comint-output-filter-functions) 'ansi-color-process-output t) ; remove locally! in "reduce-run.el" file, thus allowing Reduce-ide to process color codes. Above these two lines there is the following comment ;; ansi-color-process-output causes an error when CSL is terminated ;; and is probably irrelevant anyway, so ... However, I do not observe any errors with CSL termination on Emacs 28.2. Maybe the time has come to remove these lines from Reduce-IDE package? Regards, Andrey Ignatenko _______________________________________________ Reduce-algebra-developers mailing list Red...@li... https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers |