Volker van Nek | 1 May 2010 12:50

Re: Problem with algsys and realonly -& gt; false solution from solve_rat_ineq.

Leo, 

thanks for working on this. I believe that generally it is very helpful
when someone else than the creator of a piece of software is writing the
tests. 

Volker

Am Freitag, den 30.04.2010, 22:36 +0100 schrieb Leo Butler:
>  
> Volker, I've added  a few additional tests to rtest8 to prevent
> this particular regression, but it would be good to add a few more.
> 
> I've also added tests to the share testsuite for solve_rat_ineq.
> 
> Leo
> 
Robert Dodier | 1 May 2010 19:40
Picon

Re: reformatting source file

On 4/30/10, John Lapeyre <john.lapeyre <at> gmail.com> wrote:

> The mathematica translator writes unformatted Maxima
> code. Does someone have an idea about how to reformat
> a file of Maxima code? Something like using grind on
> the whole file ? stringout("fname",functions),
> stringout("fname",values). But the ordering in
> the original file is not respected.

Given that this is part of an automatic program generator,
sounds like you really want to avoid evaluating or simplifying
the expressions in the file, therefore you should avoid load
and batch.

The functions to only read or write Maxima expressions are
not exposed at the Maxima user level, but they are not too
deeply hidden. MREAD reads an expression and MGRIND
grinds it. I;ve appended a program to call those functions.
Enclose grind_file in with_stdout to capture output to another file.
Here is a sample session.

(%i1) load ("/maxima-programs/grind_file.lisp");
(%o1)                  /maxima-programs/grind_file.lisp
(%i2) grind_file ("./tmp1.mac");
true$
false$
12345$
"blurf"$
f("x",y/x+1)$
g(x):=?foobar(x,y,z)$
(Continue reading)

Robert Dodier | 1 May 2010 20:03
Picon

Re: maxima programming questions

On 4/30/10, Camm Maguire <camm <at> maguirefamily.org> wrote:

> load(powers);
> (%o1)         /usr/share/maxima/5.21.1/share/contrib/powers.lisp
> (%i2) powers(g^2,g);
> (%o2)                                 [2]
> (%i3) declare(g,constant);
> (%o3)                                done
> (%i4) powers(g^2,g);
>
> The second argument of "$powers" must be a symbol, instead found g

Well, powers wants g to be a variable; that is supposed to exclude
%pi etc. Here g is declared constant. Should powers be happy with
that? I dunno.

> (%i179) ssubst("\\left[","",ss);
>
> ssubst: improper arguments.

Did you mean ssubst("", "\\left[", ss) instead?
The error message is uninformative but that's a separate problem.

> Have some tex/latex suggestions if anyone at all is interested.  The
> existing code won't compile under amslatex, considered the modern
> standard.

I would like to hear about that. If you are interested to follow up,
please start a separate thread about it.

(Continue reading)

Dieter Kaiser | 1 May 2010 20:19
Picon

scalarp and nonscalarp

We have the open bug report ID: 2306402 - scalarp bug.

The documentation of scalarp says that an expression is assumed to be
scalar if the expression is composed only out of numbers, constants, or
variables declared to be scalar. Furthermore, the implementation of
scalarp is in a way that functions, which have only scalar arguments are
assumed to have a scalar value too.

Because of these assumptions we get the following results e.g. for the
build-in functions sin and gamma_incomplete:

(%i1) declare(x,scalar, a,nonscalar)$

(%i2) scalarp(sin(y));
(%o2) false
(%i3) scalarp(sin(x));
(%o3) true
(%i4) scalarp(sin(a));
(%o4) false
(%i5) scalarp(sin(1));
(%o5) true

(%i6) scalarp(gamma_incomplete(1,y));
(%o6) false
(%i7) scalarp(gamma_incomplete(1,x));
(%o7) true
(%i8) scalarp(gamma_incomplete(1,a));
(%o8) false
(%i9) scalarp(gamma_incomplete(1,1));
(%o9) true
(Continue reading)

Robert Dodier | 1 May 2010 20:21
Picon

Re: maxima programming questions

On 4/30/10, Camm Maguire <camm <at> maguirefamily.org> wrote:

> Greetings!  OK, I've attached my little program below, together with
> some tex output changes.  It would be nice to not have to toggle phv
> and just deal with a variable phase at all stages of the calculation,
> but I can't get the simplifications right.

Sorry, I still can't tell what you are trying to accomplish and
in what way the present behavior of Maxima is insufficient.
I gather you are working in some group and you want to apply
identities for operations on elements in the group. More or less?
I can't puzzle out what is the problem given the program and
what you've written before, so in the interest of getting to some
conclusion I think you'll have to be more explicit. Maybe someone
else who understands what's going on will have a go at it.

best

Robert Dodier
John Lapeyre | 1 May 2010 20:24

Re: reformatting source file

> Enclose grind_file in with_stdout to capture output to another file.
 Thanks for the help. I tried this on some code. It looks useful. 

 I also stringout to do the following
 stringout("fname",[1,1000],2);
   prints input lines 1 through 1000 to file fname with 2 additional newlines
 between every input.
 I can send it if you think its useful, but maybe its better to wait until s(if)
 someone has the time to think more carefully about how to extend stringout.

 Thanks,
 John
Paul Midgley | 1 May 2010 21:05

Printing out results

Hello

 I am a Mechanical Engineer and I am new to maxima; I would like to 
Maxima to carry out design calculations and then be able to print out 
the results as a report. Creating graphs, adding pictures or drawings 
where required. Maxima appears to have the features to allow such 
inclusions, but as I have said I cannot find out how to print the work 
out as a document with all the equations nicely formatted.

I have read through a number of tutorials, but I cannot find out how to 
do this or if it is at all possible.

Another good feature would be if a user could create a library of 
functions that could be dragged and dropped from say a template file or 
user defined drop down menu.

Is this possible.

Regards

Paul
Javed Alam | 1 May 2010 21:17
Picon

Re: Printing out results

Hi


There many ways to incorporate Maxima calculations within a document depending on the need.

What I have been using these days is to use Google docs for collaboration and then add Maxima calculations as images as shown here


It is not the most elegant way but it does the job.

The best is to get latex output  through texout command and incorporate that into a latex document and then do 

latex > dvi > ps or PDF

However, that requires proficiency in Latex. Most of the math graduates have that knowledge but students in Engineering don't. Also, pure math documents involve text and equations and latex works just fine for them. The incorporation of images in a latex document requires additional knowledge. Even I find adding images to a latex document cumbersome.  

Alam



On Sat, May 1, 2010 at 3:05 PM, Paul Midgley <paul <at> midgley.org> wrote:
Hello

I am a Mechanical Engineer and I am new to maxima; I would like to Maxima to carry out design calculations and then be able to print out the results as a report. Creating graphs, adding pictures or drawings where required. Maxima appears to have the features to allow such inclusions, but as I have said I cannot find out how to print the work out as a document with all the equations nicely formatted.

I have read through a number of tutorials, but I cannot find out how to do this or if it is at all possible.

Another good feature would be if a user could create a library of functions that could be dragged and dropped from say a template file or user defined drop down menu.

Is this possible.

Regards

Paul
_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima

_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
Robert Dodier | 1 May 2010 22:52
Picon

Re: reformatting source file

On 5/1/10, John Lapeyre <pdl <at> johnlapeyre.com> wrote:

>  I also stringout to do the following
>  stringout("fname",[1,1000],2);
>    prints input lines 1 through 1000 to file fname with 2 additional newlines
>  between every input.
>  I can send it if you think its useful, but maybe its better to wait until s(if)
>  someone has the time to think more carefully about how to extend stringout.

To be honest, it doesn't sound interesting. I think the applicability of
this new feature is too narrow.

Maxima's input and output functions have accreted over the decades
and there is no coherent organization to them; perhaps someday we
can reorganize all that stuff in some comprehensible way.

best,

Robert Dodier
Wilson Mixon | 1 May 2010 23:32

Re : Printing out results

One can use wxMaxima and open-source software to generate PDF documents with 
limited knowledge of LaTeX. Most of the heavy lifting is done by wxMaxima. 
I've developed some notes and posted them at this site:
http://facultyweb.berry.edu/wmixon/maxima/Typesetting/Intro.html

Be aware that the HTML page itself is mostly to provide links. The details 
on using wxMaxima and TexMaker (the LaTeX software that I prefer) are in the 
PDF file.

I welcome suggestions for improving this site.
>
> Message: 7
> Date: Sat, 1 May 2010 15:17:54 -0400
> From: Javed Alam <jalam1001 <at> gmail.com>
> To: Paul Midgley <paul <at> midgley.org>, maxima <maxima <at> math.utexas.edu>
> Subject: Re: [Maxima] Printing out results
> Message-ID:
> <n2p47ed5921005011217sc5d150d3z884d9b8fb5dc7223 <at> mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi
>
[ . . . ]
> The best is to get latex output  through texout command and incorporate 
> that
> into a latex document and then do
>
> latex > dvi > ps or PDF
>
> However, that requires proficiency in Latex. Most of the math graduates 
> have
> that knowledge but students in Engineering don't. Also, pure math 
> documents
> involve text and equations and latex works just fine for them. The
> incorporation of images in a latex document requires additional knowledge.
> Even I find adding images to a latex document cumbersome.
>
> Alam
>
>

Gmane