Roland Salz | 27 May 22:47 2016
Picon

(Re-)Compiling (Maxima-)Lisp files in order to use "step"

Hi,

 

According to my information, in order to be able to use “step” to single-step through Maxima’s lisp functions it is necessary that the code was compiled with the compiler optimization option “debug 3” (I’m referring to sbcl). This does not seem to be the case in the Maxima that comes with the sbcl/clisp Windows installer. Step does not work here, e.g. under emacs/slime.

 

If I use sbcl lisp outside of Maxima, I can activate step with using (declaim (optimize (debug 3))) before compiling a function. This works fine.

 

Since I cannot compile all of Maxima under windows myself, I’m trying to find a way to at least be able to use step within specific system files, e.g. commac.lisp, or files containing only certain lisp functions either redefining system functions or defining user functions or both (e.g. engineering-format.lisp). So my idea is to (re-)compile just these files with the appropriate compiler option set manually, i.e. (declaim (optimize (debug 3))). Is this possible? I cannot find in the Maxima manual commands for compiling lisp functions or files. Is it possible to use the lisp functions “compile” or “compile-file” from within Maxima in order to do this?

 

If I just load the files manually with load(..),  my understanding is that lisp source code is loaded which is then evaluated, but not compiled. Consequently, the debug 3 option placed at the beginning of such a file does not give the desired effect.

 

Note: I have used ?trace to trace Maxima’s work, and I used breaks. Nevertheless, step gives some more information and lets slow down things (for the novice’s comprehension). Moreover, my hope is that with debug 3 I can see the “source code buffer” under emacs/slime also for lisp functions running within Maxima, showing me by highlighting where I presently am in the source code.

 

Thanks in advance for any hints.

 

Best regards,

Roland

 

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Smirnov Denis | 26 May 23:54 2016
Picon

Maximalist 2014 archive

Firstly, thanks for saving list
http://def.fe.up.pt/pipermail/maxima-discuss/ Many things become more
clear after reading it.
Secondly, i want tell about some experience of integrating archives to
Thunderbird. It's done very easy
http://johnpoelstra.com/importing-mailing-list-archives-to-thunderbird/
just copying them to Mail\Local Folders in Thunderbird profile. But
2014.txt is pitfall for the email client. Thunderbird cannot index it
because magic "From" after line feed. As workaround, inserting space at
the beginning of line solves the problem. Simple diff is attached.

--- C:/Users/denis/Downloads/maximalist/2014.txt	Fri May 27 00:20:59 2016
+++ C:/Users/denis/Downloads/maximalist/2014_.txt	Fri May 27 00:14:56 2016
 <at>  <at>  -15769 +15769  <at>  <at> 
-From me too!
+ From me too!
 <at>  <at>  -116063 +116063  <at>  <at> 
-From the sys-proclaim.lisp. For all the gory details, look in
+ From the sys-proclaim.lisp. For all the gory details, look in
 <at>  <at>  -139448 +139448  <at>  <at> 
-From order zero upwards. I suspect there are equations where this
+ From order zero upwards. I suspect there are equations where this
 <at>  <at>  -162819 +162819  <at>  <at> 
-From using it and staring at source code: maybe someone else can be more
+ From using it and staring at source code: maybe someone else can be more
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Christof Köhler | 26 May 09:35 2016
Picon
Picon

Re: trigtools/trigsolve broken ?

Hello,

I tried it again. What I notice it that

(%i1) load(trigtools);
(%o1)   /usr/share/maxima/5.32.1/share/contrib/trigtools/trigtools.mac
(%i2)  eq:3*sin(x)+4*cos(x)=2;
(%o2)                       3 sin(x) + 4 cos(x) = 2
(%i3) trigsolve(eq,-%pi,%pi);
(%o3)                               {0, 2}

does not give the warning about to_poly_solve.

Loading to_poly_solve explicitely before trigtools/trigsolve appears to work

(%i1) load(to_poly_solve);
Loading maxima-grobner $Revision: 1.6 $ $Date: 2009-06-02 07:49:49 $
(%o1)   /usr/share/maxima/5.32.1/share/to_poly_solve/to_poly_solve.mac
(%i2) load(trigtools);
(%o2)   /usr/share/maxima/5.32.1/share/contrib/trigtools/trigtools.mac
(%i3) eq:3*sin(x)+4*cos(x)=2;
(%o3)                       3 sin(x) + 4 cos(x) = 2
(%i4) trigsolve(eq,-%pi,%pi);
                    2 sqrt(21)   12              2 sqrt(21)   12
(%o4)        {atan(---------- - --), %pi - atan(---------- + --)}
                        5        5                   5        5

The same in 5.38.0. Both on ubuntu 14.04.

I assume that it does not load to_poly_solve automatically is not the  
intended behaviour ?
I could not find anything hinting that to_poly_solve has to be loaded  
manually in the
documentation. Eventually trigsolve should clearly abort if loading fails ?

Best Regards

Christof

----- Nachricht von Aleksas Domarkas <aleksasd873 <at> gmail.com> ---------
   Datum: Wed, 25 May 2016 21:17:35 +0300
     Von: Aleksas Domarkas <aleksasd873 <at> gmail.com>
Betreff: Re: [Maxima-discuss] trigtools/trigsolve broken ?
      An: Christof Köhler <c.koehler <at> bccms.uni-bremen.de>

> On windows 10 with last maxima version all is ok:
>
> (%i1) load(trigtools);
> (%o1)
> "C:\maxima-5.38.1\share\maxima\5.38.1_5_gdf93b7b_dirty\share\contrib\trigtools\trigtools.mac"
> (%i2) eq:3*sin(x)+4*cos(x)=2;
> (eq)3*sin(x)+4*cos(x)=2
> (%i3) trigsolve(eq,-%pi,%pi);
> to_poly_solve: to_poly_solver.mac is obsolete; I'm loading
> to_poly_solve.mac instead.
> (%o3) {atan((2*sqrt(21))/5-12/5),%pi-atan((2*sqrt(21))/5+12/5)}
> (%i4) float(%);
> (%o4) {-0.5157783719341241,1.802780589520693}
> (%i5) wxplot2d([lhs(eq)-rhs(eq)], [x,-%pi,%pi])$
> (%t5)  (Graphics)
>
> best
>
> Aleksas D
>
> 2016-05-25 18:17 GMT+03:00 Christof Köhler <c.koehler <at> bccms.uni-bremen.de>:
>
>>
>> Hello,
>>
>> I noticed that trigsolve from the trigtools package appears to be
>> broken. While I
>> understand that contrib is not maintained I would like to bring this
>> to your attention
>> anyway.
>>
>> The trigtools documentation contrib/trigtools/trigtools-doc.pdf gives
>> an example
>> on page 9 for solving eq:3*sin(x)+4*cos(x)=2 (apparently the
>> documentation contains
>> an obvious typo there assigning a value to eq). Still, according to
>> the documentation
>> the result should be something involving atan() expressions and
>> numerical values given
>> appear to be right.
>>
>> Actually doing the computation gives
>>
>> Maxima 5.38.0 http://maxima.sourceforge.net
>> using Lisp CLISP 2.49 (2010-07-07)
>> Distributed under the GNU Public License. See the file COPYING.
>> Dedicated to the memory of William Schelter.
>> The function bug_report() provides bug reporting information.
>> (%i1) load(trigtools)$
>> (%i2) eq:3*sin(x)+4*cos(x)=2;
>> (%o2)                       3 sin(x) + 4 cos(x) = 2
>> (%i3) trigsolve(eq,-%pi,%pi);
>> (%o3)                               {0, 2}
>> (%i4)
>>
>> (%i6) build_info();
>> (%o6)
>> Maxima version: "5.38.0"
>> Maxima build date: "2016-04-06 12:07:25"
>> Host type: "x86_64-unknown-linux-gnu"
>> Lisp implementation type: "CLISP"
>> Lisp implementation version: "2.49 (2010-07-07) (built 3605577779)
>> (memory 3668926047)"
>>
>> Actually it does not work with my own 5.37.2 build and the 5.32.1 package
>> in
>> ubuntu 14.04 either.
>>
>> Maxima 5.32.1 http://maxima.sourceforge.net
>> using Lisp GNU Common Lisp (GCL) GCL 2.6.10 (a.k.a. GCL)
>> Distributed under the GNU Public License. See the file COPYING.
>> Dedicated to the memory of William Schelter.
>> The function bug_report() provides bug reporting information.
>> (%i1) load(trigtools);
>> (%o1)   /usr/share/maxima/5.32.1/share/contrib/trigtools/trigtools.mac
>> (%i2) eq:3*sin(x)+4*cos(x)=2;
>> (%o2)                       3 sin(x) + 4 cos(x) = 2
>> (%i3) trigsolve(eq,-%pi,%pi);
>> (%o3)                               {0, 2}
>>
>>
>> Or am I doing something wrong ?
>>
>> Other trigtools functions like trigfactor, c2sin, trigvalue appear to
>> work as documented.
>>
>> Best Regards
>>
>> Christof
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Mobile security can be enabling, not merely restricting. Employees who
>> bring their own devices (BYOD) to work are irked by the imposition of MDM
>> restrictions. Mobile Device Manager Plus allows you to control only the
>> apps on BYO-devices by containerizing them, leaving personal data
>> untouched!
>> https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
>> _______________________________________________
>> Maxima-discuss mailing list
>> Maxima-discuss <at> lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/maxima-discuss
>>

----- Ende der Nachricht von Aleksas Domarkas <aleksasd873 <at> gmail.com> -----

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
sholman | 25 May 23:47 2016
Picon
Picon

highest degree of n-variate polynomial? similar to derivdegree(, , )

Hi All, instead of having to keep trying ratcoef(poly,var1,n) for
n=1,2,... until a zero is returned, I was wondering if there was a
simple function to tell me the highest degree a specific variable is in
a multi-variate polynomial.

I see that derivdegree(_,_,_) is exactly what I want except it works on
derivatives.

Thank you all!

Brett

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
couraud | 25 May 23:43 2016
Picon

RE : reading lists of general expressions, was: read_matrix()

| -----Message d'origine-----
| De : Robert Dodier [mailto:robert.dodier <at> gmail.com]
| Envoyé : mercredi 25 mai 2016 01:19
| À : couraud
| Objet : Re: RE : [Maxima-discuss] reading lists of general expressions,
| was: read_matrix()
| 
| On Tue, May 24, 2016 at 2:10 PM, couraud <l.couraud <at> gmail.com> wrote:
| 
| > Does something disable to write a simple preprocessor?
| 
| I'm not sure I know what you mean. If you mean to write a program
| outside of Maxima which would process the input file and output
| something that Maxima can load more easily,

I did mean exactly that but inside Maxima not outside. But your question
suggest strongly that is not possible. I suppose there is not enough
decoupling between loading and parsing in Maxima.
I am reading a lot, right now, on software architecture. Then I become
somewhat obsessed by "decoupling", "separation of concerns"...

Best,

Laurent.

| then I believe that's not
| going to work, since it is not guaranteed that the user has sed, awk,
| perl, etc.
| 
| If you mean something else, then perhaps you can explain in more detail.
| 
| best,
| 
| Robert
| 
| PS. I would prefer it if additional correspondence on this subject
| were directed to the maxima-discuss mailing list instead of to me
| personally.

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
Christof Köhler | 25 May 17:17 2016
Picon
Picon

trigtools/trigsolve broken ?


Hello,

I noticed that trigsolve from the trigtools package appears to be  
broken. While I
understand that contrib is not maintained I would like to bring this  
to your attention
anyway.

The trigtools documentation contrib/trigtools/trigtools-doc.pdf gives  
an example
on page 9 for solving eq:3*sin(x)+4*cos(x)=2 (apparently the  
documentation contains
an obvious typo there assigning a value to eq). Still, according to  
the documentation
the result should be something involving atan() expressions and  
numerical values given
appear to be right.

Actually doing the computation gives

Maxima 5.38.0 http://maxima.sourceforge.net
using Lisp CLISP 2.49 (2010-07-07)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) load(trigtools)$
(%i2) eq:3*sin(x)+4*cos(x)=2;
(%o2)                       3 sin(x) + 4 cos(x) = 2
(%i3) trigsolve(eq,-%pi,%pi);
(%o3)                               {0, 2}
(%i4)

(%i6) build_info();
(%o6)
Maxima version: "5.38.0"
Maxima build date: "2016-04-06 12:07:25"
Host type: "x86_64-unknown-linux-gnu"
Lisp implementation type: "CLISP"
Lisp implementation version: "2.49 (2010-07-07) (built 3605577779)  
(memory 3668926047)"

Actually it does not work with my own 5.37.2 build and the 5.32.1 package in
ubuntu 14.04 either.

Maxima 5.32.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.10 (a.k.a. GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) load(trigtools);
(%o1)   /usr/share/maxima/5.32.1/share/contrib/trigtools/trigtools.mac
(%i2) eq:3*sin(x)+4*cos(x)=2;
(%o2)                       3 sin(x) + 4 cos(x) = 2
(%i3) trigsolve(eq,-%pi,%pi);
(%o3)                               {0, 2}

Or am I doing something wrong ?

Other trigtools functions like trigfactor, c2sin, trigvalue appear to  
work as documented.

Best Regards

Christof

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
Gunter Königsmann | 25 May 16:53 2016
Picon

mode_declare

Dear all,

I am convinced that I could speed up a few of my functions if I provided
them with modedeclare statements before compiling them.

For numbers I think I know how to do this:

f(n_1,n_2):=(
	modedeclare(n_1,number),
	modedeclare(n_2,fixnum),
	<the actual code>
);

I am not very confident if I interpret the difference between "fixnum",
"number" and "float" right, though:
 - Is "fixnum" a constant or a integer?
 - Can "number" be rational, float and integer?

But in the sources I cannot find an example that uses arrays and I am
not sure if I understand the documentation for arrays right: If my
function accepts one number and one array of floats is this the correct
definition?

f(n,a):=(
	modedeclare(n,number),
	mode_declare(completearray(a),float),
	<the actual code>
);

Tanks a lot,
and kind regards,

    Gunter.

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
MT | 24 May 20:52 2016
Picon

Maxima install drive

Good morning.

I would like to submit a little question for your attention. Starting 
from 5.38 version,
Maxima Windows installer does not allow to choose logical drive where 
to place files
and it goes straight to C:, assuming that active Windows OS is surely 
located on this
drive. However, I run a multiple partition system and my Windows XP 
installation is on
drive F. So, I get Maxima files misplaced.
Is there any chance to have a revised installer which can allow to 
select drive and folder,
just like it happened with versions prior to 5.38?
Thank you very much in advance for your kind concern and help.

Maurizio Testa

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
Guo, Gcwenken | 25 May 02:02 2016
Picon

how to just manipulate the integrand of an expression

Hi:


I have a very complex definite integral, after a lot of changvar and other subst, I get

e:a/b*'integrate((1-sin(x)^2)/(sin(x)*c+d),x,-%pi/2,%pi/2);


both a,b,c and d are very complex term, now the next part is use partfrac to operate the integrand. But I try


partfrac(e,sin(x))


does not work. So how to just apply partfrac to integrate?


Or maybe is there a method to extract the integrand and integral interval of e?

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Guo, Gcwenken | 24 May 23:31 2016
Picon

how to expand sin under sqrt

Hi:


(%i1) declare(x,real);
(%o1)                                done
(%i2) a:sqrt(1-sin(x))*sqrt(1+sin(x));
(%o2)                  sqrt(1 - sin(x)) sqrt(sin(x) + 1)
(%i3) assume(x<%pi/2,x>0);
                                %pi
(%o3)                          [--- > x, x > 0]
                                 2
(%i4) trigsimp(a);
(%o4)                  sqrt(1 - sin(x)) sqrt(sin(x) + 1)
(%i5) factor(a);
(%o5)                  sqrt(1 - sin(x)) sqrt(sin(x) + 1)
(%i6) expand(a);
(%o6)                  sqrt(1 - sin(x)) sqrt(sin(x) + 1)


I want to modify sqrt(1 - sin(x)) sqrt(sin(x) + 1) to sqrt((1-sin(x))*(1+sin(x))) and then I can use expand and trigsimp to do more simplification. But which command can do the first step, to modify sqrt(1 - sin(x)) sqrt(sin(x) + 1) to sqrt((1-sin(x))*(1+sin(x)))?


I try trigsimp,factor,expand, none of them work.

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Guo, Gcwenken | 24 May 21:00 2016
Picon

why sqrt not accept the assume

Hi:


The example:


(%i1) assume(d>0,e+d>0,e<0);
(%o1)                      [d > 0, e + d > 0, e < 0]
(%i2) is(e+d>d);
(%o2)                                false
(%i3) is(sqrt(e+d)>sqrt(d));
(%o3)                               unknown


Why the output is unknown? Why it is not true?. If I want the output is true, what extra information I need to tell maxima?


Because I has a very complex expression, it has a lot of term like:

asin((sqrt(e+d)-sqrt(d))/abs(sqrt(e+d)-sqrt(d)))


Why maxima not simplify the term to asin(-1) and then to %pi/2?

------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss

Gmane