HDTenEightyP/NetNews huggingface dataset:
From: gjc@mitech.com (George J. Carrette)
Newsgroups: sci.math.symbolic
Subject: Re: long symbolic runs
Date: 31 Aug 92 10:12:02 GMT
Organization: Mitech Corporation, Concord MA

In article <JAFFER.92Aug29231912@camelot.ai.mit.edu>, jaffer@zurich.ai.mit.edu (Aubrey Jaffer) writes:
> Has anyone run SYMBOLIC mathematical compatuations which, using the
> best commands for the job, took days to complete and yet produced
> answers small enough to be useful?

Yes. I know someone who runs computations for days and days on lispmachines.

> If this is a common occurence then it would seem to be a good
> idea for symbolic math systems to dump their core images every few
> hours so that large computations will not be lost.  Do any systems
> offer this feature?

If I recall correctly, this was possible to do in Multics Macsyma.
Where data segments were forced to be organized into specific "file-backed"
areas of virtual memory. 

It was also possible to do this on a lispmachine, although you had to
go to some extra effort to make sure that your control stack was preserved
across a "disk-save" operation.

The "control stack" management is always your biggest problem, especially
when you mix things up in the way that SCM/SIOD or most compiled-lisp
implementations would tend to do.

-gjc



Newsgroups: sci.math.symbolic
From: jensting@ee.ic.ac.uk (Jens Tingleff)
Newsgroups: sci.math.symbolic
Subject: Re: long symbolic runs
Date: 1 Sep 92 13:29:27 GMT
Organization: Elec. Eng. Imperial College, London

In article <JAFFER.92Aug29231912@camelot.ai.mit.edu>, jaffer@zurich.ai.mit.edu (Aubrey Jaffer) writes:
> Has anyone run SYMBOLIC mathematical compatuations which, using the
> best commands for the job, took days to complete and yet produced
> answers small enough to be useful?
> 

Certainly. My most recent problem of that type was trying to get a first order 
approximation to the change in polynomial zero location when the polynomial 
coefficients changed values. I did it the stupid way, which is why it took
something like 10 CPUhours for one polynomial and unsolved after 3 CPUDays for
another polynomial. The end result is a neat expression, but some of the
intermediate expressions (the symbolic zero values) has thousands of terms in
them.. 

Whether this falls under "used the best commands for the job" I don't know. 
I changed my formula after much digging into my old MSc thesis, I didn't
use the stupiud algorithm by choice. Using the stupid algorithm was something I
just had to go through ;-)

> If this is a common occurence then it would seem to be a good
> idea for symbolic math systems to dump their core images every few
> hours so that large computations will not be lost.  Do any systems
> offer this feature?

Yes it would be nice; no I don't know of any package that does this (I used
Mathematica). 
-- 
Mr Jens Tingleff, M.Sc.EE. PhD student at 
     Imperial College, Dept of EE,  Exhibition Road, London SW7 2BT, England
jensting@ic.ac.uk or jensting@titan.ee.ic...  (used to be jensting@diku.dk) 
"YOU ARE WITNESSING A THREE-QUARTER VIEW OF TWO ADULTS SHARING A TENDER MOMENT"
Newsgroups: sci.math.symbolic
From: parkes@itp.ethz.ch (Andrew Parkes)
Subject: Re: Mma Solve[] oddity (a much shorter version)
Organization: Institute for Theoretical Physics, ETH, Zuerich, Switzerland
Date: Fri, 28 Aug 1992 22:16:59 GMT

David Petry writes:
> eqs  =  {  a*x*y + b*x + c*y ==0,  d*x*y + e*x + f*y + g == 0}
> 
> Solve[ eqs, {x,y}]
> 
> Mathematica 2.  seems to be unable to solve the above equations, but if we 
> divide out the "a" and "d", so that
[...]
> 
> A frustrating deficiency!
> David Petry

Solve[] even fails for a special case of the above

Solve[{a1 X + a2 Y + a3 X Y == 0 , b1 X + b2 Y + b3 X Y == 0},{X,Y}]
 
This time the solution does not involve square roots, and there
is even the trivial solution X=Y=0, but still memory use grows and
grows and grows and ...

Solve[] does work immediately  if

1) We give Solve[] an extra linear combination of the two equations:-
Solve[{pol1==0,pol2==0,Factor[b1 pol1 - a1 pol2]==0},{X,Y}]]

This should be superfluous, but isn't.  Maybe this gives a generic way in
general to get around the Solve[] deficiencies.

2) One of the coefficients is given a numerical value, including zero.  Looks
like we a have a symbol manipulation package that dislikes symbols.

Well, I think I might be learning Maple soon.

Andrew Parkes,              | E-mail: parkes@itp.ethz.ch 
Theoretische Physik,        |
ETH-Honggerberg,            |                           
CH-8093 Zurich, Switzerland.|
From: huang@deakin.OZ.AU (Weiguang Huang)
Newsgroups: sci.math.symbolic
Subject: Re: Some comparison of Mma, Maple and SymbMath (REBUTTAL)
Date: 30 Aug 92 03:49:17 GMT
Organization: Deakin University, Victoria, Australia

In article <BtJp3I.DHx@mentor.cc.purdue.edu> ags@seaman.cc.purdue.edu (Dave Seaman) writes:
>In article <3936@sol.deakin.OZ.AU> huang@deakin.OZ.AU (Weiguang Huang)  
>writes:
>> Huang's article compared the built-in functions of Mma, Maple and  
>SymbMath
>> (i.e. without help with external packages or programming). If you have  
>to 
>> be helped with external packages or programming, that is another story.
>
>It seems as if you are trying to make external packages appear to be a  
>liability instead of an asset. Besides, several of the examples (such as  
>improper integrals) involved using different techniques for the two tests  
>(e.g. integrating over a single interval in Mma, while breaking up the  
>interval in SymbMath). When the same technique was used in both cases,  
>thus making it a fair test, both packages gave consistent results (both  
>wrong for the single interval, and both correct when the interval was  
>divided at the singularity). Mma needed no help from external packages or  
>programming in these cases.
>


"both wrong for the single interval" ?

For some examples of improper integrals (such as inte(1/x^2, x from -1 to
2), inte(1/x^2, x from -2 to 4), inte(1/x^(4/5), x from -2 to 3),
inte(1/x^6, x from -2 to 6), etc.), Mma gives the wrong results while
SymbMath gives inf. Mma cannot detect any improper point for the single
inteval while SymbMath can do some.


Mma need no help from external packages or programming in these cases ?

In the case of inte(1/x, x from -1 to 1), even helping with the external
package CauchyPrincialValue.m, Mma says "Numerical integration stopping
due to loss of precision. ... suspect one of the following: ... ". This
means Mma's numerical integration fails and the result is not liable.
The user had to split interval to {x, -1,{0},1}. The method in Mma is
NUMERICAl integration instead of SYMBOLIC integration. Without help
with external packages, Mma gives the wrong result.

To use external package, the user must know which package he should use,
and the external package must be available on hand. This is different story.

>--
>Dave Seaman
>ags@seaman.cc.purdue.edu

**********************************************************************
*   Dr. Weiguang HUANG                                               *
*   5/6 Cara Road, Geelong, Vic. 3216, Australia                     *
*   Email: huang@deakin.oz.au,      Phone: (052)443282               *
* ------------------------------------------------------------------ *
*   SymbMath - a symbolic calculator with learning                   *
*   PlotData - a plotter with analysing data                         *
**********************************************************************
From: riddle@mathcs.emory.edu (Larry Riddle)
Newsgroups: sci.math.symbolic
Subject: Re: Some comparison of Mma, Maple and SymbMath (REBUTTAL)
Date: 31 Aug 92 02:21:39 GMT
Organization: Emory University, Dept of Math and CS

In article <3991@sol.deakin.OZ.AU> huang@deakin.OZ.AU (Weiguang Huang) writes:
>For some examples of improper integrals (such as inte(1/x^2, x from -1 to
>2), inte(1/x^2, x from -2 to 4), inte(1/x^(4/5), x from -2 to 3),
>inte(1/x^6, x from -2 to 6), etc.), Mma gives the wrong results while
>SymbMath gives inf. Mma cannot detect any improper point for the single
>inteval while SymbMath can do some.
>

But, for the following equivalent improper integrals, SymbMath gives

inte(1/(x-1)^2, x from 0 to 3) = -3/2
inte(1/(x-1)^2, x from -1 to 5) = -3/4
inte(1/(x-1)^6, x from -2 to 6) = -3368/3796875

which are all wrong. (Also, I don't think you really meant to say
inte(1/x^(4/5), x from -2 to 3) = inf).

My guess is that SymbMath has built-in rules for how to handle
inte(1/x^n, x from a to b) when n > 1 and a < 0 < b, which is fine,
but "cannot detect any improper point for the single interval" when
that point is anything other than 0. For example

inte(1/x^(8/3), x from -1 to 2) = inf, but
inte(1/(x-1)^(8/3), x from 0 to 3) = -3/5 - 2^(-5/3)*3/5

Mathematica can be given the same capability with a single line:
In[1]:= Unprotect[Integrate]

Out[1]= {Integrate}

In[2]:= Integrate[Power[x_,n_],{x_,a_,b_}] := Infinity /; (n < -1 && a < 0 && 0 < b)

In[3]:= Integrate[1/x^2,{x,-1,2}]

Out[3]= Infinity

In[4]:= Integrate[1/x^2,{x,1,2}]

        1
Out[4]= -
        2

In[5]:= Integrate[1/x^2,{x,-2,4}]

Out[5]= Infinity

In[6]:= Integrate[1/x^6,{x,-2,6}]

Out[6]= Infinity

This definition is only given for illustration purposes. I'm sure
it has its faults and could be improved. 

-- 
Larry Riddle        | riddle@mathcs.emory.edu         PREFERRED
Agnes Scott College | {rutgers,gatech}!emory!riddle   UUCP 
Dept of Math        | riddle@emory.bitnet             NON-DOMAIN BITNET
Decatur, GA 30030   | Phone: Voice 404-371-6222, FAX 404-371-6177
From: dalef@whatnext.apl.washington.edu (dale funk)
Newsgroups: sci.math.symbolic
Subject: several probs with mathematica 2.1 on windows 3.1
Keywords: mathematica windows
Date: 4 Sep 92 18:24:08 GMT
Article-I.D.: u.1992Sep4.182408.23354
Reply-To: dalef@whatnext.apl.washington.edu
Distribution: na
Organization: University of Washington

In the past I have used mathematica on a NeXT with no probs.
Now I've got several problems with the windows version.

1.  The AiryAi Function gives me erroneous outputs when
I plot it form -5 to +5 on the windows version
V2.0 works fine on the Next.  Anyone else see this problem?

2.  I can't seem to run an external fortran program from
my mathematica notebook because when it tries it says I have a 
memory problem.  I can't see why because even if I try this
with a one line script it gives me this error.  
I have a 486 with 8 Meg Ram.  I also have himem.sys in the
config.sys file.  I get the same error message when I go back to windows  
and try to shell to ms-dos.  The manual says mathematica should
run good with 4 meg ram so It is hard for me to believe that with
a one line program and 8 meg ram I am having problems.  
Even with my mouse drivers loaded high I have problems.

I have been using NeXT for several years but am new to the 486/windows  
environment.  Experts step forth and clue me in!  Thanks!
Dale
dalef@whatnext.apl.washington.edu or postit
Newsgroups: sci.math.symbolic
From: ppalmer@oskar.uchicago.edu (Patrick Palmer)
Subject: Maple for quantum mechanics?
Organization: Department of Astronomy and Astrophysics
Date: Fri, 4 Sep 1992 05:36:35 GMT

I am trying to use Maple to carry out some quantum mechanical
calculations.  I cannot get it to expand out a product of two
polynomials when the multiplication is non-commutative (the
coefficients of the non-commuting operators can be complex numbers,
but I don't think this is a problem).  There must be a way do do this,
but, I looked through the manual and the list of libraries and didn't
find anything.  Does anyone know how to do this?

Pat Palmer (email: ppalmer@oskar.uchicago.edu)
From: jaffer@zurich.ai.mit.edu (Aubrey Jaffer)
Newsgroups: sci.math.symbolic
Subject: long symbolic runs
Date: 30 Aug 92 04:19:12 GMT
Organization: M.I.T. Artificial Intelligence Lab.

Has anyone run SYMBOLIC mathematical compatuations which, using the
best commands for the job, took days to complete and yet produced
answers small enough to be useful?

If this is a common occurence then it would seem to be a good
idea for symbolic math systems to dump their core images every few
hours so that large computations will not be lost.  Do any systems
offer this feature?
From: ara@zurich.ai.mit.edu (Allan Adler)
Newsgroups: sci.math.symbolic
Subject: Re: long symbolic runs
Date: 2 Sep 92 01:03:45 GMT
Organization: M.I.T. Artificial Intelligence Lab.



I would not rule out the possibility of backing up 200 MB or more. If one has
a tape drive, one can save stuff in pieces in files of a certain size and
then back them up on the tape drive, then delete them to make more room
for files to hold more pieces. As long as one has enough cartridges
and is willing allow the time to back up to a tape, one can handle
gigabytes.

On a SUN, the tape drive is reasonably efficient. On the PC's I've seen
that have tape drives, they are as slow as molasses.

In reply to the original question about what algebra systems provide 
facilities for automaticaly saving computations, I think, but am not
sure, that some authors of REDUCE packages may have toyed with this
feature. My reason for thinking so is that the source code for the
Groebner package and the Distributed Polynomial package says something
about the checkpointing stuff having been deleted. I'm told that
the practice of periodically saving partial results to disk is called
checkpointing.

Allan Adler
ara@altdorf.ai.mit.edu
Newsgroups: sci.math.symbolic
From: bminor@afit.af.mil (Bryan M. Minor)
Subject: Running Mathematica Batch Jobs on a Sun SPARC 2
Organization: Air Force Institute of Technology
Date: Thu, 3 Sep 1992 21:00:21 GMT

Currently, I am running Mathematica on a 386 under Windows
and am very happy with its performance.	But every once in
while I come across a larger calculation that really
ties up my machine. I have available a number of Sun SPARC 2
workstations with Mathematica 2.0.  I do not want to
tie up my computers modem all day taking to these Suns;
waiting for my results to be finished.	Could someone at
least get me started on how to batch Mma jobs on these
Suns?  Thanks for your time!

Bryan Minor
From: monagan@inf.ethz.ch (Michael)
Newsgroups: sci.math.symbolic
Subject: Re: Maple question
Summary: Maple problem with C translation
Keywords: output file, C.
Date: 28 Aug 92 14:20:42 GMT
Organization: Dept. Informatik, Swiss Federal Institute of Technology (ETH), Zurich, CH

In article <1992Aug27.160913.14137@athena.mit.edu>, bhattas@athena.mit.edu (Saurav D Bhatta) writes:
> i am writing a procedure that generates symbolic expressions which i want to use
> in a C program. i want to output the expressions to a file. so my question is
> basically this: how would i output stuff to a file in a format readable by a C
> program.
> 
> i tried the following methods:
> 
> 1) > C(expression,filename = `test.out`);
> the problem with this was that every time i used this command, the file was
> overwritten. since my procedure is going to generate a lot of different
> expressions which i want to output to the file, i definitely do not want the file
> to be overwirtten every time i write out a new expression (want an append mode);
> 

Dear Saurav,

Yes, the C function and also the fortran function when given a filename for
the output execute writeto(filename); which means the file gets overwritten.
In the new versions, they execute appendto(filename); so the output
is appended to the file.  This is what you want.  The new code is available
in the Maple share library which you can get using anonymous ftp from

	Internet #	Internet address      Location   Directory
	=================================================================
	129.97.140.58   daisy.uwaterloo.ca    Waterloo   maple
	129.132.101.33  neptune.inf.ethz.ch   Zurich     maple

Actually, a little Maple majic will also fix the problem.  Just subsitute
the writeto call for appendto in the code by doing

C := subs(writeto=appendto,readlib(C));

However I recommend you try to get the new code as it contains a bug fix
and will now breaks up large expressions which cause compilers to break.
The reason why methods 2) and 3) that Saurav mentioned didn't work
is because if one doesn't specify a filename, the old C and fortran codes
explicitly write to the terminal, thus overriding the writeto(`test.out`);
and open(`test.out`); statements Saurev used in methods 2) and 3).

Michael Monagan
Newsgroups: sci.math.symbolic,uiuc.mathematica
From: butscher@helios.physics.utoronto.ca (Adrian Butscher)
Subject: MMA Version?
Organization: University of Toronto Physics/Astronomy/CITA
Date: Thu, 27 Aug 1992 16:09:33 GMT

In article <1992Aug26.103708.26823@afterlife.ncsc.mil> ricampb@afterlife.ncsc.mil (Robert Campbell) writes:

>...Version 2.1 corrected this for the packages in the standard distribution...

What is the latest version of MMA for the Macintosh?  The latest I've seen is 
version 2.03.

Adrian
From: gaylord@UX1.CSO.UIUC.EDU
Newsgroups: sci.math.symbolic
Subject: using Transpose vs. Thread
Date: 4 Sep 92 13:44:01 GMT

i was messing around and came across this

Timing[Map[(#[[1]] -> #[[2]])&, Transpose[{Range[1000],Range[1000]}]];]
{2.23333 Second, Null}

Timing[Map[Apply[Rule,#]&, Transpose[{Range[1000],Range[1000]}]];] 
{2.15 Second, Null}

Timing[Thread[Rule[Range[1000],Range[1000]]];]
{0.85 Second, Null}

------------------------------

more generally on the Transpose function itself

Transpose[{Range[5],Range[5]}]
{{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}}

Thread[List[Range[5],Range[5]]]
{{1, 1}, {2, 2}, {3, 3}, {4, 4}, {5, 5}}


Timing[Thread[List[Range[10000],Range[10000]]];]
{3.71667 Second, Null}

Timing[Transpose[{Range[10000],Range[10000]}];]
{4.51667 Second, Null}

so it looks like we can define a user-defined function, maybe call it
transposeFast (i'm too modest to have it named after myself) which is
faster than the built-in Transpose function.

interesting

richard j. gaylord, university of illinois, gaylord@ux1.cso.uiuc.edu

"if you're not programming functionally, then you must be programming
dysfunctionally"



Newsgroups: sci.math.symbolic
From: jake@skatter.usask.ca
Subject: Re: long symbolic runs
Organization: University of Saskatchewan
Date: Wed, 2 Sep 1992 06:02:17 GMT

From article <ARA.92Sep1200345@camelot.ai.mit.edu>, by ara@zurich.ai.mit.edu (Allan Adler):
> 
> 
> I would not rule out the possibility of backing up 200 MB or more. If one has
> a tape drive, one can save stuff in pieces in files of a certain size and
> then back them up on the tape drive, then delete them to make more room
> for files to hold more pieces. As long as one has enough cartridges
> and is willing allow the time to back up to a tape, one can handle
> gigabytes.
> 
> On a SUN, the tape drive is reasonably efficient. On the PC's I've seen
> that have tape drives, they are as slow as molasses.
> 
> In reply to the original question about what algebra systems provide 
> facilities for automaticaly saving computations, I think, but am not
> sure, that some authors of REDUCE packages may have toyed with this
> feature. My reason for thinking so is that the source code for the
> Groebner package and the Distributed Polynomial package says something
> about the checkpointing stuff having been deleted. I'm told that
> the practice of periodically saving partial results to disk is called
> checkpointing.
> 
> Allan Adler
> ara@altdorf.ai.mit.edu

Mathematica has a Dump[] command, which, according to the book, writes a
complete image to file.

I guess all you need is a mechanism to dump at certain user-definable
intervals while a computation proceeds.

There may be complications.  Mathematica can take quite a long time to
interrupt because of something about having only a certain number of
points within which the internal state is "clean" enough to be halted
and restarted.  But, hey, what I know about the internals of the Mma
kernel you can write on the back of a large stamp with a jiffy marker.

I wouldn't mind some good, solid documentation.

jake@skatter.usask.ca

Newsgroups: sci.math.symbolic
From: coates@newton.physics.uq.oz.au (Tony Coates)
Subject: Re: mathematica solve and rules
Organization: Physics Dept. The University of Queensland
Date: Thu, 3 Sep 1992 02:52:49 GMT

In article <1992Sep3.004655.21678@athena.mit.edu>, Matthias Imhof <gondwana@basalt.mit.edu>  writes:
|> when i use solve in mma, i get 
|> 
|>         u4      y4         y4
|> {{a -> ----- - -----, b -> --, 
|>        120 h   120 h       24
|>  
|>         u2    h u4   y2    h y4       y2
|>    c -> --- - ---- - --- - ----, d -> --, 
|>         6 h    36    6 h    18        2
|>  
|>                        3                   3
|>         u0   h u2   7 h  u4   y0   h y2   h  y4
|>    e -> -- - ---- + ------- - -- - ---- + -----, f -> y0}
|>         h     6       360     h     3      45
|>  
|>    }
|> 
|> but what i actally want is something like
|> 
|>         u4      y4         y4
|> a =    ----- - -----, b =  --, 
|>        120 h   120 h       24
|>  
|>         u2    h u4   y2    h y4       y2
|>    c =  --- - ---- - --- - ----, d =  --, 
|>         6 h    36    6 h    18        2
|>  
|>                        3                   3
|>         u0   h u2   7 h  u4   y0   h y2   h  y4
|>    e =  -- - ---- + ------- - -- - ---- + -----, f =  y0}
|>         h     6       360     h     3      45
|>  
|> 
|> which defines the solution to be a, b, c, d, e and f and not just the
|> transform rules which could be applied
|> 
|> is there a way to do that? can someone explain the concept of rules and  
|> definitions?
|> 
|> matthias

Look at it this way:

	"Solve[{a + b = 1, a - b = -1}, {a, b}]"
gives
	"{{ a -> 0, b -> 1}}".
Usually, to use these rules, I would do something like
	"subs = First[Solve[...]]"
where the "First" is to get rid of the outer list braces, which I have
never understood the reason for.  If you want to assign these values to
"a" and "b", you can then type
	"{a, b} = {a, b} /. subs"
and there you have it.

	I should add, though, that my experience is that while sometimes
you want to give specific values to variables, sometimes you also want
to change definitions within a single notebook.  In this case, I find it
more convenient to quote which substitutions I specifically want for
each operation.  So the way that "Solve" returns results is not so bad
at all; it just depends somewhat on what you want and what things you do
inside a single notebook.
	I hope this helps a bit.
							Tony.
_______________________________________________________________________________

Anthony.B.Coates (Tony)
Department of Physics
The University of Queensland  QLD  4072
Australia

Phone: (+617)365 3424           (Physics Departmental Office)
Fax:   (+617)365 1242           (   "         "         "   )
Email: coates@physics.uq.oz.au

"My messages mirror my feelings, but do not reflect University policy."
_______________________________________________________________________________
Newsgroups: sci.math.symbolic