xPol | 1 Oct 2010 10:08
Picon

server for cell phones?

Any suggestions for a maxima web server and browser to use maxima from a 
cell phone?

I have tried calc.matthen.com using opera web browser,  getting 'your 
browser does not support iframes'

Thank you

----p
Robert Dodier | 2 Oct 2010 18:30
Picon

Re: maxima problem

On 9/29/10, Briceno, Cairo <Cairo.Briceno <at> parsons.com> wrote:

> I am using maxima behind a firewall. I try the following things without
> having success in ruuning maxima in windows XP service Pack 3.

Well, I don;t know what the problem might be (works for me fwiw)
but anyway if you are willing to use the command line Maxima
(should have been installed in the same package as the Maxima GUI),
it doesn't open any socket so there is one less point of failure.

best

Robert Dodier
Karl-Dieter Crisman | 3 Oct 2010 03:30
Picon

server for cell phones?

One way to do this, albeit perhaps not what you were looking for, is
to use Maxima from within Sage's notebook browser.  There is a
drop-down menu at the top of every Sage worksheet which can be set to
'maxima', and then all commands are executed in Maxima.  It is not an
interactive session in the sense of being able to answer questions
like "is x positive or negative", but might be what you need.

You can try this out by creating an account at http://www.sagenb.org
and making a new worksheet once you have logged in.  I know a lot of
people have used e.g. Android and iPhone to use this interface.  I
don't know how optimized it is for small screens, but it works.

Karl-Dieter Crisman

> Message: 4
> Date: Fri, 01 Oct 2010 10:08:25 +0200
> From: xPol <xtekhne <at> gmail.com>
> To: maxima <at> math.utexas.edu
> Subject: [Maxima] server for cell phones?
> Message-ID: <i844tr$c57$1 <at> dough.gmane.org>
> Content-Type: text/plain; charset="ISO-8859-1"
>
> Any suggestions for a maxima web server and browser to use maxima from a
> cell phone?
>
> I have tried calc.matthen.com using opera web browser,  getting 'your
> browser does not support iframes'
>
> Thank you
(Continue reading)

Leo Butler | 3 Oct 2010 20:30
Picon
Picon

Re: maxima problem


On Wed, 29 Sep 2010, Briceno, Cairo wrote:

< 
< I am using maxima behind a firewall. I try the following things without having success in ruuning maxima in
windows XP service Pack 3.
< 
<  
< 
< 1)      I set the proper maxima path in the windows EP mode,
< 
< 2)      I reise the privileges to maxima engine and the the tcl interface.
< 
< 3)      I free the ports 4008 for the pipe connection in all the firewall settings.
< 
<  
< 
< Despite this, maxima is still not running giving the error: “ Time for connection exceeding”.
< 
<  
< 
< Does any of you was successful to get maxima running through the sockets(pipes) in windows xp?

 This topic has been discussed on this list within the last year or two, so it may be worth
 your time searching the list archive.

 I would suggest the following approach to your problem:
 -verify that command-line maxima is actually working (as Robert
 suggested);
 -if it is, then remove all firewall rules and launch XMaxima.
(Continue reading)

Russell Shaw | 4 Oct 2010 09:58
Picon

Grouping terms

Hi,

In a polynomial:

   (a*x + y)^2 + a*x*y + y

How do i get the terms to be grouped according to x and y?:

(%o40)  a*x^2 + y^2  + 3*a*x*y + y

Also, coeff(%o40, x*y) gives 0.
k t | 4 Oct 2010 10:28
Picon
Favicon

Error using lbfgs

Hello.

I'll try to use lbfgs and got this:
===================[cut]============================================
(%i2) V: 0.75$
a: 24$
b: 68$
C(r) := 2*%pi*b*r^2 + 4*a*%pi*r + 2*b*V/r + a*V/(%pi*r^2)$
lbfgs(C(r), [r], [1.0], 1e-4, [1,0]);
(%i3) 
(%i4) 
(%i5) 
(%i6) *************************************************
  N=    1   NUMBER OF CORRECTIONS=25
       INITIAL VALUES
 F=  8.365790735841403D+02   GNORM=  1.042646940618427D+03
*************************************************

   I  NFN     FUNC                    GNORM                   STEPLENGTH

Maxima encountered a Lisp error:

 Error in NTH [or a callee]: T is not of type SYSTEM::PROPER-LIST.

Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
(%i7) 
===================[cut]============================================

What am I doing wrong?
(Continue reading)

Raymond Toy | 4 Oct 2010 13:52
Picon

Re: Error using lbfgs

 On 10/4/10 4:28 AM, k t wrote:
> Hello.
>
> I'll try to use lbfgs and got this:
> ===================[cut]============================================
> (%i2) V: 0.75$
> a: 24$
> b: 68$
> C(r) := 2*%pi*b*r^2 + 4*a*%pi*r + 2*b*V/r + a*V/(%pi*r^2)$
> lbfgs(C(r), [r], [1.0], 1e-4, [1,0]);
> (%i3) 
> (%i4) 
> (%i5) 
> (%i6) *************************************************
>   N=    1   NUMBER OF CORRECTIONS=25
>        INITIAL VALUES
>  F=  8.365790735841403D+02   GNORM=  1.042646940618427D+03
> *************************************************
>
>    I  NFN     FUNC                    GNORM                   STEPLENGTH
>
> Maxima encountered a Lisp error:
>
>  Error in NTH [or a callee]: T is not of type SYSTEM::PROPER-LIST.
>
> Automatically continuing.
> To enable the Lisp debugger set *debugger-hook* to nil.
> (%i7) 
> ===================[cut]============================================
>
(Continue reading)

Stavros Macrakis | 4 Oct 2010 15:02
Picon
Favicon
Gravatar

Re: Grouping terms

Thanks for your interest in Maxima.


You can control the grouping of the variables using facsum.  For example:

(%i1) expr:(x+y+z+1)^2;
(%o1) (z+y+x+1)^2
(%i2) facsum(expr);
(%o2) (z+y+x+1)^2
(%i3) facsum(expr,x);                    -- express as a polynomial in x
(%o3) (z+y+1)^2+2*x*(z+y+1)+x^2
(%i4) facsum(expr,y);                    -- express as a polynomial in y
(%o4) (z+x+1)^2+2*y*(z+x+1)+y^2
(%i5) facsum(expr,x,y);                 -- express as a polynomial in x and y
(%o5) (z+1)^2+2*y*(z+1)+2*x*(z+1)+y^2+2*x*y+x^2
(%i6) facsum(expr,x,y,z);              -- express as a polynomial in x, y, and z
(%o6) z^2+2*y*z+2*x*z+2*z+y^2+2*x*y+2*y+x^2+2*x+1

About coeff -- it is strictly syntactic -- coeff(...,x*y,...) looks for a term of the form EXPR*x*y, where EXPR has no x or y terms (but may have terms *involving* x and y).  This should be better documented.

To get the coefficients regardless of the form of the input, you can either first change the form of the input (using facsum or expand for example) and then use coeff or you can use ratcoeff, which internally expands the expression completely.

                -s

On Mon, Oct 4, 2010 at 03:58, Russell Shaw <rjshaw <at> netspace.net.au> wrote:
Hi,

In a polynomial:

 (a*x + y)^2 + a*x*y + y

How do i get the terms to be grouped according to x and y?:

(%o40)  a*x^2 + y^2  + 3*a*x*y + y

Also, coeff(%o40, x*y) gives 0.
_______________________________________________
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
Stavros Macrakis | 4 Oct 2010 16:58
Picon
Favicon
Gravatar

Efficiency of 64-bit mode

There have been various discussions of efficiency of 32 vs. 64-bit mode in Maxima, so I thought the group would be interested in this note by a very experienced compiler writer.

My summary:

* 64-bit takes more memory (pointers are 2x as big and some instructions are longer), so caches are less effective.
* 64-bit will be slower in pointer-heavy computations (like Lisp/Maxima).
* 64-bit is generally faster for floating-point calculations when using precompiled binaries.
* But in the end it all depends on the particular application, the particular compiler, and the particular processor.

               -s

Michael Meissner <meissner <at> the-meissners.org>
Date: Fri, Oct 1, 2010 at 21:59

There are a couple of things at the instruction level (i.e. where I tend to
live as a compiler developer) that always make these types of question only
answerable by "it depends".

Programs that mostly are pointer chasing tend to do better in 32-bits than
64-bits.  This is because if pointers (and possibly int/long) are 64-bits, your
data cache is less effective, because fewer unique values will be in the cache
(no matter what your cache size is).

In the x86 land, because most systems worry about being backwards compatible to
the most ancient 386's, by default only the instructions that existed in the
386 tend to get generated.  This means for instance using the 80387 floating
point stack (bletch), instead of the SSE registers for floating point, not
having condition move instructions, etc.  Some of the newer linux distros have
changed their minimum requirements, and have changed the compiler to generate
more modern code by default.  In addition, some compilers (Intel, PGI) will
generate fat binaries that contains the code compiled for several different
instruction set level.  Because the 64-bit code started at the SSE2 level, you
have more instructions that the compiler can use by default without specifying
cpu/arch type options.

Due to the rather contorted way that both Intel and AMD have grown the
architecture over the years, 64-bit code tends to be bigger than 32-bit code.
You get more registers available in 64-bit (16 GPR + 16 FPR vs. 8/8 if memory
serves).  When I was at AMD, we discovered some code in a hot-loop where
compiling it in 64-bit mode, made the loop just big enough that it no longer
completely fit in the instruction buffers and it had to read the values from
the instruction cache.  Speaking of the i-cache, just like bigger pointers
means the d-cache is less effective, similarly bigger 64-bit instructions means
the i-cache is less effective, though it is less of an effect than the d-cache.

In terms of scheduling instructions, each of the major generations of chips
want the code scheduled differently, and it isn't consistant on the chip
makers, for example the newer AMD chips are scheduled differently than the
older K8's, and are more Intel like.  For example, on some chips it is better
to use an INC instruction while on others an ADDI $1 to increment a value.
Another thing is whether it is better to load a value into a register, and do
the operation on the register, or whether you can operate on the value directly
from memory.  On each of the compilers, there is always the issue of what to
choose for the defaults.  When I was at AMD, we were trying to change some of
the defaults so that the code would run faster on new machines that hadn't been
announced, and of course Intel was doing the same thing.

The ABI also plays an issue.  The x86 32-bit abi tends to push values on the
stack, while the 64-bit abis (and windows/linux needless to say have different
64-bit abis) tend to pass the first few values in registers, and there are
various tradeoffs which is better.  It is amusing that both recent Intel and
AMD chips added optimization to speed up pushing values on the stack, just as
a lot of people were switching over from 32-bit (where it is done all of the
time, and push is a single byte instruction for some registers) to 64-bit where
push is rarely used, and stores are used instead.

Language abis are another issue.  Fortran for instance tends to favour default
integers being the same size as default reals.  This penalizes 32-bit which
then has to do the multiple instructions to do 64-bit arithmetic in 32-bit
mode.

Of course it is not just x86, I've seen the same issues in Mips and Power.  I
find for instance that on Power, SpecINT tends to be about 10% faster for
32-bit apps than for 64-bit apps, but nearly even for SpecFP, but it isn't all
29 benchmarks are uniformally slower, but it goes all over the board.  For
instance libquantum is much faster in 64-bit, because the code is almost all
long long shift and logical instructions, but there are definately 32-bit apps
that are faster due to the size of pointers and d-cache.

--
Michael Meissner
email: meissner <at> the-meissners.org
http://www.the-meissners.org

_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
Raymond Toy | 4 Oct 2010 17:09
Picon

ABCL and maxima

 With some help from Erik Huelsmann, the current cvs version of maxima
should now work with abcl, and the testsuite should pass.  You will need
to get a very recent version of abcl, though.

Most of the test failures were minor issues due to abcl returning
slightly different numerical results and due to abcl signaling errors on
underflow.  (We turn that off in all lisps.)

I think this is good news.  Thanks to Erik for doing the dirty work and
tracking down the issues and running the tests.

Ray

Gmane