From @uxc.cso.uiuc.edu,@wri.UUCP,@uunet:simon@alberta Tue Feb 14 00:28:05 1989
To: mathgroup
Subject: Where is the mdefs.h file in release 1.1 for the Mac II ?
Status: RO

Do you know if this file, mentioned on page 157 of the Mathematica
book, is?  Could it be posted to sci.math.symbolic on usenet if there
has been an oversight?
Thanks
-------------------
Simon Tortike, Department of Mining, Metallurgical and Petroleum Engineering,
The University of Alberta, Edmonton, AB, CANADA T6G 2G6.
               simon@alberta.uucp || Tel. +1 403 492-3338

From stevec Tue Feb 14 00:40:34 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA01694; Tue, 14 Feb 89 00:40:07 CST
Date: Tue, 14 Feb 89 00:40:07 CST
From: stevec (Steve Christensen)
Message-Id: <8902140640.AA01694@yoda.ncsa.uiuc.edu>
To: @wri.UUCP@newton, alberta!simon
Subject: Re:  Where is the mdefs.h file in release 1.1 for the Mac II ?
Cc: stevec
Status: RO

This file is included in the Sun version, but not in the Mac II
version I have.  I will check with WRI and see if I can post it and
find out why it is not in the Mac version.

Steve Christensen

From stevec@yoda Thu Mar  2 12:10:21 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA08659; Thu, 2 Mar 89 12:10:20 CST
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA18645; Thu, 2 Mar 89 12:04:59 CST
Return-Path: <stevec@yoda>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA08649; Thu, 2 Mar 89 11:57:17 CST
Date: Thu, 2 Mar 89 11:57:17 CST
Message-Id: <8903021757.AA08649@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: Statistical and Econometric Modeling
From: "GSBACD::PHD_IVO" <phd_ivo%gsbacd.decnet@gsbacd.uchicago.edu>
Status: RO


While I cannot afford Mathematica on my Mac-II-maybe if I sell it and
buy myself a NeXT-I would like to be on the mailing list to figure out
how useful it would be.

In particular, I would like to see discussion of usage of M. for
statistical and econometric modeling. Since magazines claim that
M. is a memory hog, I guess one would need virtual memory to use
M. for large-scale statistical projects, wouldn't one?

ivo welch
phd_ivo@gsbacd.uchicago.edu

From stevec Sun Mar  5 01:29:10 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA10872; Sun, 5 Mar 89 01:28:59 CST
Date: Sun, 5 Mar 89 01:28:59 CST
From: stevec (Steve Christensen)
Message-Id: <8903050728.AA10872@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Archives
Status: RO


I have placed several files in the MathGroup archives on
the ftp.ncsa.uiuc.edu (128.174.20.50) machine.  These are
available via anonymous ftp.

In the Symbolic/Mathematica/MathGroup_Mail_Archive will be a file called
MathGroupMail1 which will contain messages like this one, that is,
messages that go out to the mailing list.  I will continuously
add to this file until it contains about 50 messages, then I will
start MathGroupMail2, and so forth.

In the Symbolic/Mathematica/Sci.Math.Symbolic directory, I have placed a file
called Archive1 which currently contains those Mathematica related
messages from the sci.math.symbolic newsgroup on the net and our
local uiuc.mathematica notesfiles.  Archive1 contains messages in
a digest form that appear from September 1988 to early February 1989.
Archive2 will contain a second digest as messages appear in those
two newsgroups or elsewhere in other newsgroups.  This is a service
for those of you who do not have access to sci.math.symbolic.

In Symbolic/Mathematica/Packages are two .m files, one .h file and
a pointer to the Cocklear package from Apple.

There are now over 300 email addresses on the MathGroup list, some of
which are mailboxes for whole insitutions like UC-Berkeley.  I am
in contact with some of the Mathematica vendor representatives and am
adding them to the list.  I hope to have every vendor have representatives
on the list so that they can be constantly aware of what is going on
in the Mathematica world.  We have a fair number of Mathematica experts
on the list. 

If you are doing significant work with Mathematica and would be willing
to talk about your application in your region of the world, please let
me an the mailing list know.  There is a demand for speakers for
local user groups, university departments and industrial research labs.

Finally, the usual reminder - The value of a user group and mailing list
comes from an active participation.  Please do not hesitate to send mail
on your applications, experiences, bugs, packages, etc. often.

Please pass this on to other Mathematica users who may not be on the
list yet.

Steve Christensen
steve@ncsa.uiuc.edu
14008@ncsavmsa.bitnet
mathgroup@wri.com

From stevec Tue Mar  7 13:02:52 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA12000; Tue, 7 Mar 89 13:00:32 CST
Date: Tue, 7 Mar 89 13:00:32 CST
From: stevec (Steve Christensen)
Message-Id: <8903071900.AA12000@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Archives
Status: RO

First:  I will be moving to new offices on March 8 and so
my machines will be down for a time.  If you send mail to me or
mathgroup, your message may get reflected back if there is a
problem getting my machines back on the network here.  Please
try again the next day if you have a problem.


I have placed several files in the MathGroup archives on
the ftp.ncsa.uiuc.edu (128.174.20.50) machine.  These are
available via anonymous ftp.  [Some of you - especially in
Europe - have problems getting to this machine using its name,
try ftp 128.174.20.50 instead.]

In the Symbolic/Mathematica/MathGroup_Mail_Archive will be a file called
MathGroupMail1 which will contain messages like this one, that is,
messages that go out to the mailing list.  I will continuously
add to this file until it contains about 50 messages, then I will
start MathGroupMail2, and so forth.

In the Symbolic/Mathematica/Sci.Math.Symbolic directory, I have placed files
called Archive1 and Archive2 which currently contain those Mathematica related
messages from the sci.math.symbolic newsgroup on the net and our
local uiuc.mathematica notesfiles.  Archive1 contains messages in
a digest form that appear from September 1988 to early February 1989.
Archive2 contains a second digest for February.  This is a service
for those of you who do not have access to sci.math.symbolic.

In Symbolic/Mathematica/Packages are two .m files, one .h file and
a pointer to the Cocklear package from Apple.

There are now over 300 email addresses on the MathGroup list, some of
which are mailboxes for whole insitutions like UC-Berkeley.  I am
in contact with some of the Mathematica vendor representatives and am
adding them to the list.  I hope to have every vendor have representatives
on the list so that they can be constantly aware of what is going on
in the Mathematica world.  We have a fair number of Mathematica experts
on the list. 

If you are doing significant work with Mathematica and would be willing
to talk about your application in your region of the world, please let
me an the mailing list know.  There is a demand for speakers for
local user groups, university departments and industrial research labs.

Finally, the usual reminder - The value of a user group and mailing list
comes from an active participation.  Please do not hesitate to send mail
on your applications, experiences, bugs, packages, etc. often.

Please pass this on to other Mathematica users who may not be on the
list yet.

Steve Christensen
steve@ncsa.uiuc.edu
14008@ncsavmsa.bitnet
mathgroup@wri.com

From stevec Mon Mar 13 14:05:17 1989
To: mathgroup
Subject: Modelling of vascular systems
Status: RO

[As messages come into the Mailing List that indicate Mathematica users
with specific interests, I will send them out so that users with similar
applications can communicate. --smc]

Hi!  i just read your 'news' listing about the mathematica mailing list.
I would like to be added to this list please.  I am involved in the
modelling of vascular systems at the capillary and arteriolar level and
I am trying to model oxygen transport mechanisms in muscle tissue.  I am
also interested in modelling blood vessel geometries and in the investigation
of 3D reconstructions of serial sections of electron microscope images of
the blood vessels.
Thanks for your anticipated cooperation, and I look forward to exciting
times with Mathematica.

                        Dev
 ...........................................................................
Devkumar R. Sainani                     Department of Medical Biophysics
Telephone:  (519) 661-3100  or          University of Western Ontario, and
            (519) 663-3799  or          John P. Robarts Research Institute
            (519) 663-5777 EXT. 4440    London, Ontario, Canada  N6A 5C1

Canada   :  Dev@uwovax.uwo.ca
BITNET   :  Dev@uwovax.bitnet
UUCP     :  Dev@julian.uucp
            (...!watmath!julian!Dev)


From stevec Mon Mar 13 14:08:44 1989
To: mathgroup
Subject: Mathematica/Hypercard Question
Status: RO

We are considering the possibility of using Mathematica on a Mac II
to build a marketing model workstation.  I have been told that it
might be possible to access Mathematica from within Hypercard.
Could you direct me to someone with experience (expertise) in that domain?

  Stephane

From lwyse@bucasb.BU.EDU Tue Mar 14 13:02:19 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA01239; Tue, 14 Mar 89 13:02:17 CST
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA22346; Tue, 14 Mar 89 12:59:57 CST
Return-Path: <lwyse@bucasb.BU.EDU>
Received: from bu-it.BU.EDU by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA22533; Tue, 14 Mar 89 12:59:51 CST
Received: from COCHLEA.BU.EDU by bu-it.BU.EDU (5.58/4.7)
	id AA24822; Tue, 14 Mar 89 13:55:35 EST
Received:  by cochlea.bu.edu (4.0/4.7)
	id AA01652; Tue, 14 Mar 89 13:55:51 EST
Date:  Tue, 14 Mar 89 13:55:51 EST
From: lwyse@bucasb.BU.EDU
Message-Id:  <8903141855.AA01652@cochlea.bu.edu>
To: steve@ncsa.uiuc.edu
Subject: mathematica/TeX question for mathgroup
Status: RO


I am having trouble "Splice"ing TeXForms into a Tex document.
Mathematica automatically converts even not-so-long expressions
into "short" form (abbreviating by elliding out middle terms and
replacing them with a count of them between angle brackets.) This
short form is then spliced into my TeX document in beautiful TeX 
notation. Has anybody foung an elegant solution to this?


thanx, lonce

From stevec Tue Mar 14 13:50:27 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA01319; Tue, 14 Mar 89 13:45:27 CST
Date: Tue, 14 Mar 89 13:45:27 CST
From: stevec (Steve Christensen)
Message-Id: <8903141945.AA01319@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: email address
Status: RO


Administrative note:

Some of you may be using the address

steve@spock.ncsa.uiuc.edu

or similar address with "spock" in it.  Please do not
use this address any longer.  Spock is a Sun-3 that
is being taken out of the mail line.  If you have used
this old address recently, it is likely that your mail
did not get to me.  From now on, if you used that old
address simply use steve@ncsa.uiuc.edu instead.

Steve Christensen
MathGroup


From stevec Wed Mar 15 10:56:58 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA02626; Wed, 15 Mar 89 10:55:30 CST
Date: Wed, 15 Mar 89 10:55:30 CST
From: stevec (Steve Christensen)
Message-Id: <8903151655.AA02626@yoda.ncsa.uiuc.edu>
To: mathgroup
Status: RO

>From att!twitch!rvk@uxc.cso.uiuc.edu
Subject: Mathematica and libm?

The following item was seen in a netnews group, and might
be of some interest to people in your area.  I coded the
program, and get essentially the same results.  while I don't
know whether the explanation supplied is correct or not, I am
wondering how something like this might affect packages like
Mathematica.
------------------------------------------------------------
If you use libm (especially trancendental functions sin(), cos(), ln(),
exp() etc..) you can get nearly a 10* speedup by using the clumsy code
inlining facility provided by Sun's C complier.

For example (on Sun 3/60, SunOS 4.0.1)

The following code:

	#include <math.h>

	main()
	{
		register int i;
		register double x, y;
		for(i = 0, x = 0; i < 100000; i++, x += 2*M_PI/100000.0)
			y = cos(x);
	}

Compiled with:
	cc -O -f68881 -o cos cos.c -lm

Runs in:
	real    0m30.16s
	user    0m24.56s
	sys     0m0.58s

Compiled with (but how incredibly *UGLY*):
	cc -O -f68881 -o cos cos.c /usr/lib/f68881/libm.il

Runs in:
	real    0m4.33s
	user    0m3.65s
	sys     0m0.20s

REASON:
	Although Sun went to the trouble of making the assembly inline
	file /usr/lib/f68881/libm.il, and a 68881 version of the
	maths library, they *DID NOT* make assembly versions of
	the maths functions to put into the maths library!
	(and similarly for the FPA)




From stevec Wed Mar 15 11:12:04 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA02663; Wed, 15 Mar 89 11:00:29 CST
Date: Wed, 15 Mar 89 11:00:29 CST
Message-Id: <8903151700.AA02663@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Re:  Archives
From: zolliker%math.ethz.ch@RELAY.CS.NET
Status: RO

[I would like to know from the European list members who has had success in
ftp'ing to the US and how they do it.  --- smc]

> ... [Some of you - especially in
> Europe - have problems getting to this machine using its name,
> try ftp 128.174.20.50 instead.] ...


Do you really think this works?
Is there any internet connection between Europe and the United States at all?

Urs



From stevec Wed Mar 15 22:53:24 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA03204; Wed, 15 Mar 89 22:50:18 CST
Date: Wed, 15 Mar 89 22:50:18 CST
From: stevec (Steve Christensen)
Message-Id: <8903160450.AA03204@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Dirac trace package
Status: RO


[From sci.math.symbolic - smc]

brooks                           Dirac traces             12:27 pm  Mar  2, 1989
(at maddog.llnl.gov)                                      (From News system)
 
Does anyone have a Dirac trace package for Mathematica?

brooks@maddog.llnl.gov, brooks@maddog.uucp, uunet!maddog.llnl.gov!brooks


From stevec Mon Mar 20 13:50:43 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA07498; Mon, 20 Mar 89 13:49:01 CST
Date: Mon, 20 Mar 89 13:49:01 CST
From: stevec (Steve Christensen)
Message-Id: <8903201949.AA07498@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Mathematica and Matrices (From sci.math.symbolic)
Status: RO


gmk                        Mathematica and matrices        9:25 pm  Mar 16, 1989(at wjh12.harvard.edu)                                    (From News system)
 


I have a Mathematica question.  I did the following:

In[1]:= y x . b - E[x . b]

            x.b
Out[1]:= -E     + yx.b

In[2]:= D[%,b]
    
            x.b
Out[2]:= -(E    (0.b + x.1)) + y(0.b + x.1)

Of course, this answer is right, but I would prefer if Mathematica 
knew that 0.b=0 and x.1=1, so that the above equation would be 
written as follows:
    
         x.b
     -x E    + yx

Does anyone know how to get Mathematica to do this?

Thanks in advance
Gary King

...........
: Gary King, Department of Government, Harvard University, Cambridge, MA  02138
                       harvard.edu,  BITnet: gmk@harvunxw,  Phone: 617-495-2027


From stevec Mon Mar 20 14:50:27 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA07571; Mon, 20 Mar 89 14:48:56 CST
Date: Mon, 20 Mar 89 14:48:56 CST
Message-Id: <8903202048.AA07571@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Fourier Transforms?
From: skankman@ux1.lbl.gov
Status: RO


I would be very interested in a symbolic fourier and inverse
fourier transform package.  Such a package is strangely absent from
the Sun Mathematica version to which I have access. Nor could I find 
one on the Mac.  

David Schurig
Lawrence Berkeley Lab   Bldg 70-157
1 Cyclotron Rd.
Berkeley, CA 94720

skankman@ux1.lbl.gov

From stevec Mon Mar 20 14:53:19 1989
To: mathgroup
Subject: Asymptotia
Status: RO


I am sure that M'ica does its sums in a very clever way, but it seems
to take some chances at the margin.

Consider the classical case of a divergent series, the asymptotic
expansion for the exponential integral (Whittaker and Watson,
chapter VIII): n! (-x)^n. M'ica (running on a Mac IIx, local kernel,
default settings) returns a finite result without warning for 
surprisingly large values of x:

x = 0.04934
Sum[n! (-x)^n, {n, 0, Infinity}] //N
0.954923

though, to be entirely fair, it does spot trouble for larger values:

x = 0.05
Sum[n! (-x)^n, {n, 0, Infinity}] //N
NLimit::dubious: The result from NLimit may be completely wrong.
0.954371

If the results of the ratio test are looked at properly (i.e.
nth ratio = (n+1) x, grows indefinitely large with n), this
series is seen to be divergent even at the smallest values of
x.  This sort of test picks out the divergent series that most
frequently occur in asymptotic expansions, and I wonder why it
has not been implemented.




From stevec Mon Mar 20 14:58:49 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA07601; Mon, 20 Mar 89 14:55:40 CST
Date: Mon, 20 Mar 89 14:55:40 CST
Message-Id: <8903202055.AA07601@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Mathematica bugs
From: knutm@ifi.uio.no
Status: RO

There is a simple bug in the Chebychev polynomial function
which I imagine others have also found.
Mathematica (version 1.1 on a Mac II) will tell you that the first degree
Chebychev polynomial of the first kind is the constant zero, i.e.,

ChebychevT[1,x] = 0

if I remember the syntax correctly.
This bug has already been reported to Wolfram Research.


A much more serious bug that I found was in the integer factorization routine
FactorInteger. According to Shawn Sheridan who is Manager of Technical Support
this bug has now been fixed in Wolfram Research's development version
and the fix will be included in the next release.

Below is an extract of the message I received from Dr. Sheridan
(dated March 18)



>Thank you for your bug report on Mathematica v1.1.  As you can see below, 
>the large integer bug has been fixed in our development version.  You 
>should be receiving this version in the spring.

>SunMathematica (sun3.fpa) 1.2-development (March 7, 1989) [With pre-loaded data]
>by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
>   S. Omohundro, D. Ballman and J. Keiper
>with I. Rivin and D. Withoff
>Copyright 1988 Wolfram Research Inc.
>-- Terminal graphics initialized --

>In[1]:= 536903681 107367629

>Out[1]= 57646075230342349

>In[2]:= PrimeQ[%]

>Out[2]= False

>In[3]:= FactorInteger[%1]

>Out[3]= {{107367629, 1}, {536903681, 1}}


In version 1.1, Mathematica claims that the product of the two integers
is prime.

Knut Morken
Institute of Informatics
University of Oslo
Norway
(knutm@ifi.uio.no)



From stevec Mon Mar 20 15:00:06 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA07605; Mon, 20 Mar 89 14:57:06 CST
Date: Mon, 20 Mar 89 14:57:06 CST
Message-Id: <8903202057.AA07605@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: control-c and modified Bessel function bugs
From: perry@pacific.mps.ohio-state.EDU
Status: RO

I wanted to report two bugs I've found in version 1.1 of Mathematica running on
a SUN 4/110.  During runaway calculations, if I use ^C and then try to abort
my calculation, my SUN crashes with a "watchdog reset" message. It is possible
that this problem is related to our local configuration of SUN's.

The second bug also exists in the Mac version of Mathematica. Try:

In[1]:= Plot[BesselK[1/2,x],{x,20,25}]

The resultant output looks like noise.  The problem exists for other values of
l, but I have not thoroughly tested other special functions.  The problem does
not seem to occur outside of a special region, making me suspect that a poor
marriage between different numerical algorithms has been made. I'm probably
naive, but it would seem worthwhile for Wolfram Research to compile a series of
tests which use tabulated results from Abromowitz and Stegun and other sources. 

Some things Mathematica can't do that I would like to see:

Limit[eps Gamma[eps],eps -> 0]

Limit[E^(-.2 x+1),x -> Infinity]  for Integrate[E^(1-0.2x),{x,0,Infinity}]

Integrate[x/(a+b x^2+c x^4),x]    --macsyma will do this

Integrate[x^2/(a+b x^2+c x^4),x]  -Gradshteyn & Ryzhik 2.161

Integrate[1/x^3/(a+b x)^(1/3),x]  -G&R 2.236

Integrate[1/Sqrt[a+b E^(m x)],x]  -G&R 2.315

Integrate[Sinh[a x+b] Sinh[c x+d],x]    G&R 2.425

Integrate[Sinh[a x] Sinh[b x] Cosh[c x],x]   G&R 2.426

Macsyma will do most of the above, but it is usually slower than
Mathematica.  There are many times when I want to find a Series about
Infinity, but am forced to introduce 1 over the original variable and
take a series about zero instead.

It is extremely unfortunate that the SUN version of Mathematica does not
contain a NOTEBOOK facility.  This cripples Mathematica to some extent.
It would also be great if the graphics windows on the SUN had some
walking menus that allowed the user to alter options, instead of having
to use Show.  How about using the mouse to set light sources and rotate
surfaces?  CPU speed isn't there yet, but I can dream.

Having finished bitching, let me say I love this program.  It's good
enough that it's constantly got me thinking about what the "perfect"
package would be.

Robert Perry
Dept. of Physics
The Ohio State University
perry@public.mps.ohio-state.edu
bitnet: perry@ohstpy
614-292-6506




From stevec Tue Mar 21 12:43:11 1989
To: mathgroup
Subject: Splicing into tex docs
Status: RO


I'm having touble using Splice["texdoc.mtex"] in that the expression
that I want is automatically converted to "short form" (many terms
left out and replaced by <<number>> which is then inserted into my
document in TeXForm! 
My not-so-elegant solution is to type the expression within Mathematica,
set a variable to it's TeXForm, Save the variable and then manually
edit it into my tex document. Hmmmm
Has anybody figured this one out?

Also, has anybody written a package that produces graphs in TeX notation?

OK, lonce

lwyse@bucasb.BU.EDU

From stevec Tue Mar 21 13:50:28 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA09421; Tue, 21 Mar 89 13:47:09 CST
Date: Tue, 21 Mar 89 13:47:09 CST
From: stevec (Steve Christensen)
Message-Id: <8903211947.AA09421@yoda.ncsa.uiuc.edu>
To: mathgroup
Status: RO

>From Jim_Wendel@ub.cc.umich.edu Tue Mar 21 06:19:52 1989
Subject: Re: Chebyshev "bug"

My Mac II version 1.04 of Mathematica gives the
correct answer x for ChebyshevT[1,x].  Your message referred to Chebychev...
Note slight difference in spelling!
My 1.04 version of Mathematica, running on a Mac II, thinks that the product
of your two large integers (9 digits each) is a prime.  Consistently then
it factors it as itself to the 1 power.
Plot[BesselK[1/2,x],{x,20,25}] came out beautifully, values from 0 down to
-0.0000175 on the vertical axis.

[It appears that there are some bugs in 1.1 that were not in 1.04 
on all machines.  I will try to report on these problems when 1.2
comes out.  If you do report bugs, please indicate always which
version of the software you are using and on what machine. --- smc]





From stevec Tue Mar 21 16:04:51 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA10039; Tue, 21 Mar 89 16:01:31 CST
Date: Tue, 21 Mar 89 16:01:31 CST
Message-Id: <8903212201.AA10039@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Re:  Mathematica and Matrices (From sci.math.symbolic)
From: maeder@symcom.math.uiuc.edu Tue Mar 21 13:54:43 1989
Status: RO

> I have a Mathematica question.  I did the following:
> 
> In[1]:= y x . b - E[x . b]
> 
>             x.b
> Out[1]:= -E     + yx.b

I don't understand how you got that output from your input.  E[expr]
gives just that, E[expr]. Didn't you mean E^expr or Exp[expr] ? Is your
example a verbatim copy of the session?

Roman Maeder
maeder@symcom.math.uiuc.edu




From stevec Wed Mar 22 14:26:58 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA12288; Wed, 22 Mar 89 14:23:16 CST
Date: Wed, 22 Mar 89 14:23:16 CST
Message-Id: <8903222023.AA12288@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: RE: BesselK[1/2,x]
From: Mike Monagan <mbmonagan@watcauchy.waterloo.edu>
Status: RO


> >From Jim_Wendel@ub.cc.umich.edu Tue Mar 21 06:19:52 1989
> Subject: Re: Chebyshev "bug"
> ...
> Plot[BesselK[1/2,x],{x,20,25}] came out beautifully, values from 0 down to
> -0.0000175 on the vertical axis.
=================================================
Except that BesselK[1/2,x] is positive for x > 0.
Abramowitz & Stegun, pp. 444, give a formula for
BesselK[1/2,x] in terms of Exp[-x] namely

	10.2.17.   sqrt(Pi/2/x) K(1/2,x) = Pi/2/x exp(-x)

from which you can deduce this.
I tried the Plot on our Mac II (version 1.1 of Mathematica)
and it gives random noise beyond x = 21.

Mike
mbmonagan@watcauchy.waterloo.edu




From norman@fermi Wed Mar 22 14:25:37 1989
Received: from fermi.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA12316; Wed, 22 Mar 89 14:25:36 CST
Return-Path: <norman@fermi>
Received: by fermi.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA10381; Wed, 22 Mar 89 14:17:37 CST
Date: Wed, 22 Mar 89 14:17:37 CST
From: norman@fermi (Mike Norman)
Message-Id: <8903222017.AA10381@fermi.ncsa.uiuc.edu>
To: maper@fermi
Subject: ethernet card for Steve Christensen
Cc: sc@fermi
Status: RO

Please take the ethernet card out of my Mac IIx and put it in 
Steve Christensen's machine.

Thanks, Mike

From stevec Wed Mar 22 14:32:34 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA12328; Wed, 22 Mar 89 14:30:38 CST
Date: Wed, 22 Mar 89 14:30:38 CST
Message-Id: <8903222030.AA12328@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Re:  Mathematica and Matrices (From sci.math.symbolic)
From: Jim_Wendel@ub.cc.umich.edu
Status: RO

Yes, the exponential forms don't e-mail very well.  E[...] is intended to 
be E^[...] or, equivalently, Exp[...].
I thought the differentiation in the other part of this example was strange.
The user wanted to differentiate with respect to b, but the dot-product
notation suggests that b is a vector, and then differentiation makes no
sense.  The answers obtained appear to assume that b is a number after all.
But then the notation is peculiar to say the least.

Jim_Wendel@ub.cc.umich.edu

From stevec Wed Mar 22 14:45:41 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA12344; Wed, 22 Mar 89 14:37:22 CST
Date: Wed, 22 Mar 89 14:37:22 CST
Message-Id: <8903222037.AA12344@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Orthogonal Polynomials
From: CLARK@ENH.NBS.GOV
Status: RO

Regarding your response to an apparent bug in Tschebischeff (that's
the way I like it!) polynomial evaluation:

I discovered problems with several of the orthogonal polynomial
packages in M'ica Beta Release 0.1 f31 of 6/1/88 (enhanced vers.) on
a Mac II with the System and Finder current at the time (early
June 1988).  These were reported to WRI in the beta tester notebook
format, sent on a floppy.  I regret that I do not seem to have
retained a copy of the corespondence, nor have I tried to reproduce
the problems in version 1.1.  The problems became manifest in the
evaluation of standard recurrence formulae, in which sums of polynomials
of different orders must vanish. 0.1 f31 did OK when evaluating
these numerically, but would screw up at some values of the 
argument, such as 1/2, where it did its arithmetic in the clever
way.  I seem to recall that the Hermite, Jacobi, and Laguerre
polynomials exhibited this difficulty.

Regards,

Charles Clark 
CLARK@ENH.NBS.GOV




From stevec Wed Mar 22 15:33:14 1989
To: mathgroup
Subject: please note
Status: RO

	
  Plot[BesselK[1/2,x],{x,20,25}] came out beautifully, values from 0 down to
                                          ^^^^^^^^^^^
  -0.0000175 on the vertical axis.
====================================
sounds funny, people may be reading this with a chuckle,
as the K function is positive in that range.  (Actually
positive for all x).

Gaston H Gonnet <ghgonnet@watdragon.waterloo.edu>


From stevec@yoda Thu Mar 23 11:31:22 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14217; Thu, 23 Mar 89 11:31:20 CST
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00157; Thu, 23 Mar 89 11:25:49 CST
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA12344; Wed, 22 Mar 89 14:37:22 CST
Date: Wed, 22 Mar 89 14:37:22 CST
Message-Id: <8903222037.AA12344@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: Orthogonal Polynomials
From: CLARK@ENH.NBS.GOV
Status: RO

Regarding your response to an apparent bug in Tschebischeff (that's
the way I like it!) polynomial evaluation:

I discovered problems with several of the orthogonal polynomial
packages in M'ica Beta Release 0.1 f31 of 6/1/88 (enhanced vers.) on
a Mac II with the System and Finder current at the time (early
June 1988).  These were reported to WRI in the beta tester notebook
format, sent on a floppy.  I regret that I do not seem to have
retained a copy of the corespondence, nor have I tried to reproduce
the problems in version 1.1.  The problems became manifest in the
evaluation of standard recurrence formulae, in which sums of polynomials
of different orders must vanish. 0.1 f31 did OK when evaluating
these numerically, but would screw up at some values of the 
argument, such as 1/2, where it did its arithmetic in the clever
way.  I seem to recall that the Hermite, Jacobi, and Laguerre
polynomials exhibited this difficulty.

Regards,

Charles Clark 
CLARK@ENH.NBS.GOV




From stevec@yoda Thu Mar 23 11:31:25 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14221; Thu, 23 Mar 89 11:31:23 CST
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00160; Thu, 23 Mar 89 11:25:51 CST
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA12460; Wed, 22 Mar 89 15:24:43 CST
Date: Wed, 22 Mar 89 15:24:43 CST
Message-Id: <8903222124.AA12460@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: please note
From: Gaston H Gonnet <ghgonnet@watdragon.waterloo.edu>
Status: RO

	
  Plot[BesselK[1/2,x],{x,20,25}] came out beautifully, values from 0 down to
                                          ^^^^^^^^^^^
  -0.0000175 on the vertical axis.
====================================
sounds funny, people may be reading this with a chuckle,
as the K function is positive in that range.  (Actually
positive for all x).

Gaston H Gonnet <ghgonnet@watdragon.waterloo.edu>
----- End Included Message -----


From stevec@yoda Thu Mar 23 11:31:26 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14223; Thu, 23 Mar 89 11:31:25 CST
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00163; Thu, 23 Mar 89 11:25:54 CST
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA12328; Wed, 22 Mar 89 14:30:38 CST
Date: Wed, 22 Mar 89 14:30:38 CST
Message-Id: <8903222030.AA12328@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: Re:  Mathematica and Matrices (From sci.math.symbolic)
From: Jim_Wendel@ub.cc.umich.edu
Status: RO

Yes, the exponential forms don't e-mail very well.  E[...] is intended to 
be E^[...] or, equivalently, Exp[...].
I thought the differentiation in the other part of this example was strange.
The user wanted to differentiate with respect to b, but the dot-product
notation suggests that b is a vector, and then differentiation makes no
sense.  The answers obtained appear to assume that b is a number after all.
But then the notation is peculiar to say the least.

Jim_Wendel@ub.cc.umich.edu

From stevec@yoda Thu Mar 23 11:31:30 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14230; Thu, 23 Mar 89 11:31:28 CST
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00166; Thu, 23 Mar 89 11:25:57 CST
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA10039; Tue, 21 Mar 89 16:01:31 CST
Date: Tue, 21 Mar 89 16:01:31 CST
Message-Id: <8903212201.AA10039@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: Re:  Mathematica and Matrices (From sci.math.symbolic)
From: maeder@symcom.math.uiuc.edu, Tue@yoda, Mar@yoda, 21@yoda, 54:43@13,
        1989@yoda
Status: RO

> I have a Mathematica question.  I did the following:
> 
> In[1]:= y x . b - E[x . b]
> 
>             x.b
> Out[1]:= -E     + yx.b

I don't understand how you got that output from your input.  E[expr]
gives just that, E[expr]. Didn't you mean E^expr or Exp[expr] ? Is your
example a verbatim copy of the session?

Roman Maeder
maeder@symcom.math.uiuc.edu




From stevec@yoda Thu Mar 23 11:31:32 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14234; Thu, 23 Mar 89 11:31:31 CST
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00169; Thu, 23 Mar 89 11:26:00 CST
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA09421; Tue, 21 Mar 89 13:47:09 CST
Date: Tue, 21 Mar 89 13:47:09 CST
From: stevec@yoda (Steve Christensen)
Message-Id: <8903211947.AA09421@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Status: RO

>From Jim_Wendel@ub.cc.umich.edu Tue Mar 21 06:19:52 1989
Subject: Re: Chebyshev "bug"

My Mac II version 1.04 of Mathematica gives the
correct answer x for ChebyshevT[1,x].  Your message referred to Chebychev...
Note slight difference in spelling!
My 1.04 version of Mathematica, running on a Mac II, thinks that the product
of your two large integers (9 digits each) is a prime.  Consistently then
it factors it as itself to the 1 power.
Plot[BesselK[1/2,x],{x,20,25}] came out beautifully, values from 0 down to
-0.0000175 on the vertical axis.

[It appears that there are some bugs in 1.1 that were not in 1.04 
on all machines.  I will try to report on these problems when 1.2
comes out.  If you do report bugs, please indicate always which
version of the software you are using and on what machine. --- smc]





From stevec@yoda Thu Mar 23 11:31:34 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14238; Thu, 23 Mar 89 11:31:33 CST
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00172; Thu, 23 Mar 89 11:26:02 CST
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA07587; Mon, 20 Mar 89 14:51:48 CST
Date: Mon, 20 Mar 89 14:51:48 CST
Message-Id: <8903202051.AA07587@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: Asymptotia
From: "Charles W. Clark, NIST, (301) 975-3738" <CLARK@ENH.NBS.GOV>
Status: RO


I am sure that M'ica does its sums in a very clever way, but it seems
to take some chances at the margin.

Consider the classical case of a divergent series, the asymptotic
expansion for the exponential integral (Whittaker and Watson,
chapter VIII): n! (-x)^n. M'ica (running on a Mac IIx
, local kernel,
default settings) returns a finite result without warning for 
surprisingly large values of x:

x = 0.04934
Sum[n! (-x)^n, {n, 0, Infinity}] //N
0.954923

though, to be entirely fair, it does spot trouble for larger values:

x = 0.05
Sum[n! (-x)^n, {n, 0, Infinity}] //N
NLimit::dubious: The result from NLimit may be completely wrong.
0.954371

If the results of the ratio test are looked at properly (i.e.
nth ratio = (n+1) x, grows indefinitely large with n), this
series is seen to be divergent even at the smallest values of
x.  This sort of test picks out the divergent series that most
frequently occur in asymptotic expansions, and I wonder why it
has not been implemented.




From stevec@yoda Thu Mar 23 11:31:36 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14242; Thu, 23 Mar 89 11:31:35 CST
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00175; Thu, 23 Mar 89 11:26:04 CST
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA07601; Mon, 20 Mar 89 14:55:40 CST
Date: Mon, 20 Mar 89 14:55:40 CST
Message-Id: <8903202055.AA07601@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: Mathematica bugs
From: knutm@ifi.uio.no
Status: RO

There is a simple bug in the Chebychev polynomial function
which I imagine others have also found.
Mathematica (version 1.1 on a Mac II) will tell you that the first degree
Chebychev polynomial of the first kind is the constant zero, i.e.,

ChebychevT[1,x] = 0

if I remember the syntax correctly.
This bug has already been reported to Wolfram Research.


A much more serious bug that I found was in the integer factorization routine
FactorInteger. According to Shawn Sheridan who is Manager of Technical Support
this bug has now been fixed in Wolfram Research's development version
and the fix will be included in the next release.

Below is an extract of the message I received from Dr. Sheridan
(dated March 18)



>Thank you for your bug report on Mathematica v1.1.  As you can see below, 
>the large integer bug has been fixed in our development version.  You 
>should be receiving this version in the spring.

>SunMathematica (sun3.fpa) 1.2-development (March 7, 1989) [With pre-loaded data]
>by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
>   S. Omohundro, D. Ballman and J. Keiper
>with I. Rivin and D. Withoff
>Copyright 1988 Wolfram Research Inc.
>-- Terminal graphics initialized --

>In[1]:= 536903681 107367629

>Out[1]= 57646075230342349

>In[2]:= PrimeQ[%]

>Out[2]= False

>In[3]:= FactorInteger[%1]

>Out[3]= {{107367629, 1}, {536903681, 1}}


In version 1.1, Mathematica claims that the product of the two integers
is prime.

Knut Morken
Institute of Informatics
University of Oslo
Norway
(knutm@ifi.uio.no)



From stevec@yoda Thu Mar 23 11:31:38 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14246; Thu, 23 Mar 89 11:31:37 CST
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00178; Thu, 23 Mar 89 11:26:06 CST
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA07498; Mon, 20 Mar 89 13:49:01 CST
Date: Mon, 20 Mar 89 13:49:01 CST
From: stevec@yoda (Steve Christensen)
Message-Id: <8903201949.AA07498@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: Mathematica and Matrices (From sci.math.symbolic)
Status: RO


gmk                        Mathematica and matrices        9:25 pm  Mar 16, 1989(at wjh12.harvard.edu)                                    (From News system)
 


I have a Mathematica question.  I did the following:

In[1]:= y x . b - E[x . b]

            x.b
Out[1]:= -E     + yx.b

In[2]:= D[%,b]
    
            x.b
Out[2]:= -(E    (0.b + x.1)) + y(0.b + x.1)

Of course, this answer is right, but I would prefer if Mathematica 
knew that 0.b=0 and x.1=1, so that the above equation would be 
written as follows:
    
         x.b
     -x E    + yx

Does anyone know how to get Mathematica to do this?

Thanks in advance
Gary King

...........
: Gary King, Department of Government, Harvard University, Cambridge, MA  02138
                       harvard.edu,  BITnet: gmk@harvunxw,  Phone: 617-495-2027


From stevec Thu Mar 23 12:06:26 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14278; Thu, 23 Mar 89 12:02:53 CST
Date: Thu, 23 Mar 89 12:02:53 CST
From: stevec (Steve Christensen)
Message-Id: <8903231802.AA14278@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Laplace Transforms on Mathematica
Status: RO

>From sci.math.symbolic:

[Note that some people who post to sci.math.symbolic are not members
of this mailing list.  So, in addition to sending replies to messages
to me to forward to the mailing list, you may want to reply in
sci.math.symbolic or directly to the author. I am posting sci.math.symbolic
messages here as a service to those of you who do not have access to
that newsgroup. -smc]

tca                   Laplace Transforms on Mathematica   12:21 pm  Mar 22, 1989(at ut-emx.UUCP)                                          (From News system)
 
Before I went ahead and created my own functions, I would like to see if
anyone else has created additional functions in the Laplace.m file in
Mathematica which handle more complicated transforms such as hyperbolic
and trigonometric functions.  The Mathematica release for the Macintosh
handles polynomials and exponential functions but that's about all.
Any additions to InverseLaplace.m would be welcome as well.

--------------------
Tobin C. Anthony
Department of Aerospace Engineering and Engineering Mechanics
University of Texas at Austin
e-mail : tca@gunaco.ae.utexas.edu
Office : 512-471-3681


From stevec@yoda Thu Mar 23 12:24:40 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14534; Thu, 23 Mar 89 12:24:39 CST
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00206; Thu, 23 Mar 89 12:19:08 CST
Return-Path: <stevec@yoda>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14278; Thu, 23 Mar 89 12:02:53 CST
Date: Thu, 23 Mar 89 12:02:53 CST
From: stevec@yoda (Steve Christensen)
Message-Id: <8903231802.AA14278@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: Laplace Transforms on Mathematica
Status: RO

>From sci.math.symbolic:

[Note that some people who post to sci.math.symbolic are not members
of this mailing list.  So, in addition to sending replies to messages
to me to forward to the mailing list, you may want to reply in
sci.math.symbolic or directly to the author. I am posting sci.math.symbolic
messages here as a service to those of you who do not have access to
that newsgroup. -smc]

tca                   Laplace Transforms on Mathematica   12:21 pm  Mar 22, 1989(at ut-emx.UUCP)                                          (From News system)
 
Before I went ahead and created my own functions, I would like to see if
anyone else has created additional functions in the Laplace.m file in
Mathematica which handle more complicated transforms such as hyperbolic
and trigonometric functions.  The Mathematica release for the Macintosh
handles polynomials and exponential functions but that's about all.
Any additions to InverseLaplace.m would be welcome as well.

--------------------
Tobin C. Anthony
Department of Aerospace Engineering and Engineering Mechanics
University of Texas at Austin
e-mail : tca@gunaco.ae.utexas.edu
Office : 512-471-3681


From stevec Fri Mar 24 15:50:24 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA16271; Fri, 24 Mar 89 15:48:08 CST
Date: Fri, 24 Mar 89 15:48:08 CST
Message-Id: <8903242148.AA16271@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Need help Solv[]ing equations
From: sdoyle@fed.frb.gov
Status: RO

Hi:
	I am trying to solve a system of four equations using Mathematica,
and Solve[] (and/or Reduce[]) are running out of memory. It is possible
that the equations have no solution. I'm using SunMathematica (sun3.68881) 
1.1 on a Sun 3/60.  I'd like to understand why Mathematica has difficulty
with this problem (it probably isn't Mathematica's fault.)  

	This set of equations is from two economists that don't have
access to Mathematica. They would like a solution, but I'm more interested
in how the algorithms work. Any hints/solutions/truth&beauty appreciated.

Part 1:How to create the out-of-memory error:

	I've attached the file SolveProblem.m below. After you
read the file in (e.g. <<SolveProblem.m) try either of the following:
	
This takes about half an hour
	> In[2]:= Solve[eqns,{w,x,y,z}]
	> Out of memory.

Also about half an hour (different session)
	> In[2]:= Reduce[Share[eqns], {w,x,y,z}]
	> Out of memory.

Share seems to simply to delay out-of-memory message. As an aside, Mathematica
doesn't seem to respond to Control-C after either Solve[] or Reduce[]
has been running a while (I did wait a few minutes to respond before 
killing the process). 


(******************* File SolveProblem.m  ************************)
(* 
	Small model that Solve[] has problems solving.
	
	Solve[eqns, {w,x,y,z}]
*)

eqns = {
	w x y z == 1/b^2,

	w x (y + z) + y z (w + x) ==
		- (c a + f g)/(a q  b^2 (f c + p d)),
	
	w (x + z)  +  y (w + x)   +   z (x + y)  ==
		(1 + 2 b a q (f c + p d))/ (a q b^2 (f c + p d)),

	w + x + y + z == -(f q + c a)/(b q a (f c + p d))
	}



(****************** End of file SolveProblem.m ************************)

Part 2: Various questions:

1. Why is this problem hard? 

2. Solve[] and Reduce[] are (to me) black boxes. If this were *my* problem
   I'd start by reducing the dimensions to three, and create some plots. Can
   others suggest a better search procedure? 

3. Are there ways of posing problems to Solve[] and Reduce[] that are 
   easier for them to solve? Since I don't know what the algorithms are
   doing internally, I don't know if the failure to find a solution is
   because
	a) The problem has no solution
	b) The algorithm doesn't deal with this class of problems, so
   	   I'm abusing the software
	c) I haven't RTFM closely enough


Thanks! 


 Sean Doyle    
 Board of Governors of the Federal Reserve System 
 20 and Constitution, NW
 Mail Stop 76
 Washington, DC 20551
 (202) 452-2352            
 uucp: uunet!fed!m1swd00 , internet: sdoyle@fed.frb.gov



From stevec Fri Mar 24 16:02:27 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA16300; Fri, 24 Mar 89 15:54:54 CST
Date: Fri, 24 Mar 89 15:54:54 CST
Message-Id: <8903242154.AA16300@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Some questions on Mac II version 1.1
From: munnari!merlin.bhpmrl.oz.au!tim@uunet.UU.NET (Tim Monks)
Status: RO

Steve,

I have a couple of questions about the Mathematica, (Mac II version 1.1) which
I hope either you or someone on the Mathematica mailing list can answer -
Australia is rather isolated & there aren't any Mathematica experts here (yet !!)
	
	1.  Our copy of version 1.1 does not have the ODE.m package for
	    solving differential equations.  Is this package available
	    yet, or is it to be released in a later version ?
	
	2.  How do we go about getting future updates to Mathematica ?
	    News of any upgrades takes a bit of time to filter out 
	    to Oz, we have got electronic mail and a hook into Usenet 
	    news, but not a Portal account.  Do you know if the Portal
	    system is functional in Australia so we can get access to 
	    Mathematica on-line services ?
	
	3.  We have a network of Apollo's and a Silicon Graphics Iris
	    at the labs as well as Macs.  Once Apollo get their act
	    together and release Mathematica we would like to run it
	    on our DN10000.  We have got both serial and ethernet links
	    between the Mac and the Apollo - will future versions of
	    Mathematica on the Mac support ethernet comms protocol or
	    will it be limited to serial links ?  Would there be any
	    advantage in high speed communication between a remote 
	    kernel and the front end ?
	
	4.  I read a review in the 16th. Feb. edition of Nature for
	    MathReader - a program for viewing Mathematica notebooks.
	    Is this just a utility for those unfortunate sods who
	    have not got Mathematica or does it do more tricks ?
	
I hope you can provide a few answers.  Many thanks for your time,
	
	




From stevec Fri Mar 24 16:03:55 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA16296; Fri, 24 Mar 89 15:53:33 CST
Date: Fri, 24 Mar 89 15:53:33 CST
Message-Id: <8903242153.AA16296@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: bug in cross product
From: mrk@athena.Princeton.EDU
Status: RO

There is a bug in the Mathematica Package CrossProduct.m. Following is a sample
session illustrating the problem:

In[1]:= <<CrossProduct.m

In[2]:= Cross[a,b]^2

              2
Out[2]= -a . b  + a . a b . b

Note that this is incorrect (in the first term the a should be squared).
If you do the following the answer comes out correct:

In[3]:= Cross[a,b] . Cross[a,b]

Out[3]= -a . (b a . b) + a . (a b . b)

Mark Dragovan
Physics Dept, Princeton University
mrk@athena.princeton.edu




From stevec@yoda Fri Mar 24 16:51:22 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA16326; Fri, 24 Mar 89 16:51:21 CST
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00772; Fri, 24 Mar 89 16:45:49 CST
Return-Path: <stevec@yoda>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA16271; Fri, 24 Mar 89 15:48:08 CST
Date: Fri, 24 Mar 89 15:48:08 CST
Message-Id: <8903242148.AA16271@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: Need help Solv[]ing equations
From: sdoyle@fed.frb.gov
Status: RO

Hi:
	I am trying to solve a system of four equations using Mathematica,
and Solve[] (and/or Reduce[]) are running out of memory. It is possible
that the equations have no solution. I'm using SunMathematica (sun3.68881) 
1.1 on a Sun 3/60.  I'd like to understand why Mathematica has difficulty
with this problem (it probably isn't Mathematica's fault.)  

	This set of equations is from two economists that don't have
access to Mathematica. They would like a solution, but I'm more interested
in how the algorithms work. Any hints/solutions/truth&beauty appreciated.

Part 1:How to create the out-of-memory error:

	I've attached the file SolveProblem.m below. After you
read the file in (e.g. <<SolveProblem.m) try either of the following:
	
This takes about half an hour
	> In[2]:= Solve[eqns,{w,x,y,z}]
	> Out of memory.

Also about half an hour (different session)
	> In[2]:= Reduce[Share[eqns], {w,x,y,z}]
	> Out of memory.

Share seems to simply to delay out-of-memory message. As an aside, Mathematica
doesn't seem to respond to Control-C after either Solve[] or Reduce[]
has been running a while (I did wait a few minutes to respond before 
killing the process). 


(******************* File SolveProblem.m  ************************)
(* 
	Small model that Solve[] has problems solving.
	
	Solve[eqns, {w,x,y,z}]
*)

eqns = {
	w x y z == 1/b^2,

	w x (y + z) + y z (w + x) ==
		- (c a + f g)/(a q  b^2 (f c + p d)),
	
	w (x + z)  +  y (w + x)   +   z (x + y)  ==
		(1 + 2 b a q (f c + p d))/ (a q b^2 (f c + p d)),

	w + x + y + z == -(f q + c a)/(b q a (f c + p d))
	}



(****************** End of file SolveProblem.m ************************)

Part 2: Various questions:

1. Why is this problem hard? 

2. Solve[] and Reduce[] are (to me) black boxes. If this were *my* problem
   I'd start by reducing the dimensions to three, and create some plots. Can
   others suggest a better search procedure? 

3. Are there ways of posing problems to Solve[] and Reduce[] that are 
   easier for them to solve? Since I don't know what the algorithms are
   doing internally, I don't know if the failure to find a solution is
   because
	a) The problem has no solution
	b) The algorithm doesn't deal with this class of problems, so
   	   I'm abusing the software
	c) I haven't RTFM closely enough


Thanks! 


 Sean Doyle    
 Board of Governors of the Federal Reserve System 
 20 and Constitution, NW
 Mail Stop 76
 Washington, DC 20551
 (202) 452-2352            
 uucp: uunet!fed!m1swd00 , internet: sdoyle@fed.frb.gov



From stevec@yoda Fri Mar 24 17:33:16 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA16394; Fri, 24 Mar 89 17:33:15 CST
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00779; Fri, 24 Mar 89 17:27:43 CST
Return-Path: <stevec@yoda>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA16300; Fri, 24 Mar 89 15:54:54 CST
Date: Fri, 24 Mar 89 15:54:54 CST
Message-Id: <8903242154.AA16300@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: Some questions on Mac II version 1.1
From: munnari!merlin.bhpmrl.oz.au!tim@uunet.UU.NET (Tim Monks)
Status: RO

Steve,

I have a couple of questions about the Mathematica, (Mac II version 1.1) which
I hope either you or someone on the Mathematica mailing list can answer -
Australia is rather isolated & there aren't any Mathematica experts here (yet !!)
	
	1.  Our copy of version 1.1 does not have the ODE.m package for
	    solving differential equations.  Is this package available
	    yet, or is it to be released in a later version ?
	
	2.  How do we go about getting future updates to Mathematica ?
	    News of any upgrades takes a bit of time to filter out 
	    to Oz, we have got electronic mail and a hook into Usenet 
	    news, but not a Portal account.  Do you know if the Portal
	    system is functional in Australia so we can get access to 
	    Mathematica on-line services ?
	
	3.  We have a network of Apollo's and a Silicon Graphics Iris
	    at the labs as well as Macs.  Once Apollo get their act
	    together and release Mathematica we would like to run it
	    on our DN10000.  We have got both serial and ethernet links
	    between the Mac and the Apollo - will future versions of
	    Mathematica on the Mac support ethernet comms protocol or
	    will it be limited to serial links ?  Would there be any
	    advantage in high speed communication between a remote 
	    kernel and the front end ?
	
	4.  I read a review in the 16th. Feb. edition of Nature for
	    MathReader - a program for viewing Mathematica notebooks.
	    Is this just a utility for those unfortunate sods who
	    have not got Mathematica or does it do more tricks ?
	
I hope you can provide a few answers.  Many thanks for your time,
	
	




From stevec Wed Mar 29 13:12:53 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA20547; Wed, 29 Mar 89 13:06:44 CST
Date: Wed, 29 Mar 89 13:06:44 CST
Message-Id: <8903291906.AA20547@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Re: Splicing into tex docs
From: dooley@ernie.berkeley.edu
Status: RO

Apparently the Splice command uses the PageWidth option
to control how to use the Short form.  So you can try:

Splice[ "test.mtex", PageWidth -> Infinity ]

to stop Splice from using the Short form at all.  The
option, and others, are listed, but not fully explained,
on page 688 of the Mathematica manual.

Sam Dooley
dooley@ernie.berkeley.edu




From stevec Wed Mar 29 13:14:27 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA20543; Wed, 29 Mar 89 13:05:11 CST
Date: Wed, 29 Mar 89 13:05:11 CST
Message-Id: <8903291905.AA20543@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Jobs at Wolfram Reseearch, Inc.
From: sueann@wri.com
Status: RO

                       Positions Available at

                       WOLFRAM RESEARCH, INC.


Wolfram Research, Inc. is seeking top-quality individuals in a number of
areas.  We are the developer of Mathematica, a system for doing mathematics, 
which runs on a range of computers from Macintosh and MS-DOS 386 systems 
to workstations and supercomputers.  We are based in Champaign, Illinois, and 
currently have about 55 employees, some of whom work from remote locations.


SOFTWARE ENGINEERING

Work on implementation of Mathematica  on a variety of computers. There are
openings for experts in several different environments.  At present, the
highest priorities are MacOS, VAX VMS, IBM mainframe systems and
supercomputer systems. 

Requirements:  At least two years of systems programming experience;  good 
problem-solving skills and attention to detail.


MATHEMATICAL DEVELOPMENT

Develop and implement mathematical algorithms, both in C and in the 
Mathematica  language. Current priorities include: numerical analysis, 
differential equations, and nonlinear optimization.

Requirements:  Ph.D. in mathematical sciences or equivalent;  ability to 
develop original mathematical algorithms; extensive programming 
experience.  Preferred:  Experience with C and very high-level languages.


STATISTICS DEVELOPMENT

Develop and implement statistical algorithms, primarily in the Mathematica 
language.

Requirements: Ph.D. in statistics or related area; broad knowledge of statistics
and its applications; ability to develop original ideas and algorithms in 
statistics; extensive programming experience.  Preferred:  Experience with 
Mathematica  or other very high-level languages.


GRAPHICS DEVELOPMENT

Develop and implement graphics algorithms in both hardware-independent 
and hardware-dependent code.  Special code for real-time graphics on various 
high-end graphics workstations is needed.

Requirements:  Extensive experience with graphics programming on a variety 
of computer systems; ability to interact effectively with hardware vendors; 
availability  for travel.  Preferred:  Documentation and graphic design skills.


SYSTEM ADMINISTRATION

Administer a network that includes at least one of nearly every personal
computer and workstation on the market.

Requirements: At least two years of UNIX systems programming experience; 
good organizational skills.


USER SUPPORT

Provide support to Mathematica  users, primarily by electronic mail
and telephone.

Requirments:  B.S. or equivalent; good mathematical skills; experience with a 
variety of computer software and hardware systems; good problem-solving,
verbal and written communication skills. Preferred:  Experience with 
Mathematica.  Part-time applicants will be considered.


SOFTWARE QUALITY ASSURANCE 

Identify, document and track bugs.  Coordinate software testing activities.
(Reports to Manager of User Support.)

Requirements:  B.S. or equivalent; good organizational skills and attention to 
detail; mathematical knowledge; experience with UNIX systems.


SOFTWARE PROJECT COORDINATION

Schedule and coordinate major software projects and releases. Involves
extensive interaction with company management, technical, and 
manufacturing staff, as well as computer manufacturers.

Requirements:  B.S. or equivalent; significant experience with UNIX; 
familiarity with a wide range of computer systems from personal computers
to supercomputers; two years of programming experience; a balance of 
technical and administrative ability; good interpersonal skills.  Preferred:  
Experience with a large software project.


TECHNICAL SALES

Present Mathematica  sales programs, both by telephone and at customer
sites, to corporate and university customers.

Requirements:  B.S. or equivalent; knowledge of applied mathematics; 
familiarity with a wide range of computer systems; excellent verbal, written, 
and interpersonal skills; availability for travel. Preferred: Two years of work 
experience in computer industry; two years of sales experience.


TECHNICAL SALES SUPPORT

Explain aspects of Mathematica to potential customers, primarily by
telephone. 

Requirements:  B.S. or equivalent; knowledge of applied mathematics;
experience with a variety of computer systems; excellent verbal skills.  
Preferred:  Sales experience.



Send resume to:

Amy Visentin
Wolfram Research, Inc.
201 W. Springfield Ave., 5th floor
P.O. Box 6059
Champaign, IL 61826

217-398-0700
fax: 217-398-0747

or send Email to:  resumes@wri.com  or  resumes%wri.com@uunet


3/24/89



From stevec@yoda Wed Mar 29 13:27:50 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA20553; Wed, 29 Mar 89 13:27:49 CST
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA03600; Wed, 29 Mar 89 13:22:10 CST
Return-Path: <stevec@yoda>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA20547; Wed, 29 Mar 89 13:06:44 CST
Date: Wed, 29 Mar 89 13:06:44 CST
Message-Id: <8903291906.AA20547@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: Re: Splicing into tex docs
From: dooley@ernie.berkeley.edu
Status: RO

Apparently the Splice command uses the PageWidth option
to control how to use the Short form.  So you can try:

Splice[ "test.mtex", PageWidth -> Infinity ]

to stop Splice from using the Short form at all.  The
option, and others, are listed, but not fully explained,
on page 688 of the Mathematica manual.

Sam Dooley
dooley@ernie.berkeley.edu




From stevec@yoda Wed Mar 29 13:28:01 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA20561; Wed, 29 Mar 89 13:27:59 CST
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA03603; Wed, 29 Mar 89 13:22:19 CST
Return-Path: <stevec@yoda>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA20543; Wed, 29 Mar 89 13:05:11 CST
Date: Wed, 29 Mar 89 13:05:11 CST
Message-Id: <8903291905.AA20543@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: Jobs at Wolfram Reseearch, Inc.
From: sueann@wri.com
Status: RO

                       Positions Available at

                       WOLFRAM RESEARCH, INC.


Wolfram Research, Inc. is seeking top-quality individuals in a number of
areas.  We are the developer of Mathematica, a system for doing mathematics, 
which runs on a range of computers from Macintosh and MS-DOS 386 systems 
to workstations and supercomputers.  We are based in Champaign, Illinois, and 
currently have about 55 employees, some of whom work from remote locations.


SOFTWARE ENGINEERING

Work on implementation of Mathematica  on a variety of computers. There are
openings for experts in several different environments.  At present, the
highest priorities are MacOS, VAX VMS, IBM mainframe systems and
supercomputer systems. 

Requirements:  At least two years of systems programming experience;  good 
problem-solving skills and attention to detail.


MATHEMATICAL DEVELOPMENT

Develop and implement mathematical algorithms, both in C and in the 
Mathematica  language. Current priorities include: numerical analysis, 
differential equations, and nonlinear optimization.

Requirements:  Ph.D. in mathematical sciences or equivalent;  ability to 
develop original mathematical algorithms; extensive programming 
experience.  Preferred:  Experience with C and very high-level languages.


STATISTICS DEVELOPMENT

Develop and implement statistical algorithms, primarily in the Mathematica 
language.

Requirements: Ph.D. in statistics or related area; broad knowledge of statistics
and its applications; ability to develop original ideas and algorithms in 
statistics; extensive programming experience.  Preferred:  Experience with 
Mathematica  or other very high-level languages.


GRAPHICS DEVELOPMENT

Develop and implement graphics algorithms in both hardware-independent 
and hardware-dependent code.  Special code for real-time graphics on various 
high-end graphics workstations is needed.

Requirements:  Extensive experience with graphics programming on a variety 
of computer systems; ability to interact effectively with hardware vendors; 
availability  for travel.  Preferred:  Documentation and graphic design skills.


SYSTEM ADMINISTRATION

Administer a network that includes at least one of nearly every personal
computer and workstation on the market.

Requirements: At least two years of UNIX systems programming experience; 
good organizational skills.


USER SUPPORT

Provide support to Mathematica  users, primarily by electronic mail
and telephone.

Requirments:  B.S. or equivalent; good mathematical skills; experience with a 
variety of computer software and hardware systems; good problem-solving,
verbal and written communication skills. Preferred:  Experience with 
Mathematica.  Part-time applicants will be considered.


SOFTWARE QUALITY ASSURANCE 

Identify, document and track bugs.  Coordinate software testing activities.
(Reports to Manager of User Support.)

Requirements:  B.S. or equivalent; good organizational skills and attention to 
detail; mathematical knowledge; experience with UNIX systems.


SOFTWARE PROJECT COORDINATION

Schedule and coordinate major software projects and releases. Involves
extensive interaction with company management, technical, and 
manufacturing staff, as well as computer manufacturers.

Requirements:  B.S. or equivalent; significant experience with UNIX; 
familiarity with a wide range of computer systems from personal computers
to supercomputers; two years of programming experience; a balance of 
technical and administrative ability; good interpersonal skills.  Preferred:  
Experience with a large software project.


TECHNICAL SALES

Present Mathematica  sales programs, both by telephone and at customer
sites, to corporate and university customers.

Requirements:  B.S. or equivalent; knowledge of applied mathematics; 
familiarity with a wide range of computer systems; excellent verbal, written, 
and interpersonal skills; availability for travel. Preferred: Two years of work 
experience in computer industry; two years of sales experience.


TECHNICAL SALES SUPPORT

Explain aspects of Mathematica to potential customers, primarily by
telephone. 

Requirements:  B.S. or equivalent; knowledge of applied mathematics;
experience with a variety of computer systems; excellent verbal skills.  
Preferred:  Sales experience.



Send resume to:

Amy Visentin
Wolfram Research, Inc.
201 W. Springfield Ave., 5th floor
P.O. Box 6059
Champaign, IL 61826

217-398-0700
fax: 217-398-0747

or send Email to:  resumes@wri.com  or  resumes%wri.com@uunet


3/24/89



From stevec@yoda Fri Mar 31 22:06:43 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA22782; Fri, 31 Mar 89 22:06:42 CST
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA04762; Fri, 31 Mar 89 22:00:59 CST
Return-Path: <stevec@yoda>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA22756; Fri, 31 Mar 89 20:59:21 CST
Date: Fri, 31 Mar 89 20:59:21 CST
Message-Id: <8904010259.AA22756@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: ftp in Europe
From: knutm@ifi.uio.no
Status: RO

[For those of you in Europe who have asked how some users there can
ftp to the Mathematica archive, here is one answer.   I will
try to provide an alternative for those of you who cannot arrange
something like this. --smc]

As you mentioned in your letter I have ftp'ed successfully to the MathGroup
archive. According to our local net guru this is possible since we are
connected to the NSF-net in the States (at the John von Neumann Computing
Center or something like that). At the moment, the only European countries
with this facility is Finland, Sweden, Denmark and Norway.
These countries share this connection.
Apparently, Holland will soon establish a similar link, and possibly also
France.

Hope this helps.

Knut Morken
knutm@ifi.uio.no

----- End Included Message -----


From stevec Mon Apr  3 16:51:27 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA25226; Mon, 3 Apr 89 16:39:53 CDT
Date: Mon, 3 Apr 89 16:39:53 CDT
From: stevec (Steve Christensen)
Message-Id: <8904032139.AA25226@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Dirac Algebra?
Status: RO


[I have heard from a number of users who want to know if
anyone has done a Dirac Algebra package in Mathematica.
Anyone out there know of one? -smc]

>From RDC@vms.cis.pittsburgh.edu Mon Apr  3 15:50:58 1989
>Subject: RE: Dirac Algegra
>To: stevec@ncsa.uiuc.edu
>X-Vms-To: IN%"stevec%ncsa.uiuc.EDU@unix.cis.pittsburgh.edu"
 
>Dear Steve,
 
>Earlier this year we discussed the question of Dirac algebra macros for
>Mathematica.  I am reaching the point of doing some more calculations
>which will require this sort of thing.  Has anything happened on this
>front?  I know there are other people who are interested in this, but
>I haven't been following the latest developments.  Could you please
>fill me in.

>Thanks,
>Bob Carlitz

From stevec@yoda Mon Apr  3 17:20:43 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA25307; Mon, 3 Apr 89 17:20:42 CDT
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA06431; Mon, 3 Apr 89 17:18:00 CDT
Return-Path: <stevec@yoda>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA25226; Mon, 3 Apr 89 16:39:53 CDT
Date: Mon, 3 Apr 89 16:39:53 CDT
From: stevec@yoda (Steve Christensen)
Message-Id: <8904032139.AA25226@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: Dirac Algebra?
Status: RO


[I have heard from a number of users who want to know if
anyone has done a Dirac Algebra package in Mathematica.
Anyone out there know of one? -smc]

>From RDC@vms.cis.pittsburgh.edu Mon Apr  3 15:50:58 1989
>Subject: RE: Dirac Algegra
>To: stevec@ncsa.uiuc.edu
>X-Vms-To: IN%"stevec%ncsa.uiuc.EDU@unix.cis.pittsburgh.edu"
 
>Dear Steve,
 
>Earlier this year we discussed the question of Dirac algebra macros for
>Mathematica.  I am reaching the point of doing some more calculations
>which will require this sort of thing.  Has anything happened on this
>front?  I know there are other people who are interested in this, but
>I haven't been following the latest developments.  Could you please
>fill me in.

>Thanks,
>Bob Carlitz

From stevec Mon Apr 17 12:53:39 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA11214; Mon, 17 Apr 89 12:35:26 CDT
Date: Mon, 17 Apr 89 12:35:26 CDT
Message-Id: <8904171735.AA11214@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Fourier Transform Package
From: Victor Sparrow <sparrow@osiris.cso.uiuc.edu>
Status: RO

[Here is a contributed package.  As with all future packages, please
report any problems you may have to the author first so that the
author may submit corrections.  Authors should give credit to
the persons locating problems.  Disagreements over the workings
of a package can be posted to the mailing list freely.

This package will be placed in the archive.   -smc]


				April 13, 1989
Dear Steve,
	Here is the symbolic Fourier transform package as
promised.  Please post to the appropriate notesfiles and
archives.  You are getting a shar(1) archive of two files:
Ft.m and Ft.doc.  I have developed this on a MacII using
Mathematica release 1.1.  Please contact me if you have any
questions or suggestions.

Best wishes,
Vic Sparrow
sparrow@osiris.cso.uiuc.edu

-----------Cut Here----------
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	Ft.m
#	Ft.doc
# This archive created: Thu Apr 13 15:43:43 1989
export PATH; PATH=/bin:/usr/bin:$PATH
if test -f 'Ft.m'
then
	echo shar: "will not over-write existing file 'Ft.m'"
else
cat << \SHAR_EOF > 'Ft.m'
(* Ft.m    copyright 1989  by Victor W. Sparrow *)

(* Permission is granted to copy the file provided
	that the copyright notice is left intact and the
	copies are not distributed commercially. *)

(* The author wishes to thank Roman Maeder, George
	Swenson, and Mike White, who helped in the
	development of this package.  Dr. Maeder for his
	help in the treatment of complex numbers in pattern
	matching, and Drs. Swenson and White for their
	encouragement and suggestions. *)

BeginPackage["Ft`"]

(* Version 9:  added Fta[], Ftb[], iFta[], iFtb[],
   conversion functions for alternate transform
   definitions. 04/10/89 *)
(* Version 8:  fixed delay with optional scaling for
   forward transforms. Also some other rearrangements.
   04/04/89 *)
(* Version 7:  fixed differentiation transforms
   and some other things on 03/27/89 *)
(* Version 6: more inverse transforms and many
   improvements to forward ones 03/23/89 *)
(* Version 5: started adding inverse transforms
   on 03/22/89 *)
(* Version 4: more usage statements, and additional
   improvements to many functions. 03/20/89 *)
(* Version 3: more forward transforms 03/03/89 *)
(* In version 2 Vic Sparrow, the author of this
   package, had a little help on complex numbers from
   Roman Maeder. 02/28/89 *)
   
Ft::usage = "Ft[expr,t,omega] gives the symbolic
 Fourier transform of expr in t space to omega space."
 
iFt::usage = "iFt[expr,t,omega] gives the symbolic
 inverse Fourier transform of expr in omega space to
 t space."
 
Fta::usage = "Fta[expr,t,omega] gives the symbolic
 Fourier transform of expr in t space to omega space.
 In this transform the 2 Pi appears in the exponent
 of the exponential function." 

iFta::usage = "iFta[expr,t,omega] gives the symbolic
 inverse Fourier transform of expr in omega space to
 t space.  In this transform the 2 Pi appears in the
 exponent of the exponential function." 

Ftb::usage = "Ftb[expr,t,omega] gives the symbolic
 Fourier transform of expr in t space to omega space.
 This transform includes Sqrt[2 Pi] as a scaling
 factor"
 
iFtb::usage = "iFtb[expr,t,omega] gives the symbolic
 inverse Fourier transform of expr in omega space to
 t space. This transform includes Sqrt[2 Pi] as a
 scaling factor."
 
convolution::usage = "convolution[a,b] is the convolution
 integral of a and b."
 
delta::usage = "delta[t] is the dirac delta function
 of t."

u::usage = "u[t] is the unit step function of t,
 u[t]=0 for t<0 and u[t]=1 for t>0."

rect::usage = "rect[t] is the rectagular function of t,
 rect[t]=1 for Abs[t]<1/2 and rect[t]=0 otherwise."

sinc::usage = "sinc[t] is the function Sin[t]/t."

triangle::usage = "triangle[t] is the triangular
 function of t, triangle[t]=1-Abs[t] for 
 Abs[t]<1 and triangle[t]=0 otherwise."  
  
Begin["`private`"]

(* Fourier Transform Section: *)  
(* constants *)
Ft[c_,t_,om_]:= 2 Pi c delta[om] /; FreeQ[c,t]

(* linearity *)
Ft[a_ + b_,t_,om_]:= Ft[a,t,om] + Ft[b,t,om]

(* pick off constants *)
Ft[c_ a_,t_,om_]:= c Ft[a,t,om] /; FreeQ[c,t]

(* frequency translation *)
Ft[a_ Exp[c_Complex omn_. t_],t_,om_]:=
 Ft[a,t,om-Im[c]omn] /;
	(FreeQ[omn,t] && Re[c]==0)

(* amplitude modulation *)
Ft[a_ Cos[omn_. t_],t_,om_]:= Ft[a,t,om+omn]/2 +
	Ft[a,t,om-omn]/2 /; FreeQ[omn,t]

(* time differentiation *)
Unprotect[Derivative]
Derivative/: Ft[Derivative[n_Integer?Positive][a_][t_],t_,om_]:=
 (I om)^n Ft[a[t],t,om] 
Protect[Derivative]
 
(* time convolution *)
Ft[convolution[a_,b_],t_,om_]:=
	Ft[a,t,om] Ft[b,t,om]

(* complex conjugate *)
Ft[Conjugate[a_],t_,om_]:= Conjugate[Ft[a,t,-om]]

(* sign function *)
Ft[Sign[t_],t_,om_]:= 2 / (I om)

(* delta function *)
Ft[delta[t_],t_,om_]:= 1

(* step function *)
Ft[u[t_],t_,om_]:= Pi delta[om] - I/om

(* complex exponential *)
Ft[Exp[c_Complex omn_. t_],t_,om_]:=
 2 Pi delta[om - Im[c]omn] /;
	(FreeQ[omn,t] && Re[c]==0)

(* cosine *)
Ft[Cos[omn_. t_],t_,om_]:= Pi(delta[om -omn] +
	delta[om+omn]) /; FreeQ[omn,t]

(* sine *)
Ft[Sin[omn_. t_],t_,om_]:= -I Pi(delta[om - omn] -
	delta[om+omn]) /; FreeQ[omn,t]

(* step exponential *)
Ft[Exp[c_?NumberQ con_. t_] u[t_],t_,om_]:=
 1/(-c con + I om) /;
	(FreeQ[con,t] && c<0 && Im[c]==0)

(* step exponential 2 *)
Ft[t_ Exp[c_?NumberQ con_. t_] u[t_],t_,om_]:=
 1/(-c con + I om)^2 /;
	(FreeQ[con,t] && c<0 && Im[c]==0)

(* double sided exponential *)
Ft[Exp[c_?NumberQ con_. Abs[t_]],t_,om_]:=
 -2 c con/((- c con)^2 + om^2) /;
	(FreeQ[con,t] && c<0 && Im[c]==0)

(* Gaussian:  c=-1/(2 sigma^2)  sigma=Sqrt[-1/2c]
	assume c<0 and sigma>0 *)
Ft[Exp[c_?NumberQ ccon_. t_^2],t_,om_]:=
 Sqrt[- Pi/(c ccon)] Exp[om^2/( 4 c ccon)] /;
	(FreeQ[ccon,t] && c<0 && Im[c]==0)

(* Sign in freq. domain. *)
Ft[Power[t_,-1],t_,om_]:= -I Pi Sign[om] /;
	FreeQ[c,t]

(* Rectangular fn. *)
Ft[rect[t_],t_,om_]:= sinc[om/2]

(* sinc fn. *)
Ft[sinc[t_],t_,om_]:= Pi rect[om/2]

(* Triangle fn. *)
Ft[triangle[t_],t_,om_]:=(sinc[om/2])^2

(* Very general rules should be last. *)
(* frequency differentiation *)
Ft[t_^n_. a_,t_,om_]:=
 I^n Derivative[n][ Ft[a,t,om] ][om] /;
 FreeQ[n,t] && n>0

(* multiplication by delta function *)
Ft[a_ delta[t_ + tnot_.],t_,om_]:=
 Limit[a Exp[-I om t],t->-tnot] /; FreeQ[tnot,t]
 
(* scaling *)
Ft[a_[alph_ t_],t_,om_]:= (1/Abs[alph]
 Ft[a[t],t,om/alph] /; FreeQ[alph,t] )

(* delay with optional scaling *)
Ft[a_[alph_. t_ + tnot_],t_,om_]:= (1/Abs[alph]
	Ft[a[t],t,om/alph] Exp[I tnot om / alph] /;
 FreeQ[alph,t] && FreeQ[tnot,t])
	 
(* frequency convolution for 2 *)
Ft[a_[t_] b_[t_],t_,om_]:=
	convolution[Ft[a[t],t,om],Ft[b[t],t,om]]/(2 Pi)
	
		
(* Inverse Fourier Transform Section: *)
(* constants *)
iFt[c_,t_,om_]:= c delta[t] /; FreeQ[c,om]

(* linearity *)
iFt[a_ + b_,t_,om_]:= iFt[a,t,om] + iFt[b,t,om]

(* pick off constants *)
iFt[c_ a_,t_,om_]:= c iFt[a,t,om] /; FreeQ[c,om]

(* one sided exponential *)
iFt[1/(c_ + I om_),t_,om_]:= Exp[-c t] u[t] /;
 FreeQ[c,om]

(* t and one sided exponential *)
iFt[1/(c_ + I om_)^2,t_,om_]:= t Exp[-c t] u[t] /;
 FreeQ[c,om]

(* double sided exponential *)
iFt[1/(c_ + om_^2),t_,om_]:= ( Exp[-Sqrt[c] Abs[t]]
 /(2 Sqrt[c]) /; FreeQ[c,om] )
 
(* Gaussian *)
(* c=-sigma^2/2)  sigma=Sqrt[-2c]
	assume c<0 and sigma>0 *)
iFt[Exp[c_?NumberQ ccon_. om_^2],t_,om_]:=
 Exp[t^2/(4 c ccon)]/(2 Sqrt[-Pi c ccon]) /;
	(FreeQ[ccon,om] && c<0 && Im[c]==0)

(* Sign[] in time *)
iFt[1/om_,t_,om_]:= I Sign[t]/2

(* Sign[] for frequency *)
iFt[Sign[om_],t_,om_]:= I/(Pi t)

(* delta function *)
iFt[delta[om_],t_,om_]:= 1/( 2 Pi)

(* sine: this could be improved *)
iFt[delta[om_-omnot_]-delta[om_+omnot_],t_,om_]:=
 I Sin[omnot t]/Pi /; FreeQ[omnot,om]
 
(* cosine: this could be improved *)
iFt[delta[om_-omnot_]+delta[om_+omnot_],t_,om_]:=
 Cos[omnot t]/Pi /; FreeQ[omnot,om]

(* sinc function *)
iFt[sinc[om_],t_,om_]:= rect[t/2]/2 
 
(* rect function *)
iFt[rect[om_],t_,om_]:= sinc[t/2]/(2 Pi) 

(* sinc squared *)
iFt[sinc[om_ tau_.]^2,t_,om_]:=
 triangle[t/(2 tau)]/(2 tau) /; FreeQ[tau,om]
 
(* time differentiation *)
iFt[om_^n_. a_,t_,om_]:=
 (-I)^n Derivative[n][ iFt[a,t,om] ][t] /;
 FreeQ[n,om] && n>0
 
(* frequency differentiation *)
Unprotect[Derivative]
Derivative/: iFt[Derivative[n_Integer?Positive][a_][om_],t_,om_]:=
 (t/I)^n iFt[a[om],t,om]
Protect[Derivative]
  
(* general rules last *)
(* multiplication by delta function *)
iFt[a_ delta[om_ + omnot_.],t_,om_]:=
 Limit[a Exp[I om t]/(2 Pi),om->-omnot] /; FreeQ[omnot,om]
 
(* scaling *)
iFt[a_[alph_ om_],t_,om_]:=
 ( iFt[a[om],t/alph,om]/Abs[alph] /; FreeQ[alph,om] )
 
(* frequency translation *)
iFt[a_[om_ + omnot_],t_,om_]:=
 iFt[a[om],t,om] Exp[-I omnot t]/;
 FreeQ[omnot,om]  

(* time translation *)
iFt[a_[om_] Exp[c_Complex tnot_. om_],t_,om_]:=
 iFt[a[om],t + Im[c] tnot, om] /;
 FreeQ[tnot,om] && Re[c]==0
 
(* frequency multiplication *)
iFt[a_[om_] b_[om_],t_,om_]:=
 convolution[iFt[a[om],t,om],iFt[b[om],t,om]]
  
(* Alternative definition transform section. *)
(* Alternative a:  2Pi only in exponent of expoentials. *)
Fta[a_,t_,om_]:=Ft[a,t,2 Pi om]
iFta[a_,t_,om_]:=iFt[2 Pi a, 2 Pi t, om]

(* Alternative b:  Sqrt[2 Pi] appears in both forward and
  inverse trasforms. *)
Ftb[a_,t_,om_]:=Ft[a,t,om]/Sqrt[2 Pi]
iFtb[a_,t_,om_]:=Sqrt[2 Pi] iFt[a,t,om]

End[]
EndPackage[]
SHAR_EOF
fi
if test -f 'Ft.doc'
then
	echo shar: "will not over-write existing file 'Ft.doc'"
else
cat << \SHAR_EOF > 'Ft.doc'
Ft: a symbolic Fourier transform package for Mathematica

by Victor W. Sparrow
   Dept. of Electrical and Computer Engineering,
   University of Illinois, Urbana-Champaign
   and USA-CERL Acoustics Team, Champaign, IL
   April 13, 1989

Ft is a Mathematica package written to perform symbolic forward and
inverse Fourier transforms.  To load this package into Mathematica,
type the following at a Mathematica prompt:

	<<Ft.m

Then, for example, to take the symbolic Fourier transform of
Exp[-a t] u[t] one types:

	Ft[Exp[-a t] u[t],t,omega] .

Further, to find the inverse transform of 1/(a + omega) one can type:

	iFt[1/(a + omega),t,omega] .

These two examples demonstrate common specific uses of this package.
The general format to perform a forward transform is

	Ft[expression of domain 1, domain 1 variable, domain 2 variable]

and for an inverse transform is

	iFt[expression of domain 2, domain 1 variable, domain 2 variable] .

The Ft package is simplistic in its construction, and it can only find
symbolic Fourier transforms and inverses commonly found in the tables
of mathematical handbooks.
  The Ft package knows how the following standard engineering
functions are used in transforms:

	u[t], the unit step function: u[t]=1 for t>0
                                      u[t]=0 for t<0
	delta[t], the Dirac delta function
	rect[t], the rectangular function: rect[t]=1 for Abs[t] < (1/2)
                                           rect[t]=0 otherwise
	sinc[t], the Sin[t]/t function, and
	triangle[t], the triangular function: triangle[t] = 1 - Abs[t]
                                                for Abs[t] < 1
                                              triangle[t] = 0 otherwise

Ft.m, however, does not know the properties of these functions
if they are not used in Fourier transforms.  In addition, Ft.m knows
about certain mathematical operations such as convolution.

	Ft[convolution[a[t],b[t]],t,omega]

gives the Fourier transform of the convolution of the functions of a[t]
and b[t].
  The Fourier transform pair

               Infinity
                  /      -I omega t
        F[omega]= | f[t] e          dt
                  /
              -Infinity

               Infinity
              1   /           I omega t
       f[t]= ____ | F[omega] e          d omega
             2 Pi /
              -Infinity

is implicitly used in this package.  The way the package is written,
however, the integral forms of these expressions are never referred to
in Ft.m.  Ft.m will not help Mathematica in evaluating expressions like

	Integral[f[t] Exp[-I omega t],{t,-Infinity,Infinity}]

which Mathematica cannot handle alone.  All of the calculations in Ft.m
use the above Fourier transform pair.  If one prefers the pair

               Infinity
                  /      -I 2 Pi nu t
           F[nu]= | f[t] e           dt
                  /
              -Infinity

               Infinity
                  /        I 2 Pi nu t
            f[t]= | F[nu] e           d nu
                  /
              -Infinity

he can use

	Fta[expression in domain 1, domain 1 variable, domain 2 variable]

and

	iFta[expression in domain 2, domain 1 variable, domain 2 variable] .

This usage merely converts the expressions to the Ft[] and iFt[] format
and evaluates the expressions.  Note:  the way this is implemented means
that if one takes the Fta[] of some complicated expression, the answer
may be in terms of the Ft[] of simple expressions.  Similarly one can
use the Fourier transform pair

                         Infinity
                     1      /      -I omega t
        F[omega]=__________ | f[t] e          dt
                 Sqrt[2 Pi] /
                        -Infinity

                         Infinity
                    1       /           I omega t
           f[t]=__________ | F[omega] e          d omega
                Sqrt[2 Pi] /
                        -Infinity

using the general forms

	Ftb[expression in domain 1, domain 1 variable, domain 2 variable]

and

	iFtb[expression in domain 2, domain 1 variable, domain 2 variable]

although again the resultant expressions may be in terms of Ft[] and iFt[].
  Often to get the inverse Fourier transform of a complicated expression
in the frequency domain, the user will need to do some processing in
Mathematica outside of Ft.m.  For instance Apart[] is useful for breaking
ratios of polynomials into sums of terms with simple denominators.
(Partial fraction expansion.)
  Comments on this package from users would be helpful.  Please
contact Victor W. Sparrow at sparrow@osiris.cso.uiuc.edu via E-mail.

SHAR_EOF
fi
exit 0
#	End of shell archive


----- End Included Message -----


From stevec Tue Apr 18 14:05:37 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA01484; Wed, 5 Apr 89 12:04:41 CDT
Date: Wed, 5 Apr 89 12:04:41 CDT
Message-Id: <8904051704.AA01484@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Re: Dirac Algebra In Mathematica
From: petti@ALLEGHENY.SCRC.Symbolics.COM
Status: RO

    >From RDC@vms.cis.pittsburgh.edu Mon Apr  3 15:50:58 1989
    >Subject: RE: Dirac Algegra
    >To: stevec@ncsa.uiuc.edu
    >X-Vms-To: IN%"stevec%ncsa.uiuc.EDU@unix.cis.pittsburgh.edu"
 
    >Dear Steve,
 
    >Earlier this year we discussed the question of Dirac algebra macros for
    >Mathematica.  I am reaching the point of doing some more calculations
    >which will require this sort of thing.  Has anything happened on this
    >front?  I know there are other people who are interested in this, but
    >I haven't been following the latest developments.  Could you please
    >fill me in.

    >Thanks,
    >Bob Carlitz

I am just finishing a general tensor package to do universal, Clifford,
symplectic, Grassmann, and enveloping Lie algebras in MACSYMA. Dirac is a
special case of Clifford at this level, but this package operates without
choosing a matrix representation. The matrix version is another job.

What do you want in the package? I assume a matrix representation with the basic
operations, such as hermitian conjugation, particle conjugation etc.?

Dick Petti
petti@symbolics.com
petti@scrc-stony-brook.arpa


----- End Included Message -----


From stevec Tue Apr 18 15:05:05 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05961; Tue, 11 Apr 89 19:43:51 CDT
Date: Tue, 11 Apr 89 19:43:51 CDT
From: stevec (Steve Christensen)
Message-Id: <8904120043.AA05961@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Mathematica and the complex plane
Status: RO


>From @VMD.CSO.UIUC.EDU:zaccone@sol.bucknell.edu Tue Apr 11 16:04:44 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05896; Tue, 11 Apr 89 16:04:42 CDT
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA24390; Tue, 11 Apr 89 16:02:06 CDT
Received: from VMD.CSO.UIUC.EDU by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA12119; Tue, 11 Apr 89 16:02:02 CDT
Received: from BKNLVMS.BITNET by VMD.CSO.UIUC.EDU (IBM VM SMTP R1.2) with BSMTP id 2679; Tue, 11 Apr 89 16:02:03 CDT
Return-Path: zaccone%sol.bucknell.edu@VMD.CSO.UIUC.EDU
Received: from rigel.bucknell.edu by BKNLVMS.BITNET; Tue, 11 Apr 89 16:57 EDT
Received: by rigel.bucknell.edu (4.0/SMI-3.2) id AA04064; Tue, 11 Apr 89
 16:56:03 EDT
Date: Tue, 11 Apr 89 16:56:03 EDT
From: Rick Zaccone <zaccone%sol.bucknell.edu@VMD.CSO.UIUC.EDU>
Subject: Mathematica and the complex plane
To: steve@ncsa.uiuc.edu
Message-Id: <8904112056.AA04064@rigel.bucknell.edu>
Status: R

Could you please forward this to sci.math.symbolic and anywhere else
that seems appropriate?

I would like to know how to get Mathematica to produce plots in the
complex plane.  For example, if x is complex, how do I graph the
following on the complex plane?

Abs[ 1 + x + x^2/2] == 1

Rick Zaccone
zaccone@bknlvms.bitnet
zaccone@rigel.bucknell.edu


From stevec Tue Apr 18 16:01:53 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA06041; Tue, 11 Apr 89 22:08:46 CDT
Date: Tue, 11 Apr 89 22:08:46 CDT
From: stevec (Steve Christensen)
Message-Id: <8904120308.AA06041@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Mathematica machines and prices
Status: RO


Here is the latest list I have received:

>From wri!leslie@uxc.cso.uiuc.edu Tue Apr 11 11:47:54 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05855; Tue, 11 Apr 89 11:47:52 CDT
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA23575; Tue, 11 Apr 89 11:45:17 CDT
Return-Path: <wri!leslie@uxc.cso.uiuc.edu>
Received: from uxc.cso.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA07426; Tue, 11 Apr 89 11:45:13 CDT
Received: from wri.UUCP by uxc.cso.uiuc.edu with UUCP
	(5.61+/IDA-1.2.8) id AA21753; Tue, 11 Apr 89 10:10:47 -0500
From: wri!leslie@uxc.cso.uiuc.edu
Received: by WRI.com (3.2/SMI-3.0DEV3)
	id AA21610; Tue, 11 Apr 89 09:51:40 CDT
Message-Id: <8904111451.AA21610@WRI.com>
Date: Tue, 11 Apr 89 09:51:37 CDT
To: steve@ncsa.uiuc.edu
Status: R

EDUCATIONAL MATHEMATICA PRICE LIST
April, 1989  Prices subject to change without notice

SYSTEM                      STANDARD  EDUCATIONAL   SPECIFICATIONS
 VERSION                     PRICE     PRICE


Apollo          
======
    
DN 3000, 3500,                $2,400   $1,600   Runs under SR9.7 or
4000 & 4500                                     SR10.  Supports Display
                                                Manager window system.
    					        Distributed on 1/4" tape.

Cray
====

Cray X-MP                   $160,000  $96,000	Runs under UNICOS.
Cray Y-MP    	            $240,000 $144,000   Available Q3 1989. 
Cray 2    		    $240,000 $144,000


DEC
===

VAXstation, MICROVAX 2000     $2,400   $1,600   VMS and ULTRIX versions 
MICROVAX II, 730              $4,800   $2,900   available for all VAX 
750, 78X, 82XX                $8,600   $5,200   systems.  Runs under 
8300, 8350, 6210                                ULTRIX on DECstation 
   MICROVAX 3500, 3600       $12,600   $7,600   3100.  Distributed on 
8530, 8550, 86XX, 8700,                         9 track tape.
   8810, 6200, 6230          $18,000  $11,000   
8800, 8820, 8830,
   8840, 8842, 8974, 6240    $42,000  $25,000
DECstation 3100               $2,800   $1,800


Hewlett-Packard
===============    
    
HP 9000/300 Series            $2,400   $1,600   Supports X Windows.  For 
HP 9000/825 & 835             $6,200   $3,700   Series 300, requires HP
HP 9000/840, 850 & 855       $11,800   $7,100   ID module.  Distributed
        		         		on HP 16 TRACK 1/4" tape.


MIPS    	
====
	
M/120     		      $5,200   $3,100   Requires operating system 
M/1000 & M/2000               $8,600   $5,200   3.1 or higher.
						Includes X Windows
						driver.  Distributed on
						1/4" tape.

Silicon Graphics
================
	
Personal Iris                 $2,800   $1,800   Runs under operating
Iris-4D/50 through 80GT       $6,200   $3,700   system release 3.5
Iris-4D/120S through 240GTX   $7,800   $4,700   or 4.  Runs under X
             					and 4Sight network
   					        window systems.
						Includes real-time 3D
						graphics rendering
						package.  Distributed
					        on 1/4" tape.

Sony    
====
   
NEWS 700, 800, 1700, 1800      $2,400   $1,600  Runs under X Windows.
NEWS 1900                      $3,400   $2,200  Distributed on 3 1/2"
                                                diskettes.

Sun
===
Sun-3   		      *$1,800	  $995  Runs under SunView, 
Sun-4 and compatibles          $2,400   $1,600  NeWS and X Windows
Sun386i   		       $2,400	$1,600  network window
   					        systems.  On Sun-3,
                                                supports 68881 and FPA
                                                numeric coprocessors.
                                                For Sun-3 and
        					Sun-4: distributed on
        					1/4" cartridge tape.
						For Sun-386i:
						distributed on DSDD
						diskettes.
                    
    					        *Special introductory
    					         price; expires July 1,
    					         1989.  Regular price
                    	                         $2250/$1395.


   ==================================================================

Apple  
=====
	
Macintosh Standard Version          $495         2.5 megabytes memory
                                                 required; 4 megabytes
Macintosh Enhanced Version                       recommended. 
(numeric coprocessor required)      $795         2 megabytes suffice if a
                                                 virtual memory system
                                                 is used.  Supports
                                                 Mathematica Notebook
                    	                         user interface.
                                                 Supports connectivity
                                                 to remote Mathematica
                                                 kernel.


MS-DOS Systems
====== =======
	
386 Version                        $695         640k memory & 1 megabyte 
                                                extended memory required.
386/7 Version                                   Supports CGA, EGA, VGA and
(287 or 387 coprocessor required)  $995	        Hercules graphics standards, 
                                                Postscript, Laserjet,  
386/Weitek                                      Epson FX and  
(Weitek coprocessor required)    $1,295         Toshiba P3 compatible          
						printers.
   

     ================================================================


General Information	
======= ===========
	
All versions include a hardbound copy of the book, "Mathematica: A
System for Doing Mathematics by Computer," together with
version-specific documentation.

All workstation versions include T4010 and character-based graphics
support, as well as support for PostScript-based printers.

Prices are inclusive of shipping within the U.S.  Shipping charges will
be added for destinations outside the U.S.  All prices are in U.S.
dollars.  Credit terms are subject to approval.

Volume discounts are available on selected workstations for quantities
of 10 and above.  Educational discounts are available for accredited
universities and colleges.

Upgrade contracts are available.

Wolfram Research, Inc.
P.O. Box 6059
Champaign, IL  61826
Telephone:    217-398-0700
Fax:          217-398-0747
Orders only:  800-441-MATH	

Mathematica is a trademark of Wolfram Research, Inc.  
All other trademarks are trademarks of their respective companies.



From stevec Thu Apr 20 10:06:35 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA04358; Thu, 20 Apr 89 09:48:49 CDT
Date: Thu, 20 Apr 89 09:48:49 CDT
Message-Id: <8904201448.AA04358@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Remote kernel via Ethernet from a Macintosh
From: Stein Arild Stromme
 <stromme%rose.uib.uninett%NORUNIX.BITNET@CUNYVM.CUNY.EDU>
Status: RO

Is there a way to run the Mac Mathematica front end and
a remote kernel over an Ethernet? The options given in
the communications window don't seem to support this.

Also: can the Mac front end be purchased separately?
My Mac II version front end crashes on a Mac Plus, even
though I make no attempt to load any kernel at all. Why
is there a difference in the front ends between the two
Mac versions?

As a matter of curiosity, I would like to know how many
Cray versions have been sold, educational discount or not!

Stein Arild Stromme
Mathematics
Bergen University
<stromme@rose.uib.uninett>




From stevec Thu Apr 20 12:07:54 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA04677; Thu, 20 Apr 89 11:40:15 CDT
Date: Thu, 20 Apr 89 11:40:15 CDT
Message-Id: <8904201640.AA04677@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Bug reports
From: wadej@Sun.COM
Status: RO

[Here are some bug reported by:
		 
		James F. Wade
		wadej@sun.com

at Sun Microsystems. Many of these may already be fixed in
the 1.2 release. -smc]


Here is a summary of the SunMathematica bugs that we know about at Sun:

 Bug Id			SUMMARY

1014637:  Shading does not work on a monochrome 386i.

1014657:  Segmentation violation on large calulation on 3/60.
		Large calculations using large amounts of memory may fail
		with a Segmentation violation.

1014678:  Prompt displayed at the wrong time on a regular terminal.
	When a plot is done on a regular terminal, the prompt for the next
	equation is displayed before the plot is made on the screen.

1014679:  There are drawing problems when dispaying a Torus.
	Some "glitches" appear in the inside, lower part of a Torus graph. This
	appears on both Sunview and NeWS.

1014680:  When running "suntools -i", most plots are invisible.

1014681:  NeWS will freeze on very high resolution Mathematica graphs.
	This is a known NeWS problem.

1017088:  The Gosper.m summation example does not work
	The following may serve as a work-around for SOME cases only:
	qn = Expand[ Numerator[rat]];   <<<<<< Add Expand here
	rn = Expand[ Denominator[rat]]; <<<<<< Add Expand here

1017089:  ODE.m and Fourier.m are documented but files are missing.

1017090:  'foption' used in 'math' script, but it only under 4.0
	The main script 'math' uses 'foption' which only is available
	under 4.0 and NOT under 3.5. So the script can fail.	
	Work around:
	Copy 'foption' from the 'common' directory under the main
	mathematica directory into some directory that is on the path.

1018441:  No X11 postscript driver for Sun4 running 4.0
	If a Sun4 driver for x11 is used, the Mathematica output must be
	piped through ../math/common/Utilities/psfix to expand the
	WRI macros to standard postscript.

1018450:  Interface between C language and Mathematica is ackward.
	Calling mathematica from a C main is ackward.  Arguments
	must be passed through a pipe in text form.

101845*******
	exit Mathematica or exit sunview to restore windows.  The unix
	Kernal can be reconfigured to allow more windows.

1018470:  mathlink.c does not work for more than 2 arguments.
	Routines provided to call C from Mathematica only work for 
	Functions with exactly 1 or 2 arguments.

1018536:  Simplify fails dby0: Division by zero on complex expressions.
	Description:
	eq1 =
	  Times[vt, Power[Plus[1, Times[-1, ut]], -1], 
           Power[Plus[1, Times[-1, 
              Plus[1, Times[-1, Power[Plus[1, Times[-1, ut]], m]]]]], m]]
	  eq1s = Simplify[eq1 ] 
	(* Fails    General::dby0: Division by zero.   *)
	Work around:
	The simplification can be done using /.   command to reduce
	complexity of expression.
	In[5]:= eq2 = Simplify[ eq1 /. 1-ut -> mu] /. mu -> 1-ut
	                         2
	                   -1 + m
	Out[5]= vt (1 - ut)

1018541:  Chop does not work with two arguments.
	 Work around:
	Define for Two arguments
	In[12]:= ClearAttributes[Chop,Protected]
	In[13]:= Chop[x_,d_] = If[Abs[x]<d,0,x]
	In[14]:= SetAttributes[Chop,Protected]
	Or use  SetOptions to Change Tolerance
	In[19]:= SetOptions[Chop,Tolerance -> .00001]

1018605:  on the sun4 multiple application of Transformation fails
	 Description:
	In[1]:= f/: f[x_] f[y_] := f[x y]
	In[2]:= f[x] f[y] f[1]
	Out[2]= f[x]		<<<< WRONG should be f[x y]
	In[3]:= f[x] f[y] f[z]
	Segmentation fault

1018740:  PlotLabel fails in Plot3d, SurfaceGraphics, Display.

1018783:  Hypergeometric2F1 fails by looping
	Description:
	N[Hypergeometric2F1[2,1/2,3,2/3]]  recures indefinitely.
	condition may be:
		first arg is integer,  2nd is 1/2 integer,
		third is integer > first and  fourth anything.
 	May cause Beta to fail, as well as any other function
	that call Hypergeometric2F1 .

1019507: Plot3D  Gives poor results on rlogin.
	Description:
	Plot3D[x^y,{x,0,1},{y,1,2},Shading->False] appears to give
	same results as: Plot3D[x^y,{x,0,1},{y,1,2}]. Actually this
	is due to default: PlotPoints -> 15 .
 	Work around:
	Use:  SetOptions[Plot3D, PlotPoints -> 4]  or some other
	small value.
	Terminal.m may be modified to SetOptions for Plot3D
	to be more appropriate for terminal output.
 
1019660: FindMinimum  fails with some arguments.
	FindMinimum[ f(a,b), {a,1}, {b,0}] fails for some functions f
	when it  must calculate	derivitives to get gradient. Use the
	alternate form FindMinimum[ f(a,b), {a,{.9,1}}, {b,{0,.1}}]
	that uses approximations to calculate gradient.

additional notes:

Linear Algebra Zero Test

Linear algebra functions such as LinearSolve, RowReduce, NullSpace
and Eigenvectors use the  ZeroTest argument.  The default setting for
this is ZeroTest -> (Together[#1] == 0 & ).  This does not work well
for numerical or symbolic arrays.  For symbolic arrays you may need:
  ZeroTest -> (Simplify[#1] == 0 & ) or the more expensive:
ZeroTest -> (Reduce[#1==0] & )
For approximate numeric arrays you may need:
  ZeroTest -> (Chop[#1] == 0 & )   or  ZeroTest -> (Chop[#1,dx] == 0 & )
with dx apropriate for the precision you are using.
For general use, a combination of the two may work fairly well:
RowReduce[A,ZeroTest -> (Reduce[Chop[#1]==0] &)]  
  SetOptions can be used to change the default ZeroTest for each function.

Packages Must Be Loaded Before Use

The Mathematica text does not always mention that you need to load
a package before using it. They are usually in  /usr/math/common/Packages
and may be loaded by with the <<  command.
If you have a color display you should load Colors.m with command
<<Colors.m as some other functions may use it.




From stevec@yoda Mon Apr 24 22:35:59 1989
Received: from spock.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00201; Mon, 24 Apr 89 22:35:59 CDT
Received: from yoda.ncsa.uiuc.edu by spock.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00241; Mon, 24 Apr 89 22:33:00 CDT
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA01274; Tue, 14 Mar 89 13:13:42 CST
Date: Tue, 14 Mar 89 13:13:42 CST
Message-Id: <8903141913.AA01274@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda
Subject: mathematica/TeX question for mathgroup
From: lwyse@bucasb.BU.EDU
Status: RO

I am having trouble "Splice"ing TeXForms into a Tex document.
Mathematica automatically converts even not-so-long expressions
into "short" form (abbreviating by elliding out middle terms and
replacing them with a count of them between angle brackets.) This
short form is then spliced into my TeX document in beautiful TeX 
notation. Has anybody foung an elegant solution to this?


thanx, lonce


----- End Included Message -----


From stevec Tue Apr 25 10:39:31 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA01044; Tue, 25 Apr 89 09:58:32 CDT
Date: Tue, 25 Apr 89 09:58:32 CDT
Message-Id: <8904251458.AA01044@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Bug in Solve/Reduce?
From: sdoyle@fed.frb.gov
Status: RO

I've run into a problem with Solve and Reduce where it appears to
be `creating' null variables that only contain the name of the
Context where the manipulations are taking place.

To re-create the problem, just read in the file `SolveBug.m' (included
below) in the normal way. This defines a symbol poly with a fourth
degree polynomial in X and sets the Cubics option of Roots to False.
When you enter Solve[poly==0, X] an answer is returned that contains
a variable Global` (the Context name with no symbol appended). 

I've included sample session following SolveBug.m. The FullForm
of the value returned by Reduce also contains this null variable.

Any Ideas? Or... Did I make a mistake?  Is it an error to turn off
the Cubics option but not the Quartics? Any help appreciated!


 Sean Doyle    
 Board of Governors of the Federal Reserve System 
 Washington, DC 20551  		(202) 452-2352            
 uucp: uunet!fed!m1swd00 , internet: sdoyle@fed.frb.gov


(* ****************** Start of SolveBug.m ****************** *)
(* Bug in Solve/Reduce *)

(* Set options for Roots  *)
SetOptions[Roots, Cubics->False]

(* Define polynomial in X *)
poly = (d  e + f g) a c b^2 X^4 + (a e + c d) b X^3 +
	(1 + 2 (d e + f g) a b c) X^2 + (a e + c d) X +
	(d e + f g) a c 

Print["Input Polynomial: ", poly]

Print["Solve[poly==0, X]",Solve[poly==0, X]];


(* **************** End of SolveBug.m ************************* *)


**** Session: Part 1. Notice that the solution contains the
**** variable Global`. If I bury this in a Package, the name of
**** the package is there instead. Why should there be a package
**** name in the middle of an expression with no variable attached?

  mqws2(14)% math
  SunMathematica (sun3.68881) 1.1 (September 14, 1988) [With pre-loaded data]
  by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
     S. Omohundro, D. Ballman and J. Keiper
  Copyright 1988 Wolfram Research Inc.
  -- SunView graphics initialized --

  In[1]:= <<SolveBug.m
		     2
  Input Polynomial: X  (1 + 2 a b c (d e + f g)) + X (c d + a e) + 

	 3                                    4    2
  >     X  b (c d + a e) + a c (d e + f g) + X  a b  c (d e + f g)
  Solve[poly==0, X]{{X -> 

			 -(b (c d + a e))
  >                (--------------------------- + 
			  2            2
		    2 (a b  c d e + a b  c f g)

				  Global`
  >                      Sqrt[-4 (------- - 
				     2
	  <<< And so on.... the output goes on for a while with many
	      Global` variables appearing... >> 

  In[2]:= 


**** Now let's look at the FullForm of this expression. It still contains
**** the Global` context string with no variable attached.


  Out[4]//FullForm= 

  >    List[List[Rule[X, Times[Rational[1, 2], 

  >                Plus[Times[Rational[-1, 2], b, 

  >                    Plus[Times[c, d], Times[a, e]], 

  >                      Power[Plus[Times[a, Power[b, 2], c, d, e], 

  >                          Times[a, Power[b, 2], c, f, g]], -1]], 

  >                   Power[Plus[Times[-4, 

  >                          Plus[Times[Rational[1, 2], Global`], 

  >                          Times[-1, 
		<<< And so on. The expression goes on for a number of
		    lines...>>>


**** The Global` variables appear in output from Reduce as well.




From stevec Tue May  2 10:47:42 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA15802; Tue, 2 May 89 09:46:39 CDT
Date: Tue, 2 May 89 09:46:39 CDT
Message-Id: <8905021446.AA15802@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Question about Check[]
From: sdoyle@fed.frb.gov
Status: RO

[This is the first of a series of messages between Sean and me
which basically discuss some differences between version 1.1 of
Mathematica and a 1.2 beta release I am testing.   I do not know
the release date of 1.2 non-beta. -smc]


	I'm having some trouble getting Check[] to work with messages that
I've defined. This would make error trapping much easier! When I enter
the example from the manual (page 261), things work fine. Below is a 
similar example with a user-defined Message that doesn't work. 
	
	This might be something I've missed in the manual, although
examples of messages (such as for Convert on page 539) don't work
with Check[] either.

	The desired result would be for the symbol `y' in Out[8]
to have the value meaningless instead of `Null'.

	I've also tried using On[test::tosmall] without any difference
in results.

	So... how can I create messages that Check[] will trap? 

	Thanks!

 Sean Doyle    
 Board of Governors of the Federal Reserve System 
 20 and Constitution, NW  Mail Stop 76  Washington, DC 20551
 (202) 452-2352     uucp: uunet!fed!m1swd00 , internet: sdoyle@fed.frb.gov



********************* Session below ************************
mqws2(115)% math
SunMathematica (sun3.68881) 1.1 (September 14, 1988) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
Copyright 1988 Wolfram Research Inc.
-- SunView graphics initialized --

In[1]:= test[x_]:= x /; x>0

In[2]:= test::toosmall = "The input to test is too small"

Out[2]= The input to test is too small

In[3]:= test[x_] := Message[test::toosmall]

In[4]:= ??test
test
test/: test[x_] := x /; x > 0
 
test/: test[x_] := Message[test::toosmall]
 

In[4]:= Messages[test]

Out[4]= test::toosmall -> The input to test is too small
         

In[5]:= test[5]

Out[5]= 5

In[6]:= test[-4]

test::toosmall: The input to test is too small

In[7]:= y = Check[test[7],meaningless]

Out[7]= 7

In[8]:= y = Check[test[-7],meaningless]

test::toosmall: The input to test is too small

In[9]:= y

In[10]:= FullForm[y]

Out[10]//FullForm= Null

In[11]:= 




From stevec Tue May  2 10:51:07 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA15818; Tue, 2 May 89 09:52:32 CDT
Date: Tue, 2 May 89 09:52:32 CDT
Message-Id: <8905021452.AA15818@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Re: Question about Check[] 
From: sdoyle@fed.frb.gov
Status: RO

[Third in the series on Check[]. -smc]

Steve:


Do you have any information on when 1.2 is coming out? I don't want
to ask you anything for which you would have to break a non-disclosure
agreement, but I'm leaving here June 1 and I'd like to know if
1.2 for the Sun might be here before then... 

You can forward the problem below to the list if you want. If it is 
fixed in 1.2 please let me know.


The two most serious problems (for me) in 1.1 are that CForm[] wasn't
working correctly with user-defined objects and that I get segmentation
violations when performing assigments " := " nested deeply within large 
programs. While I can't pin down the latter for a simple example (yet), the 
formatting problem is reproduced below.

The basic problems are:
	(a) When CForm distributes down the list, it doesn't apply the 
	   CForm rule that I defined. (Out[5])

	(b) If I use rules to replace the objects, the resulting output
	   doesn't completely evaluate. While Out[6] appears as I desire,
	   FullForm[] shows that the SequenceForm[] expressions have
	   not evaluated. 

	(c) The problem in (b) becomes serious if (for example) I have 
	   exponents in the expression. Then I have to evaluate the 
	   expression once for my objects, and then once again for the 
	   operators surrounding the objects. 

A workaround for the problem of (c) is to use the function ToString[]
in the user-specified CForm rules. This forces these sub-expressions
to evaluate the SequenceForm[] function. After CForm is applied to the
entire expression there may be embedded quotation (") characters... so 
I convert the entire statement to a string and then strip out all 
of the quotation characters.

This is slow, and it won't work if one wants to generate C expressions
that contain quotation characters.....

I'm also curious.... the evaluation problem mentioned in (b) seems to
be a violation of the rule that evaluation takes place until there
is no change in the expression... but the *Form[] commands operate
by different rules than other functions.

If this is fixed in 1.2, or if there is a better workaround, please
let me know. Thanks! 

 Sean Doyle    

Board of Governors of the Federal Reserve System 
20 and Constitution, NW  Mail Stop 76  Washington, DC 20551
(202) 452-2352  uucp: uunet!fed!m1swd00 , internet: sdoyle@fed.frb.gov


*************** Session below. ***************************

SunMathematica (sun4) 1.1 (September 17, 1988) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
Copyright 1988 Wolfram Research Inc.
-- Terminal graphics initialized --

In[1]:= foo/: CForm[foo[x_,y_]]:= SequenceForm[
        "readdata( foo,", x , ",", y,")"]

In[2]:= foo[1,2]

Out[2]= foo[1, 2]

In[3]:= CForm[%]

Out[3]= readdata( foo,1,2)

In[4]:= temp = foo[1,2] + foo[2,3] + foo[3,4]

Out[4]= foo[1, 2] + foo[2, 3] + foo[3, 4]

In[5]:= CForm[temp]

Out[5]//CForm= foo(1,2) + foo(2,3) + foo(3,4)

In[6]:= temp /. {foo[x___] -> CForm[foo[x]]}

Out[6]= readdata( foo,1,2) + readdata( foo,2,3) + readdata( foo,3,4)

In[7]:= FullForm[%]

Out[7]//FullForm= 
 
>    Plus[SequenceForm[readdata( foo,, 1, ,, 2, )], 
 
>     SequenceForm[readdata( foo,, 2, ,, 3, )], 
 
>     SequenceForm[readdata( foo,, 3, ,, 4, )]]


(* Here's the `fix' to force the SequenceForm[] statements to evaluate *)

In[8]:= foo/: CForm[foo[x_,y_]]:= ToString[SequenceForm[
                "readdata( foo,", x , ",", y,")"]]




From stevec Wed May  3 14:31:09 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA15810; Tue, 2 May 89 09:48:12 CDT
Date: Tue, 2 May 89 09:48:12 CDT
Message-Id: <8905021448.AA15810@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Re: Question about Check[]
From: stevec@ncsa.uiuc.edu
Status: RO

[The second messsage in the series about Check[]. -smc]

I have run your program through version 1.2 (beta) and do not get the
same results.  The session is below.  Is there still a bug you want
reported to Wolfram Research or the mailing list?

=====================================================================



In[1]:= test[x_]:= x /; x>0

In[2]:= test::toosmall = "The input to test is too small"

Out[2]= The input to test is too small

In[3]:= test[x_] := Message[test::toosmall]

In[4]:= Messages[test]

Out[4]= test::toosmall -> The input to test is too small
         

In[5]:= test[5]

Out[5]= 5

In[6]:= test[-4]

In[7]:= y = Check[test[7],meaningless]

Out[7]= 7

In[8]:= y = Check[test[-7],meaningless]

Out[8]= meaningless

In[9]:= y

Out[9]= meaningless

In[10]:= FullForm[y]

Out[10]//FullForm= meaningless

In[11]:= Quit[]




From stevec Wed May  3 16:41:23 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA15864; Tue, 2 May 89 10:08:57 CDT
Date: Tue, 2 May 89 10:08:57 CDT
From: stevec (Steve Christensen)
Message-Id: <8905021508.AA15864@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: mathgroup email addresses
Status: RO

There has been some confusion regarding how to send messages to the
Mathematica mailing list or to reply to a message you receive.

DO NOT send message to mathgroup@yoda.ncsa.uiuc.edu.  While this
will work to get to the mailing list, it will also mean that any
reflected messages will get sent back to you.  On some days when
the mailer machines on the net get weird, this may mean that you
will get a lot of returns.

So, please send messages and replies to:

steve@ncsa.uiuc.edu
or stevec@ncsa.uiuc.edu
or 14008@ncsavmsa.bitnet.

If you want to say mathgroup, you can send to mathgroup@wri.com
which is aliases to me.

Steve Christensen
NCSA & Beckman Institute
University of Illinois at Urbana-Champaign

From stevec Fri May  5 10:16:46 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA03467; Fri, 5 May 89 09:10:53 CDT
Date: Fri, 5 May 89 09:10:53 CDT
Message-Id: <8905051410.AA03467@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Mathematica bug on Sun4
From: sdoyle@fed.frb.gov
Reply-To: steve@ncsa.uiuc.edu
Status: RO


[See the follow up note to this one regarding the fix of this problem
in 1.2 beta. - smc]


	A tale of two Suns ( 3/60 and a 4/260)

It was the best of Suns, it was the worst of Suns. 

I've been having some trouble with segmentation violations and/or bus errors
on a Sun4 that do not occur on a Sun3. Both machines are running version 1.1. 

As is true of most memory type bugs, they are hard to program around if
one doesn't know the underlying algorithms. If I use On[] or Debug[]
to attempt to isolate the problem, usually it `goes away'. However, if
the Sun4 does return an answer, it is sometimes incorrect.

I can't replicate the segmentation violations with the test file (appended
below), but I can replicate the incorrect answers. Hopefully these problems
have a common root.

Before I get to the code, it might help to explain what its purpose is.
In economic models one often has variables that have a time subscript, such
as GNP[T], where T represents the current time. Lag operators are used to
increment (or decrement) the time index. If we represent the lag operator
as L, we have the following relationships:

	L GNP[T]   = GNP[T-1]
	L^2 GNP[T] = L GNP[T-1] = GNP[T-2]

One can even have polynomials in the lag operators:

	(1 + L) GNP[T] =  GNP[T] + GNP[T-1]
	(1 - L) GNP[T] =  GNP[T] - GNP[T-1]

The lag operator L has been implemented in Mathmatica as the operator
LagOperator[n]. Delta[n] expands to (Identity - LagOperator[n]). The code
treats Identity and LagOperator[n] as scalar expressions in polynomials
until they are applied to expressions that have time indexes. Then they
are converted to Function[]s and applied using Through[] and MapAt[].
This is done because Mathematica's built-in rules handle scalar value
polynomials much better than function-valued polynomials.


Now... the bottom line(s):
	(1) Could someone see if this is a problem under 1.2? Or... is
	    there an obvious problem with the code (even though it works
	    on the 3/60?)

	(2) Can I get 1.2 here (even in beta release?). Normally
	    I would try to be patient, but I'm leaving here June 1
	    for another job, and I'll only have limited Mathematica
	    access in the future (sigh...)

	    In return for getting 1.2, I promise to beat on it very
	    hard before I go. So far I've built a slot-and-filler
	    database for storing model files, tools for manipulating
	    models algebraically, and formatting out TeX and C versions...
	    and more!
	
	    The database is very general and is has nothing to do with
	    economic models. Once one has defined the attributes of
	    a `class', all of the database commands for storing or
	    retrieving information are defined.

	    I'll have something to post before I `retire'.

	(3) FOR WRI (!!!) (Please)
		(a) Any hints on debugging 1.1 applications? There is
	            another nasty memory bug lurking in my code that I
	   	    can't seem to isolate. On[] and Debug[] both have
		    side effects on the environment... often I will get
		    a `segmentation violation' or `bus error' while
		    running a program which works fine when On[] or
		    Debug[] are used. I'm not doing anything weird
		    in the code (e.g., Raw[]).
		(b) Is there any way of figuring out where I'm 
		    straining Mathematica? I have about 4500 lines of
		    code (including comments!). I don't know anything
		    about how many rules Mathematica can handle, nor what
		    the tradeoffs are in how complex conditions are for 
		    controlling the application of rules (I tend to build
		    a lot of predicate functions to make the code easier
		    to read)... 
		(c) What should I avoid using in 1.1? (If I can't get
	  	    1.2 here, perhaps at least I can leave behind 
		    robust code). Most of the problems I've had are
		    with assignment in programs that are deeply nested,
		    or with Match[]/Select[] on lists which are 
		    nested within my database procedures... I'm sorry
		    I can't be more specific, but I'm having trouble
		    isolating the problems (small programs tend to work
		    fine).

The rest of this message is three parts: 
	(1) Sun4 segmentation violation
	(2) Sun4 incorrect answer
	(3) A file for replicating the problem


Thanks in advance!

Sean Doyle     


*************** PART 1: Sun 4 segmentation violation *********************** 

Sun4:
   os4cs1(25)% math
   SunMathematica (sun4) 1.1 (September 17, 1988) [With pre-loaded data]
   by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
      S. Omohundro, D. Ballman and J. Keiper
   Copyright 1988 Wolfram Research Inc.
   -- Terminal graphics initialized --

   In[1]:= <<EconoMod.m
   Loading in EconoMod application packages
   Finished loading in EconoMod package 

   In[2]:= Delta[1] Delta[100] Delta[3]
   Segmentation fault
   os4cs1(26)% 


Now... output from my trusty (but slow) 3/60:
   mqws2(155)% math
   SunMathematica (sun3.68881) 1.1 (September 14, 1988) [With pre-loaded data]
   by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
      S. Omohundro, D. Ballman and J. Keiper
   Copyright 1988 Wolfram Research Inc.
   -- SunView graphics initialized --

   In[1]:= <<EconoMod.m
   Loading in EconoMod application packages
   Finished loading in EconoMod package 

   In[2]:=  Delta[1] Delta[100] Delta[3]
   0.25 Second

			    3
   Out[2]= ApplyLag[Identity  - LagOperator[1] - LagOperator[3] + 

				     2
   >        LagOperator[4] - Identity  LagOperator[100] + LagOperator[101] + 

   >        LagOperator[103] - LagOperator[104]]

We also see that the answer it correct, since it is just expanding a 
polynomial. Delta[n] expands to to the polynomial (1-LagOperator[n]), and
LagOperator[n]^x becomes LagOperator[n*x], so we can simulate this below
using the scalar L:
 
   In[3]:= (1-L)(1-L^100)(1-L^3)
   0.

			 3        100
   Out[3]= (1 - L) (1 - L ) (1 - L   )

   In[4]:= ExpandAll[%]
   0.166667 Second

		    3    4    100    101    103    104
   Out[4]= 1 - L - L  + L  - L    + L    + L    - L


The `Identity^n' terms in Out[2] are simplified (in the rules for ApplyLag)
before they applied as operators to an expression.


*************** PART 2: Sun 4, wrong answer  *********************** 

If I use On[] with the Sun 4, it will generate an incorrect answer instead
of a segmentation violation. Here is the last part of the trace:

   ShowTime::trace: 
	 ShowTime[Delta[1] Delta[100] Delta[3]] --> 
			     3                            2
	    ApplyLag[Identity  - LagOperator[1] - Identity  LagOperator[1] + 
		LagOperator[2] - LagOperator[3] + 2 LagOperator[4] - 
		LagOperator[5]].

			    3                            2
   Out[3]= ApplyLag[Identity  - LagOperator[1] - Identity  LagOperator[1] + 

   >        LagOperator[2] - LagOperator[3] + 2 LagOperator[4] - LagOperator[5]]

This is clearly the wrong polynomial. To try to isolate the problem I created
a file `lagbug.m' that had most of the lag-operator related code (it excludes
the Format[] rules). While I don't get a segmentation violation, I do
get the same (wrong) answer on the Sun 4 as when I used On[]:


   os4cs1(55)% math
   SunMathematica (sun4) 1.1 (September 17, 1988) [With pre-loaded data]
   by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
      S. Omohundro, D. Ballman and J. Keiper
   Copyright 1988 Wolfram Research Inc.
   -- Terminal graphics initialized --

   In[1]:= <<lagbug.m

   In[2]:= Delta[1] Delta[100] Delta[3]

			    3                            2
   Out[2]= ApplyLag[Identity  - LagOperator[1] - Identity  LagOperator[1] + 

   >        LagOperator[2] - LagOperator[3] + 2 LagOperator[4] - LagOperator[5]]


On the 3/60 the correct answer is returned.
*************** PART 3: lagbug.m file **********************


(* 		L a g O p e r a t o r 

	The LagOperator package contains several definitions and tools
for manipulating Lag operators in EconoMod objects and expressions.

[Note: some of these comments refer to other parts of the package. I 
 could have deleted them, but then I thought people might be interested
 in what other users are up to...

 One of the main excluded portions here are the objects that the lag
 operators are applied to. When this all works [ :-) ] I'll post that
 to the net. 
]


*)
BeginPackage["LagOperator`"]

ApplyLag::usage=
	"ApplyLag[lagpoly][expr] applies the lag polynomial to expr.
ApplyLag[lagpoly1]*ApplyLag[lagpoly2] will multiply the polynomial
expressions in the normal Mathematica fashion."

LagOperator::usage=
	"LagOperator[n] is the internal representation of the Lag 
operator \"L\". LagOperator[n][expr] applies the lag operator to expr."


Delta::usage=
	"Delta[n][expr] applies the lag polynomial (1-L^n) to the
expression."

MovingAverage::usage=
	"MovingAverage[n][expr] applies the lag polynomial\n
\t ((1/n) (1 + L + L^2 + ... + L^(n-1) )) \n
to the expression."

MovingTotal::usage=
	"MovingTotal[n][expr] applies the lag polynomial\n
\t  (1 + L + L^2 + ... + L^(n-1) ) \n
to the expression."	

LagPolynomial

Begin["`Private`"]
(* Initialize functions *)




(* ********************************************************************
		LagOperator functions and utilities 
   ******************************************************************** *)

(* **** Evaluation ****
  ApplyLag is a Mathematica object that performs two functions:
	(1) It `holds' lag polynomials in an unevaluated form. These
	    polynomials can be further manipulated (i.e., raised to a 
	    power, etc..)
	(2) When ApplyLag is followed by an expression, a rule is
	    fired (LagFunction) that transforms the lag polynomial
	    to a Function[] and then uses Through to distribute the
	    lag operators through the expression.

   Digression: These two steps are necessary. Once the lag polynomial
is in Function[] form, one can't use any of the Expand[] or other
polynomial manipulation tools on it. So, if we defer tranforming the
polynomial into a Function[] until we are ready to apply the lag
operators, we can keep some flexibility about nesting lag polynomials
such as 
	Delta[x] Delta[y] expr
	Delta[x]^2 expr

*)
	    
ApplyLag[lagopts_][expr_]:=Through[LagFunction[lagopts] [expr],Plus]

ApplyLag/: ApplyLag[x_] ApplyLag[y_]:= ApplyLag[ExpandAll[(x)(y)]]

ApplyLag/: Power[ApplyLag[x_],n_]:= ApplyLag[ExpandAll[Power[x,n]]]


(* LagFunction[] maps the lag polynomial into a Function[] object. 

	Note the slight kludge of mapping Identity^n to Identity. This
is necessary because Identity may have been raised to a power in some
polynomial transformation. While a rule could have been specified
elsewhere for this, Identity is a Mathematica entity and I didn't
want to mess it up with a rule.
*)
LagFunction[lagpoly_]:=
	(lagpoly /. {  		     
			Identity^n_->Identity[#],
			Identity->Identity[#],
			LagOperator[lag_]->LagOperator[lag][#]
		})&


(* ********** Algebra of lag operators ************ *)
(* Higher level lag operators *)
Delta/: Delta[lag_]:=
	ApplyLag[(Identity - LagOperator[lag])]

MovingTotal/: MovingTotal[lag_]:= 
	ApplyLag[Sum[LagOperator[i],{i,0,lag-1}]]
MovingAverage/: MovingAverage[lag_]:= 	
	ApplyLag[(1/lag)*Sum[LagOperator[i],{i,0,lag-1}]]

LagPolynomial[CoefPlaceHolder[name_,{}],degree_]:=
	ApplyLag[Sum[CoefPlaceHolder[name,i] LagOperator[i],{i,0,degree-1}]]




(* ************ LagOperator algebra     *********** *)

(* Simplification rules *)
LagOperator/: LagOperator[n_]*Identity := LagOperator[n]

(* Product of two LagOperators *)
LagOperator/: LagOperator[n1_] * LagOperator[n2_]:= LagOperator[n1+n2]

(* Powers of LagOperators *)

LagOperator/: LagOperator[n_]^exp_ := LagOperator[n*exp]

(* L^0 is the Identity function *)
LagOperator[0]:= Identity



(* ****** Application of lag operators to objects ******* *)

(* Case #1: Application of LagOperator to ANY class containing a LagOffset.

	If future class types (TimeVaryingCoef, for example) have the same
general form as DiscreteVariable/ContinuousVariable, this rule will work
for them as well. *)
LagOperator[lag_][class_[Name[x_],LagOffset[n_]]]:=
	class[Name[x],LagOffset[n-lag]]


(* Case #2: Application of LagOperator to all other EconoMod classes *)
LagOperator[lag_][class_[Name[x_],contents_]]:=	class[Name[x],contents]



(* Case #3: Primitive Mathematica objects *)
LagOperator[lag_][x_Symbol]:= x
LagOperator[lag_][x_?NumberQ]:= x
LagOperator[lag_][x_String]:= x

(* Case #4: Application of LagOperator to an expression. The positions
   of the time-varying objects are located using Position[], and then
   only those objects have the lag applied.*)
LagOperator[lag_][x_]:=Block[{positions},
	positions = Position[x,class_[name_,LagOffset[xxx___]]];
	If[SameQ[positions,{}],
		Return[x],
		Return[MapAt[LagOperator[lag][#] &, x, positions]]
		]]




End[]
EndPackage[]

********************* End of lagbug.m **********************

 Sean Doyle     
 Board of Governors of the Federal Reserve System 
 20 and Constitution, NW  Mail Stop 76  Washington, DC 20551
 (202) 452-2352  uucp: uunet!fed!m1swd00 , internet: sdoyle@fed.frb.gov


----- End Included Message -----


From stevec Fri May  5 11:49:48 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA03758; Fri, 5 May 89 11:21:40 CDT
Date: Fri, 5 May 89 11:21:40 CDT
Message-Id: <8905051621.AA03758@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Re: Mathematica bug on Sun4
From: fateman@renoir.Berkeley.EDU (Richard Fateman)
Reply-To: stevec@ncsa.uiuc.edu
Status: RO

[Richard, in his message below brings up a number of good points.
I would like to hear from members of this mailing list about what
bug reports they would like me to send to the list and what others
to keep to myself and WRI.  My initial thoughts were that users
might like to be aware of changes between 1.1 and 1.2 and that a
number of bugs have been fixed.  I realize it is difficult to know
for sure if a bug is in Mathematica itself, in the operating system,
compiler of the hardware or in the user's code.  I can try to limit
bug reports to Mathematica bugs only or to help with bugs in a user's
code, but I am not sure I can always judge what kind of a bug exists.
Comments please. - smc]

I don't know what to make of all of this stuff comparing 1.1 to 1.2,
memory violations, etc.  It obviously is not in the best interests
of anyone (other than WRI, and I'm not sure of that either) 
to have a whole mailing-list of individuals, almost all of
whom are relatively naive, look at (perhaps buggy) code
that runs differently on different machines.  

In dealing with Macsyma, I generally view any discrepancy between
(say) VAX and Sun  or Sun 2/3/4/ ... operations as a bug in
either the operating system, the lisp system, or (rarely) a hardware
bug.  It is NOT a bug in Macsyma, and I expect whoever is responsible
for support of the substructure to fix it.

If Mathematica has different SOURCE code for Sun 3 and 4, etc.  then
its problem is different.  But since only WRI has access to source,
what point is there to telling us all about such bugs?

 Regards,
   Richard




From stevec Mon May  8 12:26:50 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA09012; Mon, 8 May 89 12:00:08 CDT
Date: Mon, 8 May 89 12:00:08 CDT
Message-Id: <8905081700.AA09012@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Re: Bug reports on MathGroup (long)
From: sdoyle@fed.frb.gov
Relpy-To: stevec@ncsa.uiuc.edu
Status: RO

I've sent several bug/feature reports to Steve Christensen, who in turn
has forwarded these to the MathGroup list. Some of these problems appear
only on a particular version of Mathematica or a particular machine. This
led Richard Fateman to ask:

>                              [...] since only WRI has access to source,
>   what point is there to telling us all about such bugs?

Well, I think that the current policy of posting differences between 
1.1 and 1.2 or between different machines is a good one, although I
also partially agree with Richard. Many of the people on this list are more 
interested in computer algebra or algorithm design, and not difficulties
of specific implementations of those algorithms. Even if they were 
(as Richard points out), the non-WRI members of the group don't have
access to the source code, so their advice might be of limited use.
Finally, some (perhaps naive) readers of MathGroup might interpret
a bug report as a signal that Mathematica was not a good software
package (and it IS a very good package!).

Since Richard made a good case for limiting the types of bugs 
posted to MathGroup, I'll present some reasons for the other side:

(1)	Users may have encountered some of the same problems and
	have figured out some work-arounds. From my point of view, it
	doesn't matter if the problem is Sun's or WRI's... but if 
	someone on MathGroup can describe the problem in a consisent
	way then we are all better off.

(2)	I like to know the limits of the programming environment
	that I'm working in.  Sometimes these limits are specific
	to an implementation, sometimes not. I assume that others 
	might share this interest.

(3)	I tried to explain in my posting the point of what the function
	of the program was (polynomials used as operators), and this seemed
	like a generic enough problem that I was sure that someone else
	had already solved it in a clean way.  I often learn a great
	deal by watching these sort of conversations on the net... 

(4)  	I usually interpret bug reports/problems with packages as a 
	positive signal. It means that people are really using the
	package and pushing it into areas where the designers might
	not have anticipated it being applied.

	(Of course, others could have interpreted my posting in a different
	light. If so, I apologize to WRI. )


These are my reasons for keeping MathGroup's posting policy in its present 
form. 

But... I've been wrong before. 	:-)



 Sean Doyle     Board of Governors of the Federal Reserve System 
 20 and Constitution, NW Mail Stop 76  Washington, DC 20551
 (202) 452-2352 uucp: uunet!fed!m1swd00 , internet: sdoyle@fed.frb.gov


----- End Included Message -----


From stevec Fri May 12 16:39:10 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA17305; Fri, 12 May 89 15:42:19 CDT
Date: Fri, 12 May 89 15:42:19 CDT
Message-Id: <8905122042.AA17305@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: bug reports..
From: LFEAGIN@CALSTATE.BITNET
Reply-To: stevec@ncsa.uiuc.edu
Status: RO

Steve,

I vote to keep the bug reports coming.  It's easy enough
to sift thru them.  Users in the group are bound to be able
to provide suggestions, at least some of the time.  This should
also help "naive" users come up to speed, and should certainly
help make Mathematica a better tool.

Some apparent bugs in version 1.1 for the MacII:

Limit[ x/Sqrt[x^2], x->-Infinity ] returns +1.  This error
seems to mess up the integrator on some functions when
integrated on {x,-Infinity,a}, as e.g. 1/(x^2+1)^(3/2).

Integral[ x b^(a x), x ]
then Together[ D[ %, x ] ] doesn't return x b^(a x).

Jim
LFEAGIN@CALSTATE.BITNET

From stevec Mon May 15 11:30:40 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA22198; Mon, 15 May 89 10:51:19 CDT
Date: Mon, 15 May 89 10:51:19 CDT
Message-Id: <8905151551.AA22198@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Mathematica Programming Position
From: sdoyle@fed.frb.gov
Reply-To: stevec@ncsa.uiuc.edu
Status: RO

Steve:

	I don't know if this is appropriate for this group. If it
isn't, could you let me know what might be a good place? We'd love
to find someone with Mathematica programming experience. We have
already posted this to misc.jobs.offered, but we'd like to consider
more candidates.

Thanks!

 Sean Doyle     Board of Governors of the Federal Reserve System 
 20 and Constitution, NW Mail Stop 76 Washington, DC 20551
 (202) 452-2352  uucp: uunet!fed!m1swd00 , internet: sdoyle@fed.frb.gov


Posting follows:

	
                  JOB OPENING:  RESEARCH PROGRAMMER
	     Board of Governors of the Federal Reserve System 
		Division of Research and Statistics
			MAQS Section

Description: Work with economists and programmers on a large network of
             Sun workstations (120+) used for theoretical and applied
             economic analysis.
             Responsibilities would include:
             ; Software development for estimation and simulation of
               macroeconomic models.
             ; Identification and evaluation of new Unix software (such
               as editors, mathematical/statistical software, utilities,
               etc.) that may be useful for staff work on the network.

Education/Training:

  Required: Bachelors degree or equivalent experience in computer
            science, economics, mathematics, or statistics;
            Familiarity with both traditional (e.g. C or FORTRAN) and
            non-traditional (e.g. LISP, SMALLTALK or MATHEMATICA)
            programming languages;
            Familiarity with UNIX or a UNIX-like operating system;
            Knowledge of a windowing environment (preferably X or
            SunView) or design of user interfaces.

  Desirable:Interest/familiarity with object-oriented programming,
            symbolic computing, numerical analysis and optimization,
            parallel processing, computer networks, and SUN
            workstations.  The best candidates will have demonstrated
            evidence of self-motivation and creativity.




From stevec Tue May 16 09:43:01 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA23971; Tue, 16 May 89 09:25:26 CDT
Date: Tue, 16 May 89 09:25:26 CDT
Message-Id: <8905161425.AA23971@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Notebooks....
From: wri!windsor@uxc.cso.uiuc.edu (Eric Blankenburg)
Reply-To: wri!windsor@uxc.cso.uiuc.edu
Status: RO

[Please reply directly to Eric on this.  - smc]

Steve,

Rob Wolff, of Apple, is looking for 100 Megs of science notebooks for 
distribution on a CD-ROM during SIGGRAPH 89.  He is looking for general
science notebooks that cover general science issues.  Any help on this 
would be greatly appreciated.  

If you can put this across to MathGroup, Wolfram Research, Inc and Apple
would appreciate it.  

Eric Blankenburg

PS:  By the way, we have a deadline of about 10 days on this little
project.




From stevec Wed May 17 10:38:50 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA15840; Tue, 2 May 89 09:59:00 CDT
Date: Tue, 2 May 89 09:59:00 CDT
Message-Id: <8905021459.AA15840@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Re: Question about Check[]
From: stevec@ncsa.uiuc.edu
Status: RO

[Fourth in the series on Check and other things. -smc]

Here is a 1.2 session:

Comments?
====================================================================

In[57]:= foo/: CForm[foo[x_,y_]]:= SequenceForm[
        "readdata( foo,", x , ",", y,")"]
         log: SING error

In[58]:= foo[1,2]

Out[58]= foo[1, 2]

In[59]:= CForm[%]

Out[59]= readdata( foo,1,2)

In[60]:= temp = foo[1,2] + foo[2,3] + foo[3,4]

Out[60]= foo[1, 2] + foo[2, 3] + foo[3, 4]

In[61]:= CForm[temp]

Out[61]//CForm= foo(1,2) + foo(2,3) + foo(3,4)

In[62]:= temp /. {foo[x___] -> CForm[foo[x]]}

Out[62]= readdata( foo,1,2) + readdata( foo,2,3) + readdata( foo,3,4)

In[63]:= FullForm[%]

Out[63]//FullForm= 
 
>   Plus[SequenceForm["readdata( foo,", 1, ",", 2, ")"], 
 
>    SequenceForm["readdata( foo,", 2, ",", 3, ")"], 
 
>    SequenceForm["readdata( foo,", 3, ",", 4, ")"]]




From stevec Wed May 17 11:08:27 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA15846; Tue, 2 May 89 10:00:22 CDT
Date: Tue, 2 May 89 10:00:22 CDT
Message-Id: <8905021500.AA15846@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Re: Question about Check[] 
From: sdoyle@fed.frb.gov
Status: RO

[Last in the series on Check[] -smc]


	Thanks for the 1.2 session. I think that CForm[] isn't working
the way that a user would want it to. If a user has particular CForm rules
defined for an object, a CForm on an expression containing those objects
should use the user's rules... and as your Out[60] shows, it doesn't use
the user's rules.

	It is slow and awkward have a rule for each object that maps
it into a string and then parses the string.... so if someone at WRI
(or on the list) has better ideas I'd love to hear them.

	So... could  you forward either your session or mine to WRI? Or...
I could send it if you would rather. Thanks!

 Sean Doyle    
 Board of Governors of the Federal Reserve System 
 20 and Constitution, NW  Mail Stop 76  Washington, DC 20551
 (202) 452-2352  uucp: uunet!fed!m1swd00 , internet: sdoyle@fed.frb.gov


P.S. By the way, TeXForm[] works pretty much as one would hope, so if 
     WRI could make CForm[] more like TeXForm my programs would have 
     less kludgey code....     



From stevec Wed May 17 11:36:23 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA03472; Fri, 5 May 89 09:13:05 CDT
Date: Fri, 5 May 89 09:13:05 CDT
Message-Id: <8905051413.AA03472@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: lagbug.m
From: stevec@ncsa.uiuc.edu
Reply-To: stevec@ncsa.uiuc.edu
Status: RO

[Response to previous message on Sun-4 "bug" by Sean Doyle. -smc]

Here is a session on my Sun-4/110 running 1.2 beta:

Mathematica (sun4) 1.2.beta (April 2, 1989) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
with I. Rivin and D. Withoff
Copyright 1988,1989 Wolfram Research Inc.
-- SunView graphics initialized --

In[1]:= <<lagbug.m

In[2]:= Delta[1] Delta[100] Delta[3]

                         3
Out[2]= ApplyLag[Identity  - LagOperator[1] - LagOperator[3] + 
 
                               2
>     LagOperator[4] - Identity  LagOperator[100] + LagOperator[101] + 
 
>     LagOperator[103] - LagOperator[104]]

In[3]:= 


Which appears to agree with your 1.1 3/60 answer.  So, something
seems better.  I will be getting the official non-beta 1.2
today.  I will ship you message and this one to the mailing list
also.

Steve Christensen


----- End Included Message -----


From stevec Thu May 18 13:18:46 1989
Return-Path: <stevec>
Received: by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA17313; Fri, 12 May 89 15:46:50 CDT
Date: Fri, 12 May 89 15:46:50 CDT
Message-Id: <8905122046.AA17313@yoda.ncsa.uiuc.edu>
To: mathgroup
Subject: Re:  bug reports..
From: stevec@ncsa.uiuc.edu
Reply-To: stevec@ncsa.uiuc.edu
Status: RO


For your bugs (from LFEAGIN@CALSTATE.BITNET), I get
(run in Sun verison 1.2):

In[1]:= Limit[ x/Sqrt[x^2], x->-Infinity ]

Out[1]= 1
 
In[2]:= Integrate[x b^(a x), x ]

         a x Log[b]        1            x
Out[2]= E           (-(----------) + --------)
                        2       2    a Log[b]
                       a  Log[b]

In[3]:= D[%,x]

         a x Log[b]
        E              a x Log[b]          1            x
Out[3]= ----------- + E           a (-(----------) + --------) Log[b]
         a Log[b]                       2       2    a Log[b]
                                       a  Log[b]

In[4]:= Expand[%]

         a x Log[b]
Out[4]= E             

When you ask Mathematica to Plot the function x/Sqrt[x] say from
-1 to 1, you get the step function with jump at 0, but the Limit
function does not give -1 as it probably should.       

In the second example, it is clear that the rules for E and Log's
are not automatic, but could easily be programmed in.

I note that Maple also gives 1 for In[1], But does simplify Out[4]
back to the x b^(a x).

Macsyma gives -1 for the limit, but does not simplify
the exponential automatically.

Steve

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

Steven M. Christensen
Senior Research Scientist (Theoretical Physics)
National Center for Supercomputing Applications
Beckman Institute for Advanced Science and Technology
University of Illinois at Urbana-Champaign
Urbana, Illinios 61801  USA

Phone: (217) 244-0544 (with answering machine)
Phone: (217) 244-0072 (main NCSA number for messages to a human being)
FAX:   (217) 244-2909
Email: stevec@ncsa.uiuc.edu (Internet)
Email: 14008@ncsavmsa.bitnet (Bitnet)

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




From mathgroup-adm@yoda.ncsa.uiuc.edu Mon May 22 15:21:42 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA10350; Mon, 22 May 89 15:21:41 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA02671; Mon, 22 May 89 15:21:51 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA22333; Mon, 22 May 89 15:21:47 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10268; Mon, 22 May 89 14:12:50 -0500
Date: Mon, 22 May 89 14:12:50 -0500
From: mathgroup-adm@yoda.ncsa.uiuc.edu
Message-Id: <8905221912.AA10268@yoda.ncsa.uiuc.edu>
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Mathematica Mailing List Modifications:

First, to all mailing list members, my apologies.  The mailing list
broke down seriously and many messages not ment for wide distribution,
especially requests to be added or removed from the list, were sent
and got out of control.  Further, many people were mailing to
an address that got sent immediately to everyone on the list without
a chance for me to filter it first.

In addition, bug reports which I thought might be of interest turned
out not to be.

Finally, some mail machines between my Sun-4 and your machines got
overwhelmed by the size of the mailing list (over 300 people and 
despite the number of people asking to be removed, there are more
asking to be added).  This caused many machines to stop somewhere
in the middle of a mailing, go down and then come back up and start
the mailings over again.  This ment that messages were often sent to
some people many times.

After having to deal with irate mail list members and literally
hundreds of messages of all kinds, I called in a consultant.  He
spent this weekend fixing the problems.  He moved much of the
responsibility for handling the mail to my machine so that mail
can avoid going through the sick intermediate machines when possible.
Now when anyone mails to the mailing list the mail will go to me
first and will not go out to the whole list.  This will avoid
repeated messages and add and remove requests.  This should reduce
the junk mail you will get from the mailing list to almost zero if
all goes well.

The vote about bug reports was heavily against having them unless they
are very significant bugs that could affect all users.  In any case,
I will try to label bug reports I do send out with the word
BUG in the Subject heading.  If you are not interested you can delete
it immediately.  However, so that those interested in bug reports are
not left out, I will archive bug reports on the archive server under
the directory Bugs.  In a lot of cases, I can answer the question
about the bug, so it is not necessary to sent it to the list.

I have also been asked to provide a mechanism for Bitnet users to get
the archives.  Periodically, I will send a table of contents to the
mailing list.  If you are a user who wants to receive a file via
email, send me a message and I will see to it.  Otherwise, I still
prefer that you use anonymous ftp when possible.

=============================================================================
So, here are the new addresses:

You may now mail to:

mathgroup@yoda.ncsa.uiuc.edu    or   stevec@ncsa.uiuc.edu
 
yoda is a Sun-4 with internet address:   128.174.222.70

Requests to be added or removed or other administrative
things go to:  mathgroup-request@yoda.ncsa.uiuc.edu.

Bitnet users can mail to me at 14008@ncsavmsa.bitnet

-----------------------------------------------------------------------------
The ftp server is

ftp.ncsa.uiuc.edu  and has internet address: 128.174.20.50

The current contents are:

/usr6/ftp/Symbolic/Mathematica   (main directory)

MathGroup_Mail_Archive (subdirectory)

MathGroupMail1 (file)

Packages (subdirectory)

Cochlear_Model  ShowTime.m      fourier.sh
Complex.m       VecCalc.m       mdefs.h          (individual files)

Sci.Math.Symbolic (subdirectory)

Archive1  Archive2  Archive3  (files)

Bugs  (subdirectory)

(empty right now)

============================================================================

If you have any problems sending to me, if you are getting duplicate
or seriously unwanted messages or have any other problem, please email
me at the mathgroup address above.  This is the first message sent
out under the new mechanism so I hope it works.

I also hope that the problems are taken care of and that you get some use
out of this list in the future.  Please contribute to make it work.

Thanks for your patience and sorry for the junk mail.  [One final note.
It is possible that there is still some junk left in the system.  I 
would like to know if you get any mail dated before this message.
I want to isolate the sick machines in the mail network.]


Steve Christensen

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

Steven M. Christensen
Senior Research Scientist (Theoretical Physics)
National Center for Supercomputing Applications
Beckman Institute for Advanced Science and Technology
University of Illinois at Urbana-Champaign
Urbana, Illinios 61801  USA

Phone: (217) 244-0544 (with answering machine)
Phone: (217) 244-0072 (main NCSA number for messages to a human being)
FAX:   (217) 244-2909
Email: stevec@ncsa.uiuc.edu (Internet)
Email: 14008@ncsavmsa.bitnet (Bitnet)
MathGroup:  mathgroup@yoda.ncsa.uiuc.edu
Mathgroup-request:  mathgroup-request@yoda.ncsa.uiuc.edu

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

From mathgroup-adm@yoda.ncsa.uiuc.edu Mon May 22 19:11:08 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA10622; Mon, 22 May 89 19:11:07 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA03287; Mon, 22 May 89 19:11:13 CDT
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA24990; Mon, 22 May 89 19:11:11 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10569; Mon, 22 May 89 17:46:35 -0500
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA02106; Thu, 18 May 89 10:31:42 CDT
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA15526; Thu, 18 May 89 10:29:13 CDT
Return-Path: <mbp@lakisis.umd.edu>
Received: from lakisis.umd.edu ([128.8.134.19]) by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA04426; Thu, 18 May 89 10:29:10 CDT
Date: Thu, 18 May 89 11:24:50 EDT
From: "Mark Phillips" <mbp@lakisis.umd.edu>
Message-Id: <8905181524.AA17012@lakisis.umd.edu>
Received: by lakisis.umd.edu; Thu, 18 May 89 11:24:50 EDT
To: stevec@ncsa.uiuc.edu
Subject: Complex.m --- a package for calculations with complex expressions
Status: RO

Hello MathGroupers, 
     Guess what!?  This is not a bug report or a request to be removed
from this list!  

[[ applause here ]]

     It's a package for dealing with complex expressions.  Have you
ever noticed that Mathematica doesn't evaluate Re[x], Conjugate[x],
etc, unless x is a number?  There are many situations, however, in
which it is nice to be able to delcare a symbol to represent a real
quantity, so that complex expressions involving that symbol and Re, Im,
Conjugate, and so on can be simplified.  This package defines the
function DeclareReal which does just this.  It also defines several
other functions which are useful in the context of calculations with
complex expressions.

     I would be interested in hearing what people think of it, plus
suggestions for how to improve it.  One thing that I have not been able
to work out satisfactorily is how to tell Mathematica that Sqrt[x] is
real when x is real an nonnegative.  The package currently just checks
for N[x]>=0, which works if x is a real number but not otherwise.
Similar problems exist for other functions, most notably Power, of
which Sqrt is just a special case.  Any ideas?

Mark Phillips			  mbp@lakisis.umd.edu   (arpanet)
Department of Mathematics         (301) 454-2693
University of Maryland	          
College Park, Maryland  20742     

---------snip snip------snip snip------snip snip------snip snip---------
(*
 * Complex.m:
 *	Allows symbols to be declared to represent real numbers.
 *	Expressions involving these symbols and Re,Im,Conjugate, etc,
 *	then simplify nicely.  Also defines some useful functions for
 *	manipulating complex expressions.
 *
 * Author: Mark B. Phillips	(mbp@lakisis.umd.edu)
 *	   Dept. of Mathematics
 *	   University of Maryland
 *	   May 18, 1989
 *
 * Typical usage:      
 *      
 *      In[1]:= <<Complex.m
 *      
 *      In[2]:= DeclareReal[x,y]
 *      
 *      In[3]:= z = x + I y
 *      
 *      Out[3]= x + I y
 *      
 *      In[4]:= ComplexNormSquared[z]
 *      
 *               2    2
 *      Out[4]= x  + y
 *      
 *      In[5]:= z / Conjugate[z]
 *      
 *              x + I y
 *      Out[5]= --------
 *              x + -I y
 *      
 *      In[6]:= ComplexCanonify[%]
 *      
 *                         2    2
 *              2 I x y   x  - y
 *      Out[6]= ------- + -------
 *               2    2    2    2
 *              x  + y    x  + y
 *)

BeginPackage["Complex`"]

RealQ::usage =
"RealQ[x] yields true if x is a real expression or the name of a function
which takes real numbers to real numbers."

DeclareReal::usage =
"DeclareReal[x, y, ...] declares x, y, ... to be real variables or
functions which take real numbers to real numbers.  The x, y,...
must be atoms."

RealValuedQ::usage =
"RealValuedQ[f] yields true if f is the name of a real-valued function."

DeclareRealValuedQ::usage =
"DeclareRealValuedQ[f, g, ...] declares f, g, ... to be the names of
real-valued functions.  The f, g, ... must be atoms."

ComplexNorm::usage =
"ComplexNorm[z] gives the Euclidean norm of the complex quantity z.
It is mathematically equal to Abs[z], but is immediately evaluated
using the formula Sqrt[ComplexNormSquared[z]]."

ComplexNormSquared::usage =
"ComplexNormSquared[z] gives the square of the Euclidean norm of the
complex quantity z."

AbsReduce::usage =
"AbsReduce[expr] writes expr as Sqrt[ Re[expr]^2 + Im[expr]^2 ]."

ComplexParametricPlot::usage =
"ComplexParametricPlot[f, args] plots the real and imaginary
parts of f in a parametric plot; it is equivalent to
ParametricPlot[{Re[f],Im[f]}, args ]."

ComplexCanonify::usage =
"ComplexCanonify[expr] gives the complex expression expr in the form
a + I b, where a and b are real."

Begin["`private`"]

(*----------------------------------------------------------------------*)
(* This is ReIm.m as distributed with version 1.1 of Mathematica.  It   *)
(* is specifically included here (rather than included indirectly)      *)
(* because the 1.2 beta version works differently.                      *)

Unprotect[Re,Im]

RealQ[Pi] := True
RealQ[E] := True
RealQ[EulerGamma] := True
RealQ[Sin] := True
RealQ[Cos] := True
RealQ[Tan] := True
RealQ[n_Integer] := True
RealQ[n_Real] := True
RealQ[n_Rational] := True

Re[f_[x_]] := f[x] /; RealQ[f] && RealQ[x]

Re[x_] := x /; RealQ[x]
Im[x_] := 0 /; RealQ[x]

Re[x_+y_] := Re[x] + Re[y]
Im[x_+y_] := Im[x] + Im[y]

Re[x_ y_] := Re[x] Re[y] - Im[x] Im[y]
Im[x_ y_] := Re[x] Im[y] + Im[x] Re[y]

Re[ 1 / x_ ] := Re[x] / (Re[x]^2 + Im[x]^2)
Im[ 1 / x_ ] := -Im[x] / (Re[x]^2 + Im[x]^2)

Re[E^x_] := Cos[Im[x]] Exp[Re[x]]
Im[E^x_] := Sin[Im[x]] Exp[Re[x]]

Im[x_ ^ 2] := 2 Re[x] Im[x]

Re[ x_ ^ n_Integer ] := Block[{a, b},
	a = Round[n/2];
	b = n-a;
	Re[x^a] Re[x^b] - Im[x^a] Im[x^b]
	]

Im[ x_ ^ n_Integer ] := Block[{a, b},
	a = Round[n/2];
	b = n-a;
	Re[x^a] Im[x^b] + Im[x^a] Re[x^b]
	]

Re[x_Integer ^ n_Rational] := 0                /; IntegerQ[2n] && x<0
Im[x_Integer ^ n_Rational] := 
	(-x) ^ n   (-1) ^ ((Numerator[n]-1)/2) /; IntegerQ[2n] && x<0

Re[x_Integer ^ n_Rational] := x^n /; OddQ[Denominator[n]] || x>0
Im[x_Integer ^ n_Rational] := 0   /; OddQ[Denominator[n]] || x>0

Re[(-1) ^ n_Rational] := Cos[n Pi]
Im[(-1) ^ n_Rational] := Sin[n Pi]

Re[Sin[x_]] := Sin[Re[x]] Cosh[Im[x]]
Im[Sin[x_]] := Cos[Re[x]] Sinh[Im[x]]

Re[Cos[x_]] :=  Cos[Re[x]] Cosh[Im[x]]
Im[Cos[x_]] := -Sin[Re[x]] Sinh[Im[x]]

Re[Tan[x_]] := Re[Sin[x]/Cos[x]]
Im[Tan[x_]] := Im[Sin[x]/Cos[x]]

Protect[Re,Im]
(* End of ReIm.m                                                        *)
(*----------------------------------------------------------------------*)

RealQ[f_[x_]] := True /; RealValuedQ[f]
RealValuedQ[Re] := True
RealValuedQ[Im] := True
RealValuedQ[Abs] := True
RealValuedQ[Arg] := True

(* NOTE: RealQ should have an option to specify how it does
   comparisons for <, >, ==, etc. Right now we just use N[#]. *)
RealQ[Sqrt[x_]] := True /; (RealQ[x] && (N[x] >= 0))
RealQ[x_?RealQ + y_?RealQ] := True
RealQ[x_?RealQ * y_?RealQ] := True
RealQ[x_?RealQ ^ -1] := True

Unprotect[Conjugate]
Conjugate[x_] := x /; Re[x] == x
Conjugate[x_ + y_] := Conjugate[x] + Conjugate[y]
Conjugate[x_ * y_] := Conjugate[x] * Conjugate[y]
Conjugate[Conjugate[x_]] := x
Conjugate[Exp[y_]] := Exp[-y] /; Re[y] == 0
Protect[Conjugate]

Unprotect[Arg]
Arg[x_] := 0 /; (Im[x]==0 && N[x]>0)
Arg[x_] := Pi /; (Im[x]==0 && N[x]<0)
Arg[0] = 0
Protect[Arg]

SetAttributes[DeclareReal, Listable]
DeclareReal[x_,y__] := (DeclareReal[{x,y}] ; Null)
DeclareReal[x_] := (x/: RealQ[x] = True ; Null)

SetAttributes[DeclareRealValued, Listable]
DeclareRealValued[f_,g__] := (DeclareRealValued[{f,g}] ; Null)
DeclareRealValued[f_] := (f/: RealValuedQ[f] = True ; Null)

ComplexNormSquared[z_] := Expand[ z Conjugate[z] ]

ComplexNorm[z_] := Sqrt[ComplexNormSquared[z]]

AbsReduce[e_] := e //. Abs[z_] -> Sqrt[ Re[z]^2 + Im[z]^2 ]

ComplexParametricPlot[f_, args__] := ParametricPlot[ {Re[f],Im[f]}, args ]

ComplexCanonify[z_] := Together[Expand[Re[z]]] + I Together[Expand[Im[z]]]

End[]

EndPackage[]


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May 30 14:22:17 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA18579; Tue, 30 May 89 14:22:16 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA23914; Tue, 30 May 89 14:22:05 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA16378; Tue, 30 May 89 14:22:02 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA18491; Tue, 30 May 89 11:35:37 -0500
Date: Tue, 30 May 89 11:35:37 -0500
From: mathgroup-adm@yoda.ncsa.uiuc.edu
Message-Id: <8905301635.AA18491@yoda.ncsa.uiuc.edu>
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

GASPARD@HROEUR5.BITNET Sun May 21 15:32:08 1989
Subject:  Colour output in Mathematica?

I use 386-Mathematica 1.1 with a VGA colour monitor.

Other than simple lines, I somehow cannot get Mathematica to display
colour graphics on the screen. Most of the time I get an empty frame.
The Mathematica book says it is complicated but provides little
clarification.

Could someone please post a complete example of a 3D colour graphic,
e.g. the one on the cover of the book.


Gaspard A. de Jong
Erasmus University Computing Center

===================================================================

[Here is my response. -smc]

The commands to produce the graphic similar to the one on the front of the 
Mathematica book are:

<<Colors.m
pi = N[Pi];
pi2 = 2.0 * pi;
Plot3D[{Abs[Gamma[x + I y]],
	HSBColor[(pi + Arg[Gamma[x + I y]])/pi2,1,1]},
	{x,-2.5,5},{y,-6,1},
	PlotRange->{0,6},ViewPoint->{-0.8,-2,1.2},
	BoxRatios->{1.2,1,0.7},PlotPoints->40]


I have not tested this on a 386 machine but it works on a Macintosh
and on a Sun.  If it doesn't work on your machine you might check
to make sure your installation was done to tell Mathematica you
have a VGA system.

Steve Christensen

=======================================================================

[Gaspard's response.]

Steve,

When your example (thanks for the quick reply by the way) didn't work, I
decided to look again at some other parameters.
Minstall correctly recognizes VGA 16 col. and creates DISPLAY.BAT
accordingly.
The cause of the problem turned out to be that the software makes my
Paradise VGA Prof. card default to MCGA mode (black & white). The problem
was solved by including a line in DISPLAY.BAT which explicitly puts the
card in VGA mode. This is a strange problem because VGA-mode is the card's
default setting and none of the other graphics programs I use has ever
given me problems in generating colour output. It might be worthwhile
checking the 386-version of the Mathematica display modules for a
possible problem here.
I have a request for a future release of the display software. The Paradise
card, like many VGA cards on the market, is capable of displaying 256 colours
in 640x480 resolution. It would be very nice to be able to use this feature
in Mathematica. At present only the expensive 8514 option offers this number
of colours. I expect it shouldn't be very difficult to add a few extended VGA
or extended EGA modes to the program.

Thank you again for your help.

Gaspard A. de Jong

============================================================================


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May 30 15:27:12 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA18645; Tue, 30 May 89 15:27:10 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA24113; Tue, 30 May 89 15:26:55 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA17278; Tue, 30 May 89 15:26:51 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA18563; Tue, 30 May 89 12:48:45 -0500
Date: Tue, 30 May 89 12:48:45 -0500
Message-Id: <8905301748.AA18563@yoda.ncsa.uiuc.edu>
From: sen@danny.math.unc.edu, Fri@yoda.ncsa.uiuc.edu, May@yoda.ncsa.uiuc.edu,
        19@yoda.ncsa.uiuc.edu, 15:17:48@yoda.ncsa.uiuc.edu,
        1989@yoda.ncsa.uiuc.edu
Subject: Plotting in Mathematica [4 messages]
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Steve,
  Here is a question about plotting in Mathematica. 
  1. Can one plot in a small part of the screen?
	For instance, suppose one wants to issue the command:
	  Plot[x^2,{x,-1,1}]
        and then one would like to have this plot restricted to the upper
        left quarter, i.e. 2nd quadrant of the graphics window.
  2. Can one use greek letters as text on plots?

Any help is appreciated.

	Sheldon Newhouse

=========================================================================

[I asked for clarification. This is Sheldon's response. -smc]

Yes, I would like to plot in a quadrant of a window sometimes.  For instance,
I would like to make a page with a window at the top and text at the bottom, 
or perhaps a window on one wide and text on another side.  If they cannot yet
do this (or the greek letters), perhaps they would consider adding these options.  I think many users would like them, and it would not be too hard to do it.

Sheldon

===========================================================================

Steve,
 I am certain that one can set up procedures in mathematica to plot 
on parts of a window as I asked you.  
   For instance, 
  
  g1 = Graphics[Line[{{0,0},{1,1}}]];
  g2 = Graphics[{GrayLevel[1.],Point[{2,0}]}];
 
  Show[g1,g2];

  plots a line in the left half of the window.
   
 Similarly, 

  g1 = Graphics[Line[{{0,0},{1,1}}]];
  g3 = Graphics[{GrayLevel[1.],Point[{2,-1}]}];
  Show[g1,g3];

 plots the line in the upper left-hand quarter of the window.
 
 Of course, routines could be written to do this with any plot, but
 one good thing about mathematica is that it has many useful procedures 
 which don't require programming.

 What about asking the people at Wolfram & Assoc. to add an option to 
 Plot, ParametricPlot, ListPlot, Graphics3D, etc , say of the form

  ViewPort -> {x,y,z,w} 

 where x,y,z,w are real numbers in [0,1] with 0 <= x < y <= 1 and 
  0 <= z < w <= 1
  and this option means: do the plot in the subwindow whose horizontal
 coordinates go from x to y ( with 0 to 1 meaning the whole horizontal extent
 of the window), and 
 whose vertical coordinates go from z to w ( again with 0 to 1 meaning 
 the whole vertical extent of the window).

  Thus, ViewPort -> {0,.5,.5,1}
  would mean the upper left-hand quarter of the window,
      
    ViewPort -> {.5,1,.5,1} 
  would mean the upper right-handquarter of the window,etc.

- Sheldon

===========================================================================

 Steve,
 Of course in my last message, 3D graphics would require a 
 ViewPort setting which is a six-tuple, say {x,y,z,w,u,v}

-sheldon

============================================================================

From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jun  5 16:53:45 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02910; Mon, 5 Jun 89 16:53:44 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA19414; Mon, 5 Jun 89 16:52:18 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA29844; Mon, 5 Jun 89 16:52:16 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02884; Mon, 5 Jun 89 16:04:57 -0500
Date: Mon, 5 Jun 89 16:04:57 -0500
Message-Id: <8906052104.AA02884@yoda.ncsa.uiuc.edu>
From: rhs@flash.bellcore.com
Subject: MathExec() bug (?)
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

On p. 586 of the manual, it is claimed that MathExec("expr") evaluate[s] expr
as Mathematica input, and return[s] the result as a string.
On the sun 4 1.1 version (though mathlink.c is in common so I expect this
is true everywhere), there is no mechanism for returning the result to the
user program that I can see.  And it doesn't seem to work.  (I can get 
MathExec to work, it just doesn't return anything)

I haven't seen anything anywhere about this. Ideas?

More generally, how does one pump a lot of numbers efficiently into the 
user program, i.e. suppose one wants to send a 50 by 50 matrix from Mathematica
to the user program.  I don't see how the mechanism of Section B.7.6 allows
this except through MathExec() as above (which looks kludgy but doable if
it worked).


rhs@flash.bellcore.com

From fischer@slothrop.math.ufl.edu Tue Jun  6 10:19:01 1989
Received: from slothrop.math.ufl.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03889; Tue, 6 Jun 89 10:18:53 -0500
From: fischer@slothrop.math.ufl.edu
Received:  by slothrop.math.ufl.edu (5.61ufl/4.03)
	id AA10565; Tue, 6 Jun 89 11:18:50 -0400
Date: Tue, 6 Jun 89 11:18:50 -0400
Message-Id: <8906061518.AA10565@slothrop.math.ufl.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: endless loop in TrigExpand?
Reply-To: jde@mathlab.math.ufl.edu
Status: RO


Please reply to jde@mathlab.math.ufl.edu (James D English).

Problem:  When, using Mathematica, the following command is entered:
 
         TrigExpand[ Cos[t1] Sin[t2] + Cos[t2] Sin[t1]]

the following, expected result is displayed (almost immediately) :

         Sin[t1 + t2]

However, a problem arises when the following is entered:

         TrigExpand[Cos[t1] Sin[t2] Sin[t3] + Cos[t2] Sin[t1] Sin[t3]]

rather than the expected Sin[t1 +t2] Sin[t3], the program goes into
what appears to be an endless loop.
 
Nor does it work when the function is entered in the following form:

	 TrigExpand[(Cos[t1] Sin[t2] + Cos[t2] Sin[t1])Sin[t3]] 


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Jun 17 01:40:48 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA16367; Sat, 17 Jun 89 01:40:47 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA18129; Sat, 17 Jun 89 01:40:36 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA21859; Sat, 17 Jun 89 01:40:35 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA16355; Sat, 17 Jun 89 01:07:00 -0500
Date: Sat, 17 Jun 89 01:07:00 -0500
Message-Id: <8906170607.AA16355@yoda.ncsa.uiuc.edu>
From: leon@extro.ucc.su.oz.au
Subject: Postscript macros in Mathematica
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Mathematica users,

I would like to incorporate the postscript graphics generated by Mathematica in
other documents (and on other computers), however the postscript text generated
contains a number of macros (Mpstart, Mscale, Msboxa, Mshowa, Mistroke,
MfstrokeMpend and perhaps others I haven't come across yet).

Is there anyway of finding out what these commands do in terms of standard
postscript commands.

Any help is appreciated.

Leon Poladian
leon@extro.ucc.su.OZ.AU


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jun 19 17:29:59 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA18381; Mon, 19 Jun 89 17:29:57 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA27361; Mon, 19 Jun 89 17:29:39 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA18866; Mon, 19 Jun 89 16:08:18 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA18240; Mon, 19 Jun 89 12:31:49 -0500
Date: Mon, 19 Jun 89 12:31:49 -0500
Message-Id: <8906191731.AA18240@yoda.ncsa.uiuc.edu>
From: dhj@rice.edu
Subject: Mathematica Postscript Macros
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

The PostScript file can be intercepted on its way to the printer on any
Macintosh. When you print, you acknowledge the dialog box which says what
printer you are accessing, the number of copies, etc. Now comes the new
part: after clicking OK, hold down command-f. Rather than messages appearing
about searching for printer, starting job, etc., you obtain the message
"Creating PostScript File". Nothing is printed, but a file is created in the
directory from which Mathematica was launched named PostScript0. This file
is pure text and contains Mathematica's macro definitions and the description
of what you wanted to print. By the way, this procedure will NOT work if you
are running under MultiFinder and are using the PrintMonitor.
	For those who find this inconvenient or don't have a Mac, here is
what my version of Mathematica has for its PostScript macro definitions.

	Don H. Johnson
	Elec. & Comp. Eng. Dept.
	Rice University
        dhj@rice.edu


/Mnodistort true def
/Mpstart {
    MathPictureStart
} bind def
/Mpend {
    MathPictureEnd
} bind def
/Mscale {
    0 1 0 1
    5 -1 roll
    MathScale
} bind def
/Plain
	/Courier findfont
def
/Bold
	/Courier-Bold findfont
def
/Italic
	/Courier-Oblique findfont
def
/MathPictureStart {
	gsave
	newpath
	Mleft
	Mbottom
	translate
	1 -1 scale
	/Mtmatrix
	matrix currentmatrix
	def
	Plain
	Mfontsize scalefont
	setfont
0 setgray 0 setlinewidth
} bind def
/MathPictureEnd {
	grestore
} bind def
/Mdot {
	moveto
	0 0 rlineto
	stroke
} bind def
/Mtetra {
	moveto
	lineto
	lineto
	lineto
	fill
} bind def
/Metetra {
	moveto
	lineto
	lineto
	lineto
	closepath
	gsave
	fill
	grestore
	0 setgray
	stroke
} bind def
/Mistroke {
	flattenpath
	0 0 0
	{
	4 2 roll
	pop pop
	}
	{
	4 -1 roll
	2 index
	sub dup mul
	4 -1 roll
	2 index
	sub dup mul
	add sqrt
	4 -1 roll
	add
	3 1 roll
	}
	{
	stop
	}
	{
	stop
	}
	pathforall
	pop pop
	currentpoint
	stroke
	moveto
	currentdash
	3 -1 roll
	add
	setdash
} bind def
/Mfstroke {
	stroke
	currentdash
	pop 0
	setdash
} bind def
/Msboxa {
	newpath
	5 -1 roll
	Mvboxa
	pop
	6 -1 roll
	5 -1 roll
	4 -1 roll
	Msboxa1
	5 -3 roll
	Msboxa1
	[
	7 -2 roll
	[ 2 index 2 index
	10 -1 roll
	9 -1 roll
	]
	6 1 roll
	5 -2 roll
	]
} bind def
	
/Msboxa1 {
	sub
	2 div
	dup
	2 index
	1 add
	mul
	3 -1 roll
	-1 add
	3 -1 roll
	mul
} bind def
/Mvboxa {
	gsave
	newpath
	[ true
	3 -1 roll
	{
	Mbbox
	5 -1 roll
	{
	0
	5 1 roll
	}
	{
	7 -1 roll
	exch sub
	(m) stringwidth pop
	.3 mul
	sub
	7 1 roll
	6 -1 roll
	4 -1 roll
	Mmin
	3 -1 roll
	5 index
	add
	5 -1 roll
	4 -1 roll
	Mmax
	4 -1 roll
	}
	ifelse
	false
	}
	forall
	{ stop } if
	counttomark
	1 add
	4 roll
	]
	grestore
} bind def
/Mbbox {
	0 0 moveto
	false charpath
	flattenpath
	pathbbox
	newpath
} bind def
/Mmin {
	2 copy
	gt
	{ exch } if
	pop
} bind def
/Mmax {
	2 copy
	lt
	{ exch } if
	popSERT \  
} bind def
/Mshowa {
	4 -2 roll
	moveto
	2 index
	Mtmatrix setmatrix
	Mvboxa
	7 1 roll
	6 -1 roll
	5 -1 roll
	4 -1 roll
	Mshowa1
	4 1 roll
	Mshowa1
	rmoveto
	currentpoint
	0 1
	4 index length
	-1 add
	{
	2 index
	4 index
	2 index
	get
	3 index
	add
	moveto
	4 index
	exch get
	show
	} for
	pop pop pop pop
	Mgmatrix setmatrix
} bind def
/Mshowa1 {
	2 copy
	add
	4 1 roll
	sub
	mul
	sub
	-2 div
} bind def
/MathScale {
	Mwidth
	Mheight
	Mlp
	translate
	scale
	pop pop pop pop
	/Mgmatrix
	matrix currentmatrix
	def
} bind def
/Mlp {
	3 copy
	Mlpfirst
	{
	Mnodistort
	{
	Mmin
	dup
	} if
	4 index
	2 index
	2 index
	Mlprun
	11 index
	11 -1 roll
	10 -4 roll
	Mlp1
	8 index
	9 -5 roll
	Mlp1
	4 -1 roll
	and
	{ exit } if
	3 -1 roll
	pop pop
	} loop
	exch
	3 1 roll
	7 -3 roll
	pop pop pop
} bind def
/Mlpfirst {
	3 -1 roll
	dup length
	2 copy
	-2 add
	get
	aload
	pop pop pop
	4 -2 roll
	-1 add
	get
	aload
	pop pop pop
	6 -1 roll
	3 -1 roll
	5 -1 roll
	sub
	div
	4 1 roll
	exch sub
	div
} bind def
/Mlprun {
	2 copy
	4 index
	0 get
	dup
	4 1 roll
	Mlprun1
	3 copy
	8 -2 roll
	9 -1 roll
	{
	3 copy
	Mlprun1
	3 copy
	11 -3 roll
	/gt Mlpminmax
	8 3 roll
	11 -3 roll
	/lt Mlpminmax
	8 3 roll
	} forall
	pop pop pop pop
	3 1 roll
	pop pop
	aload pop
	5 -1 roll
	aload pop
	exch
	6 -1 roll
	Mlprun2
	8 2 roll
	4 -1 roll
	Mlprun2
	6 2 roll
	3 -1 roll
	Mlprun2
	4 2 roll
	exch
	Mlprun2
	6 2 roll
} bind def
/Mlprun1 {
	aload pop
	exch
	6 -1 roll
	5 -1 roll
	mul add
	4 -2 roll
	mul
	3 -1 roll
	add
} bind def
/Mlprun2 {
	2 copy
	add 2 div
	3 1 roll
	exch sub
} bind def
/Mlpminmax {
	cvx
	2 index
	6 index
	2 index
	exec
	{
	7 -3 roll
	4 -1 roll
	} if
	1 index
	5 index
	3 -1 roll
	exec
	{
	4 1 roll
	pop
	5 -1 roll
	aload
	pop pop
	4 -1 roll
	aload pop
	[
	8 -2 roll
	pop
	5 -2 roll
	pop
	6 -2 roll
	pop
	5 -1 roll
	]
	4 1 roll
	pop
	}
	{
	pop pop pop
	} ifelse
} bind def
/Mlp1 {
	5 index
	3 index	sub
	5 index
	2 index mul
	1 index
	le
	1 index
	0 le
	or
	dup
	not
	{
	1 index
	3 index	div
	.99999 mul
	8 -1 roll
	pop
	7 1 roll
	}
	if
	8 -1 roll
	2 div
	7 -2 roll
	pop sub
	5 index
	6 -3 roll
	pop pop
	mul sub
	exch
} bind def



From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jun 19 18:15:33 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA18468; Mon, 19 Jun 89 18:15:32 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA27478; Mon, 19 Jun 89 18:15:25 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA19940; Mon, 19 Jun 89 18:15:24 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA18286; Mon, 19 Jun 89 14:51:49 -0500
Date: Mon, 19 Jun 89 14:51:49 -0500
Message-Id: <8906191951.AA18286@yoda.ncsa.uiuc.edu>
From: jack@sun.acs.udel.edu
Subject: Mathematica Problem
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Perhaps someone can help solve the following Mathematica problem:

     Given y' = y, 

solve using a series solution and prove that the result is E[x].  

It is proving that the result is E[x] that I have not been able to do.
Here is a sample session:

In[1]:= Derivative[n_][y][x_]:=Derivative[n-1][y][x]

In[2]:= Series[y[x],{x,0,5}]

                              2         3         4         5
                        y[0] x    y[0] x    y[0] x    y[0] x        6
Out[2]= y[0] + y[0] x + ------- + ------- + ------- + ------- + O[x]
                           2         6        24        120

In[3]:= seriesbyy0[x_,n_]:=Normal[Expand[Cancel[Series[y[x],{x,0,n}]/y[0]]]]

In[4]:= expseries[x_,n_]:=Sum[x^i/i!,{i,0,n}]

In[5]:= seriesbyy0[x,6]

                 2    3    4    5     6
                x    x    x    x     x
Out[5]= 1 + x + -- + -- + -- + --- + ---
                2    6    24   120   720

In[6]:= expseries[x,6]

                 2    3    4    5     6
                x    x    x    x     x
Out[6]= 1 + x + -- + -- + -- + --- + ---
                2    6    24   120   720


In[7]:= seriesbyy0[x,100]-expseries[x,100]

Out[7]= 0


As shown, I can prove the results are identical for a constant value of
the argument "n", but not for general n.  I realize that the identity is 
proven by visual inspection, but I would like to prove it by showing the 
identity 

	    seriesbyy0[x,n]  ==  expseries[x,n]

evaluates to true.  I have tried LogicalExpand, but to no avail.


				Jack Seltzer
                                jack@sun.acs.udel.edu
 


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Jun 20 01:38:49 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA19297; Tue, 20 Jun 89 01:38:48 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA29363; Tue, 20 Jun 89 01:38:43 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA23238; Tue, 20 Jun 89 01:38:41 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA18677; Mon, 19 Jun 89 23:22:16 -0500
Date: Mon, 19 Jun 89 23:22:16 -0500
Message-Id: <8906200422.AA18677@yoda.ncsa.uiuc.edu>
From: dooley@ernie.Berkeley.EDU
Subject: Re: Mathematica Problem
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Considering the following result proven by Mathematica,
I wonder exactly how useful a proof like the one you
describe would be.  Mathematica (as well as any other
of the popular computer algebra systems) is not a proof
system; it merely answers your questions.

Sam Dooley
dooley@ernie.Berkeley.EDU

IBM RT PC AIX Mathematica 1.1 (September 29, 1988) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
Copyright 1988 Wolfram Research Inc.
-- Terminal graphics initialized --

In[1]:= Sin[x] ^ 2 == 1 - Cos[x] ^ 2

              2              2
Out[1]= Sin[x]  == 1 - Cos[x]

In[2]:= Series[%, {x, 0, 5}]

                                     4
                        2   2 False x        6
Out[2]= True + 2 False x  - ---------- + O[x]
                                3


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Jun 21 01:40:29 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA20558; Wed, 21 Jun 89 01:40:27 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA04128; Wed, 21 Jun 89 01:40:19 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA08920; Wed, 21 Jun 89 01:40:18 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA20469; Wed, 21 Jun 89 00:35:34 -0500
Date: Wed, 21 Jun 89 00:35:34 -0500
Message-Id: <8906210535.AA20469@yoda.ncsa.uiuc.edu>
From: Dallas_Burtraw@um.cc.umich.edu
Subject: Two problems
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Greetings.  I am in the Economics Dept at Michigan and have been using
Mathematica for a little while.  Two questions have surfaced that we
have not been able to resolve.  Can you help?
	First, I want to attach a penalty in a function within a program, so
for example, I always want x > xo. The number x is a real.  I want to write
((x - xo)^2)^(.5) - (x - xo) which is 0 for x nonnegative and greater than
0 for x negative.  The problem is Mathematica automatically simplifies this
algebra.  Is there a way to prevent that?
	The second, more substantial question is the reason the first came up.
It seems Mathematica can not use its problem solving techniques, either
Solve or FindRoot, over conditional statements.  For example,
f(x) = x if ....
f(x) = x^2 otherwise.
Writing such a conditional with If or Which, then FindRoot can not
solve because it can not compute the derivatives.  Is there a way around
this other than calculating maximization conditions separately and then
rewriting a new conditional?  It seems like an easy fix within the 
program if it truly is a bug.
	The real issue on this second question is the construction of a constrained
maximization or Lagrangian problem.  It seems clumsy, but I have had to
solve each f(x) = x, etc. and then test the "if" statement.  This wastes
time and I lose any numerical value for the Lagrangian weight on the 
constraint.  Do you have suggestions?

	Regards, Dallas Burtraw
        Dallas_Burtraw@um.cc.umich.edu

From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun 22 14:46:30 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA21955; Thu, 22 Jun 89 14:46:29 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA10793; Thu, 22 Jun 89 14:46:24 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00662; Thu, 22 Jun 89 14:46:21 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA21916; Thu, 22 Jun 89 13:48:20 -0500
Date: Thu, 22 Jun 89 13:48:20 -0500
Message-Id: <8906221848.AA21916@yoda.ncsa.uiuc.edu>
From: mike@imager.mit.edu
Subject: Quaternions in Mathematica?
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

I'm interested in MathGroup.  My particular interest is in quaternion
mathematics.  I've been trying to develop a package around a Quaternion
data type and have been having trouble when it comes to defining
multiplication.  If anyone else is taking a stab at this I'm interested.
My address is :

	mike@imager.mit.edu

Thanks.


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun 22 15:55:06 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA21999; Thu, 22 Jun 89 15:55:05 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA11297; Thu, 22 Jun 89 15:55:00 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA01640; Thu, 22 Jun 89 15:54:57 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA21919; Thu, 22 Jun 89 13:51:01 -0500
Date: Thu, 22 Jun 89 13:51:01 -0500
Message-Id: <8906221851.AA21919@yoda.ncsa.uiuc.edu>
From: Richard Petti <petti@ALLEGHENY.SCRC.Symbolics.COM>
Subject: Two problems
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

    Date: Wed, 21 Jun 89 00:35:34 -0500
    From: Dallas_Burtraw@um.cc.umich.edu

    Greetings.  I am in the Economics Dept at Michigan and have been using
    Mathematica for a little while.  Two questions have surfaced that we
    have not been able to resolve.  Can you help?
	    First, I want to attach a penalty in a function within a program, so
    for example, I always want x > xo. The number x is a real.  I want to write
    ((x - xo)^2)^(.5) - (x - xo) which is 0 for x nonnegative and greater than
    0 for x negative.  The problem is Mathematica automatically simplifies this
    algebra.  Is there a way to prevent that?

I can only suggest how these problems are solved using MACSYMA. Perhaps
Mathematica has similar features. MACSYMA is quite careful about assumptions
like SQRT(X^2) -> ABS(X), and has a data base for storing facts about
symbolic variables. It helps in this case:

(C1) F1:SQRT((X-X0)^2)-(X-X0);

(D1) 							 ABS(X0 - X) + X0 - X

(C2) ASSUME(X-X0 > 0);

(D2) 							       [X > X0]

(C3) F2:SQRT((X-X0)^2)-(X-X0);

(D3) 								   0

(C4) FORGET(X-X0 > 0);

(D4) 							       [X > X0]

(C5) F3:SQRT((X-X0)^2)-(X-X0);

(D5) 							 ABS(X0 - X) + X0 - X

(C6) ASSUME(X-X0 < 0);

(D6) 							       [X0 > X]

(C7) F4:SQRT((X-X0)^2)-(X-X0);

(D7) 							      2 X0 - 2 X

(C8) FORGET(X-X0 < 0);

(D8) 							       [X0 > X]

The MACSYMA data base can store many other types of properties and use them
in calculuations. For example consider the greatest integer function ENTIER:

(C16) ENTIER(3/2);

(D16) 								   1

(C17) ENTIER(Y);

(D17) 							       ENTIER(Y)

(C18) DECLARE(Y,INTEGER);

(D18) 								 DONE

(C19) ENTIER(Y);

(D19) 								   Y


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

    The second, more substantial question is the reason the first came up.
    It seems Mathematica can not use its problem solving techniques, either
    Solve or FindRoot, over conditional statements.  For example,
    f(x) = x if ....
    f(x) = x^2 otherwise.
    Writing such a conditional with If or Which, then FindRoot can not
    solve because it can not compute the derivatives.  Is there a way around
    this other than calculating maximization conditions separately and then
    rewriting a new conditional?  It seems like an easy fix within the 
    program if it truly is a bug.

    The real issue on this second question is the construction of a constrained
    maximization or Lagrangian problem.  It seems clumsy, but I have had to
    solve each f(x) = x, etc. and then test the "if" statement.  This wastes
    time and I lose any numerical value for the Lagrangian weight on the 
    constraint.  Do you have suggestions?

	    Regards, Dallas Burtraw
	    Dallas_Burtraw@um.cc.umich.edu

MACSYMA's ROOT_BY_BISECTION command handles functions, including compiled 
user-defined functions. The functions can include logical operations like
conditional branching (if-then) statements. Example:

(C1) F(X):=IF X > 0 THEN 2*(X-3) ELSE 3*(X-3);

(D1) 			    F(X) := IF X > 0 THEN 2 (X - 3) ELSE 3 (X - 3)

(C2) COMPILE(F);

(D2) 						  [F]

(C3) ROOT_BY_BISECTION(F,0.0,10.0);

(D3) 						  3.0



Dick Petti
Director,
Computer Aided Mathematics Group
Symbolics, Inc.
email: petti@symbolics.com


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Jul 26 19:01:12 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA01531; Wed, 26 Jul 89 19:01:11 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA18277; Wed, 26 Jul 89 19:01:42 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA12107; Wed, 26 Jul 89 19:01:40 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01500; Wed, 26 Jul 89 17:28:34 -0500
Date: Wed, 26 Jul 89 17:28:34 -0500
Message-Id: <8907262228.AA01500@yoda.ncsa.uiuc.edu>
From: wang-samuel@YALE.EDU
Subject: Mathematica graphics in X11
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Does any one know whether Mathematica graphics works in X11.
I got the following error message when I tried the following
simple graphics command.

SunMathematica (sun3.68881) 1.1 (September 14, 1988) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
Copyright 1988 Wolfram Research Inc.
-- X11 windows graphics initialized --

In[1]:= Plot[x, {x, 0, 1}]
0.383333 Second

Out[1]= -Graphics-

In[2]:= %%[ Error: setup_fonts: can't load font; OffendingCommand: (null) ]%%

It seems that Mathematica cannot handle the font names in the
latest release of the X window system.  I would appreciate it very
much if anyone has any suggestions for solving this problem.

				Sam Wang

<wang-samuel@YALE.EDU>

From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jul 27 00:05:15 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02245; Thu, 27 Jul 89 00:05:13 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA19683; Thu, 27 Jul 89 00:05:37 CDT
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA15717; Thu, 27 Jul 89 00:05:33 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01644; Wed, 26 Jul 89 23:06:59 -0500
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA01603; Wed, 26 Jul 89 22:37:30 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA18668; Wed, 26 Jul 89 22:38:13 CDT
Return-Path: <myers@helios.TN.cornell.edu>
Received: from cu-arpa.cs.cornell.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA13856; Wed, 26 Jul 89 22:38:10 CDT
Received: from ARTEMIS.TN.CORNELL.EDU by cu-arpa.cs.cornell.edu (5.61+2/1.91d)
	id AA07966; Wed, 26 Jul 89 23:36:40 -0400
Received: from localhost by artemis.TN.CORNELL.EDU (3.2/1.1nn-Cornell-LASSP)
	id AA01877; Wed, 26 Jul 89 23:34:13 EDT
Message-Id: <8907270334.AA01877@artemis.TN.CORNELL.EDU>
To: steve@ncsa.uiuc.edu
Subject: Mathematica graphics in X11
Date: Wed, 26 Jul 89 23:34:11 -0400
From: myers@helios.TN.cornell.edu
Status: RO

This is in response to Sam Wang's question about getting Mathematica
graphics in X11R3. (I presume he meant R3, although he never said so
explicitly.)  The secret lies in setting the shell environment variable
XPSFONT to something that exists under X11R3.  We have used 

			setenv XPSFONT 9x15

and this does the trick. (Just set it in .cshrc).  There may be other 
fonts that work too.

					Chris Myers
      					myers@helios.tn.cornell.edu



From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Jul 29 14:07:02 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA04721; Sat, 29 Jul 89 14:07:01 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05203; Sat, 29 Jul 89 14:07:36 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA28422; Sat, 29 Jul 89 14:07:34 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04670; Sat, 29 Jul 89 12:46:54 -0500
Date: Sat, 29 Jul 89 12:46:54 -0500
Message-Id: <8907291746.AA04670@yoda.ncsa.uiuc.edu>
From: joe@wri.UUCP (Joe Grohens)
Subject: Mathematica at SIGGRAPH
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

[For those of you going to SIGGRAPH in Boston, here is some
information on WRI people who will be there.  I will be there
also. - Steve Christensen.]

Attending Siggraph will be:
        Theodore Gray
        Igor Rivin
        Stephen Wolfram
        Yossi Friedman
        Paul Abbot
        Kevin McIssac (I think)

Mathematica will be at several booths.
.........................................................................

Mathematica at SIGGRAPH '89

As well as being used to work out the mathematics in many SIGGRAPH papers,
Mathematica can be seen in action in several places this year:

- Stellar/Apple 2D and 3D Visualization Workshop: July 31, 8:30-5:30
- Ongoing demonstrations at these exhibits: Apple (#1518); Apollo (#404);
  and DEC (#318).

Mathematica product literature is available at these demonstrations.
See our ad on the back cover of the current Communications of the ACM.

.....................................................................

From mathgroup-adm@yoda.ncsa.uiuc.edu Sun Jul 30 01:45:13 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA05584; Sun, 30 Jul 89 01:45:12 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA07401; Sun, 30 Jul 89 01:43:50 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05285; Sun, 30 Jul 89 01:43:49 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA05574; Sun, 30 Jul 89 00:45:39 -0500
Date: Sun, 30 Jul 89 00:45:39 -0500
Message-Id: <8907300545.AA05574@yoda.ncsa.uiuc.edu>
From: dhj@rice.edu
Subject: Matrix Algebra Package
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Has anyone developed a matrix algrebra package for Mathematica? I need one
that knows about matrix dimensions, manipulation rules, (esp. invertibility
rules), and other goodies such as trace and determinant rules. I know this
is fairly straightforward, but someone must have written one somewhere.

	Don Johnson
	Electrical & Computer Engineering
	Rice University
	(dhj@rice.edu)



From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Aug 29 23:40:30 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA05543; Tue, 29 Aug 89 23:40:29 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA08667; Tue, 29 Aug 89 23:41:24 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA23606; Tue, 29 Aug 89 23:41:22 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA05451; Tue, 29 Aug 89 21:54:04 -0500
Date: Tue, 29 Aug 89 21:54:04 -0500
Message-Id: <8908300254.AA05451@yoda.ncsa.uiuc.edu>
From: Ron Heasley <RHEASLEY@allegvm.bitnet>
Subject:      Notebooks for NeXT
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

     What can anyone tell me about the availability of
commercial or public domain notebooks that will work on the NeXT computer?

Ron Heasley
Academic Computing
Allegheny College
rheasley@allegvm.bitnet


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Aug 30 00:37:27 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA06218; Wed, 30 Aug 89 00:37:26 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA09997; Wed, 30 Aug 89 00:38:20 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA25360; Wed, 30 Aug 89 00:38:19 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA05455; Tue, 29 Aug 89 21:55:15 -0500
Date: Tue, 29 Aug 89 21:55:15 -0500
Message-Id: <8908300255.AA05455@yoda.ncsa.uiuc.edu>
Subject: Using MathExec
From: Ron I. Herman <m1rih00@arcws9.UUCP>
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

I running Mathematica(1.1) on under Sun 4.0.3 and am
trying to use MathExec from an external C program. I've
been unable to get anything returned to the C program.
According to the text on pg. 586, the results of MathExec
are returned as a string. Does this really work
on the Sun? Any suggestions?

Thanks.
Ron Herman(Federal Reserve)


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Aug 30 01:10:34 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA06292; Wed, 30 Aug 89 01:10:33 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA10035; Wed, 30 Aug 89 01:11:31 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA25639; Wed, 30 Aug 89 01:11:29 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA05458; Tue, 29 Aug 89 21:56:16 -0500
Date: Tue, 29 Aug 89 21:56:16 -0500
Message-Id: <8908300256.AA05458@yoda.ncsa.uiuc.edu>
From: Victor Sparrow <sparrow@osiris.cso.uiuc.edu>
Subject: Something for the Mathematica mailing list
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Steve, this is for the Mathematica mailing list:

Does anyone know of how to make ListPlot[] use plotting
points other than filled circles?  I have several classes
of discrete data I need plot on one graph.  It would be
nice if one class of data was plotted as circles, another
class as squares, another as triangles, etc.

Graphics programming is not my forte.  Thanks.

Vic Sparrow
sparrow@osiris.cso.uiuc.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Aug 30 01:18:32 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA06297; Wed, 30 Aug 89 01:18:31 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA10062; Wed, 30 Aug 89 01:19:26 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA25787; Wed, 30 Aug 89 01:19:24 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA05449; Tue, 29 Aug 89 21:53:35 -0500
Date: Tue, 29 Aug 89 21:53:35 -0500
Message-Id: <8908300253.AA05449@yoda.ncsa.uiuc.edu>
From: stevec@yoda.ncsa.uiuc.edu
Subject: MathGroup mailing list
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Various hardware, software and time constraints
have slowed down the mailing list, but all now
seems to be in order again.  The ftp server had
disks problems but now is operational.  Somehow
the mailer software got corrupted but our local
mail guru fixed it.  I have been out of town
most of August.  The archives will be updated
in the next few weeks and some new packages will
be installed.  I will send a message to the list
when I have that completed.  

I strongly urge you to submit packages, functions,
nice graphics or other Mathematica good stuff for
archiving.

Mathematica is now at level 1.2 with some nice new
features in the front end on the Mac and NeXT versions
and some significant additions and fixes.  I urge
those of you using older versions to upgrade.

There are now nearly 400 sites or persons on the list
and I am sure many of you have interesting programs or
comments.  Please help to make the list active.

Steve Christensen
University of Illinois at Urbana-Champaign

From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Aug 30 01:42:26 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA06347; Wed, 30 Aug 89 01:42:25 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA10101; Wed, 30 Aug 89 01:43:20 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA26133; Wed, 30 Aug 89 01:43:19 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA05465; Tue, 29 Aug 89 21:59:25 -0500
Date: Tue, 29 Aug 89 21:59:25 -0500
Message-Id: <8908300259.AA05465@yoda.ncsa.uiuc.edu>
From: DCRUZ%T9ACC1@sc.intel.com
Subject: RATES Problem
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Hi,

I've just been added to the mathematica mailing list.
I've problem setting the equation for this one.  This is
a MAXIMA-MINIMA problem.

The cost of fuel per hour for running a ship is proportional
to the cube of the speed and is $ 27 per hour when the speed
is 12 miles per hour.  Other costs amounts to $ 128 per hour
regardless of the speed.  Express the cost per mile as a
function of the speed, & find the speed that makes the cost
minimum.

The equation I was able to set up was:
C = V^3 + 128

But from there I don't know how to go about getting
the $ 27 per hr when V=12 miles per hour into the system of 
equations.  Could someone please help me solve this problem
and also pls elaborate on how to think through problems like these.

Take care & thanks to all
Dave Cruz   
dcruz@t9acc1.intel.com


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Aug 30 02:08:06 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA06425; Wed, 30 Aug 89 02:08:05 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA10231; Wed, 30 Aug 89 02:08:56 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA26338; Wed, 30 Aug 89 02:08:53 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA05453; Tue, 29 Aug 89 21:54:41 -0500
Date: Tue, 29 Aug 89 21:54:41 -0500
Message-Id: <8908300254.AA05453@yoda.ncsa.uiuc.edu>
From: lisa@wri.UUCP
Subject: New in Version 1.2
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Mathematica--New in Version 1.2

Overview
--------

Many minor problems have been fixed.  Many operations have 
been made much more efficient.  Various new features have 
been added.  The new features are compatible with Version 1.1.

Basic System Features
---------------------

Responsiveness to interrupts has been improved throughout the 
system.  Hash tables have been introduced to allow lists of rules to 
be scanned more rapidly.  The function Dispatch allows 
explicit lists of rules to be optimized using hash tables.  
Hash tables are introduced automatically in assignments, 
making function definitions that involve dynamic programming 
much more efficient.  [S. Wolfram]

The main evaluator has been restructured so that many 
recursive operations have been made iterative.  This 
increases speed and saves stack space.  It does mean that 
some calculations which used to be stopped by 
$RecursionLimit now continue until interrupted.  [H. Cejtin]

Block[{vars}, body /; test] has been introduced, to allow 
local variables to be shared between tests and function 
bodies.  [S. Wolfram]

Operations that modify elements of lists and other structures 
have been made much more efficient.  Copying of internal data 
structures is now avoided in almost all cases.  [H.  Cejtin]

Certain pattern-matching operations involving commutative 
functions have been greatly speeded up.  [K. McIsaac and S. Wolfram]

Input and Output
----------------

The appearance and speed of OutputForm output has been 
improved.  Line breaks are more consistent, and exponents 
more compact.  MatrixForm now prints matrices more 
compactly, with dimensions distinguished by spacing.  
[B. Smith and S. Wolfram]

Encode has been added to allow external files to be stored 
in an encoded form.  Encode also allows files to be keyed, 
or to be accessible only on machines with particular ID's.  
[D. Ballman]

Definitions now print out with their formatting directives 
given verbatim.  [B. Smith]

The infix forms lhs === rhs and  lhs =!= rhs have been added 
for SameQ[lhs, rhs] and UnsameQ[lhs, rhs].  [H. Cejtin]

Mathematical Operations
-----------------------

Symbolic integration has been greatly enhanced.  A much 
larger class of integrals can now be done, and results are 
given in simpler and more useful forms.  [D. Withoff] 

Multivariate polynomial GCD and factorization has been made 
much more efficient.  [R. Maeder and I. Rivin]

Algebraic functions can now handle approximate real numbers 
in many more situations.  [R. Maeder]

Solve has been taught to solve transcendental and other 
equations that require explicit use of inverse functions.  [D. Grayson]

The linear programming functions LinearProgramming, 
ContrainedMax and ConstrainedMin have been added.  [I. Rivin]

Rudimentary differential equation solving capabilities have 
been introduced in the function DSolve.  [I. Rivin]

Power series have been speeded up, and have been extended to 
deal with many classes of special functions.  [J. Keiper and I. Rivin]

MatrixPower and MatrixExp have been added.  [I. Rivin]

The functions GCD for numbers, and PolynomialGCD for 
polynomials, have been separated.   [R. Maeder]

Modulus options have been added to Det, Inverse and 
LinearSolve.  [I. Rivin]

The function Residue, for finding residues at poles, has 
been added.  [D. Grayson]

The function GroebnerBasis, which gives explicit forms of 
Grbner bases, has been added.     [D. Grayson]

Numerical Operations
--------------------

The granularity in numerical precision has been reduced.  
SetPrecision and Set-Accuracy have been added to provide 
additional control over the properties of approximate 
numbers.  [D. Grayson]

Matrix multiplication and related operations have been 
greatly speeded up.   [I. Rivin]

The function Digits, which gives lists of digits of numbers 
in particular bases, has been added.  [D. Grayson]

TheInterpolatingPolynomial  function has been added, to 
give exact interpolating polynomials. [I. Rivin]

Graphics
--------

Axes and labels can now be drawn on three-dimensional plots.  
[H. Cejtin]

Scaled has been enhanced to allow scaled offsets to be 
specified.  [H. Cejtin]

Circle and Disk primitives have been added for two-
dimensional graphics.  [H. Cejtin]

The Ticks option has been enhanced, to allow more flexible 
placement and labeling of tick marks.  [H. Cejtin]

New options Background, DefaultColor, Prolog,Epilog, 
AxesStyle, etc.  have been added to give more flexibility in 
the rendering of plots.  [S. Wolfram]

Graphics3D[SurfaceGraphics[...]] converts a surface into 
general 3D graphics representation.  [S. Wolfram]

The graphics primitive PostScript has been added, to allow 
verbatim PostScript code to be included in graphics output. 
[S. Wolfram]

Packages
--------

Many new standard packages have been added, notably ones for 
statistics and graphics.  Packages are now organized into 
several directories.

Macintosh Front End
-------------------

Overview
--------

A number of new features have been added, and some aspects of 
the user interface have been reorganized.   Notebooks created 
under Version 1.1 are fully compatible with Version 1.2 
(though not vice versa). 

Basic System Features
---------------------

Kernel computations can now run concurrently with front end 
opera-tions such as Notebook browsing and editing.  While 
Kernel compu-tations are occuring, Running... is displayed in 
the title bar of the current window.  Cells whose execution 
is pending are indicated with outlined cell brackets.  [T. Gray]

Kernel computations can now be run in the background under 
MultiFinder.  (It is also possible in this way to have 
multiple concurrent Mathematica processes.)
Kernel start up can now occur con-currently with front end 
opera-tions.  Starting... is displayed in the menu bar in 
this case.

Menus have been rearranged.  Graph has been added to themain 
menu bar, replacing the Special Effects submenu.  Preference 
settings have been collected in the Settings submenu of the 
Edit menu.  New commands include Divide Cell and Merge Cells.  
Cell styles are now given in the Cell Style submenu, rather 
than directly under the Style menu.  The Format submenu 
allows special formatting of individual cells, replacing the 
Formats menu that appeared when the Styles Window was in front.

User Interface Feature
----------------------

A 3D ViewPoint Selector dialog box has been added.  It 
displays a cube that can be rotated in real time using the 
mouse, and whose orientation can be pasted into Mathematica 
input in several ways.  [T. Gray]

A Color Selector dialog box has been added, allowing RGBColor 
specifications to be chosen using the standard Macintosh 
color wheel.

New graphical controls for anima-tion have been added, 
mimicking those found on VCRs.

Real-time scrolling has been added as an option.
Various Command-Shift key equivalents have been added for 
commands.

Most dialog boxes are now modeless, so that they can remain 
visible while other operations are done.

Graphics Features
-----------------

Adobe Illustrator 1.1 PostScript file format has been added 
as an option in the Convert Clipboard dialog box.  Various 
options for conversion from RGB (display) to CMYK (printing) 
colors are provided.  [T. Gray]

A Convert to InputForm command has been added to allow 
graphics stored in a Notebook in either PICT or PostScript 
form to be converted to Mathematica  input form.  This allows 
graphics and images from other programs to be imported into 
Mathematica and manipulated using Mathematica Kernel functions.

The Convert to PostScript command has been enhanced to 
include bitmaps as well as objects.  Also colorimage objects 
can be produced.

Rendering of density plots has been made faster, and there is 
no restriction on size.

Communication
-------------

Communication with the Mathematica Kernel via TCP/IP has been 
added.  It runs over both Ethernet and LocalTalk.  Standard 
Apple MacTCP drivers are used.  [R. Murtagh]

The Phone menu has been renamed Connections, and now has 
entries for both phone numbers and network hostnames.



From mathgroup-adm@yoda.ncsa.uiuc.edu Sun Sep 10 17:26:09 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA21563; Sun, 10 Sep 89 17:26:08 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05102; Sun, 10 Sep 89 17:27:18 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00161; Sun, 10 Sep 89 17:27:16 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA21541; Sun, 10 Sep 89 16:12:27 -0500
Date: Sun, 10 Sep 89 16:12:27 -0500
Message-Id: <8909102112.AA21541@yoda.ncsa.uiuc.edu>
From: davis@groucho.ucar.edu (Glenn P. Davis)
Subject: "External Functions"
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

I'm interested in using the "External Functions" hook into Mathematica
described in Appendix B.7.6 of the book (pg 585).  I'm working on a NeXT
under NeXT release 0.9. I found the necessary 'mathlink' modules and
have compiled the example in the Appendix.

What I don't know is how to get this executable and Mathematica communicating.
EG, what do I type in Mathematica to set this up? Does my new executable need
to be in a magic directory?

Any clarification would be appreciated.


Glenn P. Davis
UCAR / Unidata
PO Box 3000                   1685 38th St.
Boulder, CO 80307-3000        Boulder, CO  80301
davis@groucho.ucar.edu
(303) 497 8643


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Sep 11 14:30:23 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA23207; Mon, 11 Sep 89 14:30:22 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA09867; Mon, 11 Sep 89 14:31:25 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA15349; Mon, 11 Sep 89 14:31:21 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA23006; Mon, 11 Sep 89 13:44:19 -0500
Date: Mon, 11 Sep 89 13:44:19 -0500
Message-Id: <8909111844.AA23006@yoda.ncsa.uiuc.edu>
From: henry@Math.nwu.edu
Subject: Re: "External Functions"
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Yes, the manual section on page 585 leaves out the critical point of  how  to
start  up  the external function.  The secret function is StartProcess[].  It
is described on page 688 and pages 303-304.

Henry Cejtin <henry@Math.nwu.edu>


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Sep 12 15:14:54 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA24915; Tue, 12 Sep 89 15:14:53 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA02148; Tue, 12 Sep 89 15:15:59 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA02402; Tue, 12 Sep 89 15:15:57 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA24739; Tue, 12 Sep 89 13:33:47 -0500
Date: Tue, 12 Sep 89 13:33:47 -0500
Message-Id: <8909121833.AA24739@yoda.ncsa.uiuc.edu>
From: COLEMAN@uregina1.bitnet
Subject: Printing Mathematica Graphics on Laserwriter NT from sun3/50
 sun3/60
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

  We have Mathematica version 1.2 running on SUN3/50 and SUN3/60
under SUN OS 3.5. I have tried generating a simple graphics using
  Plot3D[Sin[x]Cos[y],{x,-Pi,Pi},{y,-Pi,Pi}]
which works fine. When I try to Print it using
  PSPrint[%]
the green light begins to wink on the laserprinter but after
a time the light becomes steady and nothiong is printed.
How does one print graphics on a laserwriter NT.
  I also want to be able to capture the graphics and
include it in a \special in a LaTeX document. We have dvi2ps
running and I am able to dump the screen and use psraster to
generate a postscript file which can then be included as
a \special, but it would be better to be able to use the
postscript generated by mathematica directly because of the
higher resolution. Please respond either to mathgroup or to

               coleman@uregina2.bitnet

         Thank you
         Robert Coleman


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Sep 14 18:15:20 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA28540; Thu, 14 Sep 89 18:15:19 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14112; Thu, 14 Sep 89 18:16:30 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA06558; Thu, 14 Sep 89 18:16:27 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA28410; Thu, 14 Sep 89 15:38:46 -0500
Date: Thu, 14 Sep 89 15:38:46 -0500
Message-Id: <8909142038.AA28410@yoda.ncsa.uiuc.edu>
From: mckenney@spam.istc.sri.com
Subject: Fancy plot labeling in Mathematica?
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Does anyone know of any way to get fancier plot labels in Mathematica?
Desireable features might include printing the y-axis label rotated 90
degrees so that the text ran parallel to the y-axis along the left-hand
side of the plot, printing the x-axis label at the bottom of the plot,
allowing control of character sizes, and printing of special characters
(such as greek letters).

				Thanx in advance, Paul
				mckenney@sri.com
				mckenney@spam.istc.sri.com


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Sep 14 22:14:02 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA28849; Thu, 14 Sep 89 22:14:01 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14629; Thu, 14 Sep 89 22:15:15 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA08951; Thu, 14 Sep 89 22:15:12 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA28786; Thu, 14 Sep 89 20:32:54 -0500
Date: Thu, 14 Sep 89 20:32:54 -0500
Message-Id: <8909150132.AA28786@yoda.ncsa.uiuc.edu>
From: COLEMAN@uregina1.bitnet
Subject:      Re: Printing mathematica graphics on a Laserwriter II NT
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

  We have mathematica running on a SUN3/50 and a SUN3/60. The
Laserwriter II NT is connected to the serial port of the 3/50.
Here is what my version of mathematica says about printing graphics

Mathematica (sun3.68881) 1.2 (June 24, 1989) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maaeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
with I. Rivin and D. Withoff
Copyright 1988,1989 Wolfram Research Inc.
 -- SunView graphics initialized --

In[1]:= ??LaserPrint
LaserPrint
Attributes[LaserPrint] = {Protected}
LaserPrint = PSPrint

In[1]:= ??PSPrint
PSPrint[-graphics-] sends graphics to a printer.
Attributes[PSPrint] = {Protected}
PSPrint/: PSPrint[System`Private`x_] :=

>    (Display["!psfix | lpr", System`Private`x]; System`Private`x)


In[1]:= ??Display
Display[channel, graphics] writes graphics to the specified output channel.
Attributes[Display] = {Protected}

  I hope the square brackets come out ok. I unfortunately must
for a while yet send from an IBM mainframe which likes to change
square brackets into double quotes.

  When I do a Plot either 2D or 3D and then use

PSPrint[%] or LaserPrint[%]

something is sent to the laserwriter but the printer eventually hangs.
Following the advice of James Blanchard I defined

lw[x_]:= (Display["!psfix > file.ps",x];x)

and used

lw[%]

to capture the file. I then sent the postscript file to the printer
from a regular shell using lpr and it printed with no problem; however, if I
change the definition by replacing the > with a pipe | ( in a fresh
session) something goes to the printer but it eventually hangs.
Has anyone else encountered this problem?

  As far as incoporating a graphic in a LaTeX file using \special
and dvi2ps, I found that it was necessary to leave space above
the special and shrink the file using dvi2ps' hscale and vscale.
Unfortunately changing the scale seems to alter the position
the \special appears on the page. Does anyone have advice on
how to compute appropriate values for hoffset and voffset for
given values for hscale and vscale?

                       Thanks for the help
                       Robert Coleman
                       coleman@uregina2.bitnet


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Sep 14 22:50:55 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA28920; Thu, 14 Sep 89 22:50:53 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14758; Thu, 14 Sep 89 22:52:09 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA09396; Thu, 14 Sep 89 22:52:06 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA28822; Thu, 14 Sep 89 20:55:28 -0500
Date: Thu, 14 Sep 89 20:55:28 -0500
Message-Id: <8909150155.AA28822@yoda.ncsa.uiuc.edu>
From: resumes@wri.com
Subject: WANTED: MATHEMATICAL ENTYMOLOGISTS
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

WANTED: MATHEMATICAL ENTYMOLOGISTS

We are looking for people who know Mathematica to help us systematically
track down bugs in the system.  If you are well organized, and preferably
have a perverse turn of mind, please contact us. Working hours are 
totally flexible. 

Send mail to resumes@wri.com
Or call Wolfram Research at 398-0700

************
thanks -- joe grohens


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Sep 18 13:31:41 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA04564; Mon, 18 Sep 89 13:31:40 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA03397; Mon, 18 Sep 89 13:32:54 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14667; Mon, 18 Sep 89 13:32:51 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04477; Mon, 18 Sep 89 12:17:53 -0500
Date: Mon, 18 Sep 89 12:17:53 -0500
Message-Id: <8909181717.AA04477@yoda.ncsa.uiuc.edu>
From: marzetta@iam.unibe.ch
Subject: WRI
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

I thank all the people who have answered my message
where I seeked for "Alternatives to WRI".

One of the last steps I did before posting my message to this newsgroup
was to fax my request to WRI without mentioning the past; Terri Wenson
answered me very kindly on September 5, sending me all the information
I wanted; unfortunately the letter arrived here only on September 13,
just one day too late ...

            Markus Marzetta
        	marzetta@iam.unibe.ch


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Sep 18 22:49:01 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA04872; Mon, 18 Sep 89 22:48:59 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05608; Mon, 18 Sep 89 22:50:13 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA22118; Mon, 18 Sep 89 22:50:11 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04837; Mon, 18 Sep 89 21:37:58 -0500
Date: Mon, 18 Sep 89 21:37:58 -0500
Message-Id: <8909190237.AA04837@yoda.ncsa.uiuc.edu>
From: valiquet@wri.com
Subject: Available Packages
                    
                    
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Silicon Graphics packages are now available for shipment.
                    
A recap of available packages:
                    
MS-DOS 386, 386/7, 386/Weitek                   Ver 1.11
                    
Mac Enhanced, Standard                          Ver 1.20
                    
Apollo                                          Ver 1.21
                    
Sun 3, 4, 386i                                  Ver 1.22
                    
DECstation 3100                                 Ver 1.21
                    
HP 9000/300, 825 & 835, 840, 850, & 855         Ver 1.20
                    
SGI Personal Iris, Iris 4D/50-80GT,
                   Iris 4D/120-240GTX           Ver 1.20

All packages are either in stock, or can be available with 24 hours notice.
 
I will continue to make these announcements as new packages become available.
 
Chris Valiquet  valiquet@wri.com



From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Sep 20 01:37:19 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA06590; Wed, 20 Sep 89 01:37:18 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA13950; Wed, 20 Sep 89 01:38:27 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA19398; Wed, 20 Sep 89 01:38:10 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA05954; Tue, 19 Sep 89 23:56:17 -0500
Date: Tue, 19 Sep 89 23:56:17 -0500
Message-Id: <8909200456.AA05954@yoda.ncsa.uiuc.edu>
From: wheeler@super.org
Subject: Prime bug
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Here is a code fragment for computing the number of primes <= x for
moderate values of x.

PrimePi[x_?NumberQ] :=
Block[{n, m, avg, flrx = Floor[x]},
   m = LogIntegral[N[flrx]];
   n = Ceiling[m - LogIntegral[Sqrt[N[flrx]]]];
   m = Floor[m];
   While[ m != n+1,
          avg = Quotient[n+m,2];
          Print[n,"  ", Prime[n]];
          If[ flrx < Prime[avg], m = avg, n = avg]
   ];
   n
]

The thing to look at is the Print statement in the While loop.
Watch this:

Mathematica (sun3.68881) 1.2 (August 3, 1989) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
with I. Rivin and D. Withoff
Copyright 1988,1989 Wolfram Research Inc.

In[1]:= <<PrimePi.m
0.0666667 Second

In[2]:= p = Prime[105096565]
0.283333 Second

Out[2]= 2147462123

In[3]:= PrimePi[p]
105094402  2147415443
105094402  2147415443
105095608  2147417855		<-- Clearly not a prime!!
105096211  2147419061
105096513  2147419665
105096664  2147419967
105096739  2147420117
105096777  2147420193
105096796  2147420231
105096805  2147420249
105096810  2147420259
105096812  2147420263
105096813  2147420265
1.3 Second

Out[3]= 105096814		<-- Not the right answer.

In[4]:= Prime[105094402]
0.366667 Second

Out[4]= 2147368919		<-- This is not what is given in the list!

Why is there a difference in the Prime function within the
program and the Prime function on the top level?

Ferrell Wheeler
Supercomputing Research Center
wheeler@super.org
(301) 805-7360


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Sep 20 15:58:41 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA06961; Wed, 20 Sep 89 15:58:40 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA17211; Wed, 20 Sep 89 15:59:54 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA02019; Wed, 20 Sep 89 15:59:51 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA06920; Wed, 20 Sep 89 14:15:04 -0500
Date: Wed, 20 Sep 89 14:15:04 -0500
Message-Id: <8909201915.AA06920@yoda.ncsa.uiuc.edu>
From: steve@ncsa.uiuc.edu
Subject:  removal messages
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

I am sorry once again to the list members who are
getting removal messages.  Some users have been
sending to an incorrect address which is getting
out to the list.

Please send only to mathgroup-request@yoda.ncsa.uiuc.edu
or mathgroup@yoda.ncsa.uiuc.edu or steve@yoda.ncsa.uiuc.edu.

Thanks.

Steve Christensen


~

From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Sep 22 12:46:59 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09149; Fri, 22 Sep 89 12:46:58 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA26517; Fri, 22 Sep 89 12:48:18 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05879; Fri, 22 Sep 89 12:48:15 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09101; Fri, 22 Sep 89 11:26:21 -0500
Date: Fri, 22 Sep 89 11:26:21 -0500
Message-Id: <8909221626.AA09101@yoda.ncsa.uiuc.edu>
From: hauser@united.berkeley.edu
Subject: Plot3D + Graphics3D
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

Is there a simple way to superimpose some 3D graphics
(curves, vectors, small planes) on top of the SurfaceGraphics
produced by Plot3D?

Clearly, I can build up the surface graphics from polygons
and then draw the lines.
Is there a set of routines to generate the surface in the 3D graphics
form?  (I would rather not rewrite Plot3D!)

thanks,
  John Hauser


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Sep 22 14:00:03 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09264; Fri, 22 Sep 89 14:00:02 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA26824; Fri, 22 Sep 89 14:01:22 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA07373; Fri, 22 Sep 89 14:01:16 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09097; Fri, 22 Sep 89 11:24:48 -0500
Date: Fri, 22 Sep 89 11:24:48 -0500
Message-Id: <8909221624.AA09097@yoda.ncsa.uiuc.edu>
From: SMITHW@byuvax.bitnet
Subject:  linear algebra bugs
Apparently-To: mathgroup-out@yoda.ncsa.uiuc.edu
Status: RO

  I have encountered some interesting bugs in the linear algebra package
in mathematica on the MIPS(beta version), the Mac (1.1,1.2) and NeXT (.9 and
1.0).  Try the following:
In[1]:=
     {{1,2,3},{a,b,c},{1,2,3}}
In[2]:=
     Eigensystem[Out[1]]
     Eigensystem::eifl: Algorithm failed to find eigenvectors.
Now the same thing in Macsyma:
                                   [ 1  2  3 ]
                                   [         ]
(D7)                               [ A  0  C ]
                                   [         ]
                                   [ 1  2  3 ]

(C9) Eigenvectors(d7);

(D9) [[[2 - SQRT(2) SQRT(C + A + 2), SQRT(2) SQRT(C + A + 2) + 2, 0],

                  SQRT(2) SQRT(C + A + 2) + 2
[1, 1, 1]], [1, - ---------------------------, 1],

                             2


    SQRT(2) SQRT(C + A + 2) - 2            C - 3 A    A
[1, ---------------------------, 1], [1, - -------, - -]]
                 2                           2 C      C

This is not the only example...


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Oct 18 04:39:05 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA14275; Wed, 18 Oct 89 04:39:04 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA12021; Wed, 18 Oct 89 04:38:47 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA28507; Wed, 18 Oct 89 04:38:37 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14230; Wed, 18 Oct 89 00:38:38 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14226; Wed, 18 Oct 89 00:38:37 -0500
Date: Wed, 18 Oct 89 00:38:37 -0500
Message-Id: <8910180538.AA14226@yoda.ncsa.uiuc.edu>
From: steve@yoda.ncsa.uiuc.edu
Subject: Mathematica mailing list
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Dear list members:

As you may have noticed, you might have been getting either
empty or perhaps duplicate messages from the MathGroup
mailer in the last few weeks.  We believe that this has
now been fixed.  My local mail expert - Paul Pomes - has
been working hard to provide me with the tools I need to
prevent problems in the future.  I can now test the mailing
of each message before it goes out.  Thanks to those of
you who pointed out the problems.

I will now transmit those messages that have been waiting to
go out.

Steve Christensen


From testgroup-adm@yoda.ncsa.uiuc.edu Wed Oct 18 11:16:16 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA14564; Wed, 18 Oct 89 11:16:14 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14979; Wed, 18 Oct 89 11:16:00 CDT
Return-Path: <testgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05855; Wed, 18 Oct 89 11:15:53 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14425; Wed, 18 Oct 89 10:25:29 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14421; Wed, 18 Oct 89 10:25:27 -0500
Date: Wed, 18 Oct 89 10:25:27 -0500
Message-Id: <8910181525.AA14421@yoda.ncsa.uiuc.edu>
From: cho@compsci.aberystwyth.ac.uk
Subject: New Mathematica User
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Hi,

Do you know if anyone has extended MM's ability to deal with modified
Bessel functions apart from just evaluating them, particularly 
infinite integrals involving these functions (!) ?

cho@compsci.aberystwyth.ac.uk

From testgroup-adm@yoda.ncsa.uiuc.edu Wed Oct 18 11:17:30 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA14573; Wed, 18 Oct 89 11:17:29 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14988; Wed, 18 Oct 89 11:17:16 CDT
Return-Path: <testgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05878; Wed, 18 Oct 89 11:17:11 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14445; Wed, 18 Oct 89 10:29:46 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14441; Wed, 18 Oct 89 10:29:44 -0500
Date: Wed, 18 Oct 89 10:29:44 -0500
Message-Id: <8910181529.AA14441@yoda.ncsa.uiuc.edu>
From: kant@SLCS.SLB.COM
Subject: boolean simplication question
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Does anyone have a Mathematica package that can simplify expressions
with And, Or, etc. so that And[A, !A] goes to False and so on?  

Second clarification message:

To clarify my previous message, we have written part of a simplification
package ourselves but there seem to be some strange problems.
Part of the problem with redefining or defining your own versions of And
and Or seems to be that if you add the attribute "Flat", definitions
like AND[X__, A_, Y___, !A_, X___] := False don't seem to work/match.  
If you make these definitions without the Flat attribute, they work ok.
I don't understand why that happens either.  Any suggestions?

Thanks.  -- Elaine
kant@SLCS.SLB.COM

From testgroup-adm@yoda.ncsa.uiuc.edu Wed Oct 18 11:17:32 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA14579; Wed, 18 Oct 89 11:17:31 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14991; Wed, 18 Oct 89 11:17:18 CDT
Return-Path: <testgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05881; Wed, 18 Oct 89 11:17:14 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14464; Wed, 18 Oct 89 10:41:28 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14460; Wed, 18 Oct 89 10:41:26 -0500
Message-Id: <8910181541.AA14460@yoda.ncsa.uiuc.edu>
Date: Mon, 16 Oct 89 21:31 PDT
From: DCRUZ%A2ACC1@sc.intel.com
Subject: Hi, question on U.S. edu system
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

[Here is a message slightly out of the Mathematica area.  Please
answer directly to the address below.]

Hi,

I have a friend in Ireland.  He needs some details about the American
education system, i.e. what topics in maths are studied at what ages.
He would like to compare it with the Irish system.

If you have the details pls send them to me and I'll send them to
my friend in Ireland.

Take care & thanks in advance,
Dave Cruz @ Intel Philippines
dcruz@t9acc1.intel.com


From testgroup-adm@yoda.ncsa.uiuc.edu Wed Oct 18 11:17:34 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA14584; Wed, 18 Oct 89 11:17:33 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14994; Wed, 18 Oct 89 11:17:20 CDT
Return-Path: <testgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05884; Wed, 18 Oct 89 11:17:16 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14458; Wed, 18 Oct 89 10:38:40 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14454; Wed, 18 Oct 89 10:38:39 -0500
Message-Id: <8910181538.AA14454@yoda.ncsa.uiuc.edu>
Date: Mon, 16 Oct 89 18:47:44 EDT
From: LEONARDZ@uoguelph.bitnet
Subject: X-Windows versions ( Or SGI,Sun,Apollo )
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

We have several workstations here used for research which are not NeXT or
Macs. We have a requirement for a symbolic manipulation package with all the
attributes of the NeXT/Mac versions of Mathematica,eg. the Notebook facility,
on a wide range of Unix workstations (Sun, Apollo and SGI in particular). Does
X-Window version support all these features ? When do you expect them to be
ready ?? Will all of the above ( which have X-Window support ), X-Window termin
als, etc. be able to run this version (X-Term support of front end only I
presume) ??

        Thanks.                                     Regards
                                                    Len Zaifman


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Oct 18 14:16:22 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA14884; Wed, 18 Oct 89 14:16:18 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA16766; Wed, 18 Oct 89 14:16:01 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA10310; Wed, 18 Oct 89 14:15:56 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14592; Wed, 18 Oct 89 11:17:56 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14588; Wed, 18 Oct 89 11:17:54 -0500
Date: Wed, 18 Oct 89 11:17:54 -0500
Message-Id: <8910181617.AA14588@yoda.ncsa.uiuc.edu>
From: cho@compsci.aberystwyth.ac.uk
Subject: New Mathematica User
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Hi,

Do you know if anyone has extended MM's ability to deal with modified
Bessel functions apart from just evaluating them, particularly 
infinite integrals involving these functions (!) ?

cho@compsci.aberystwyth.ac.uk

From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Oct 18 14:15:06 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA14860; Wed, 18 Oct 89 14:15:05 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA16730; Wed, 18 Oct 89 14:14:46 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA10250; Wed, 18 Oct 89 14:14:41 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14611; Wed, 18 Oct 89 11:19:05 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14607; Wed, 18 Oct 89 11:19:04 -0500
Message-Id: <8910181619.AA14607@yoda.ncsa.uiuc.edu>
Date: Mon, 16 Oct 89 21:31 PDT
From: DCRUZ%A2ACC1@sc.intel.com
Subject: Hi, question on U.S. edu system
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

[Here is a message slightly out of the Mathematica area.  Please
answer directly to the address below.]

Hi,

I have a friend in Ireland.  He needs some details about the American
education system, i.e. what topics in maths are studied at what ages.
He would like to compare it with the Irish system.

If you have the details pls send them to me and I'll send them to
my friend in Ireland.

Take care & thanks in advance,
Dave Cruz @ Intel Philippines
dcruz@t9acc1.intel.com


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Oct 18 15:01:54 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA15001; Wed, 18 Oct 89 15:01:53 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA17166; Wed, 18 Oct 89 15:01:34 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA11138; Wed, 18 Oct 89 15:01:28 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14598; Wed, 18 Oct 89 11:18:18 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14594; Wed, 18 Oct 89 11:18:17 -0500
Date: Wed, 18 Oct 89 11:18:17 -0500
Message-Id: <8910181618.AA14594@yoda.ncsa.uiuc.edu>
From: kant@SLCS.SLB.COM
Subject: boolean simplication question
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Does anyone have a Mathematica package that can simplify expressions
with And, Or, etc. so that And[A, !A] goes to False and so on?  

Second clarification message:

To clarify my previous message, we have written part of a simplification
package ourselves but there seem to be some strange problems.
Part of the problem with redefining or defining your own versions of And
and Or seems to be that if you add the attribute "Flat", definitions
like AND[X__, A_, Y___, !A_, X___] := False don't seem to work/match.  
If you make these definitions without the Flat attribute, they work ok.
I don't understand why that happens either.  Any suggestions?

Thanks.  -- Elaine
kant@SLCS.SLB.COM

From paul@uxc.cso.uiuc.edu Wed Oct 18 15:04:58 1989
Received: from uxc.cso.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA15009; Wed, 18 Oct 89 15:04:56 -0500
Received: by uxc.cso.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA04949; Wed, 18 Oct 89 15:04:28 -0500
To: Steve Christensen <stevec@yoda.ncsa.uiuc.edu>
Subject: Re: another problem 
In-Reply-To: Your message of Wed, 18 Oct 89 14:58:14 CDT.
             <8910181958.AA14978@yoda.ncsa.uiuc.edu> 
Date: Wed, 18 Oct 89 15:04:25 CDT
Message-Id: <4946.624744265@uxc.cso.uiuc.edu>
From: "Paul Pomes (I'm the NRA!)" <paul@uxc.cso.uiuc.edu>
Status: RO

The way the list is set up now is probably the most reliable way for mail
to go as described.  If a user uses the 'R' command, only the From:
address is going to see it.  If that's the mathgroup-adm address
(which is in the From (no colon) address, btw), then the original sender
is going to miss the reply.  If the original sender is in the From: field,
then the mathgroup (you) is going to be missed.  Any other reply command
is going to include to the To: mathgroup (you) address (or it should anyway).

/pbp


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Oct 18 16:07:35 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA15132; Wed, 18 Oct 89 16:07:34 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA17712; Wed, 18 Oct 89 16:07:15 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA12475; Wed, 18 Oct 89 16:07:09 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14606; Wed, 18 Oct 89 11:18:55 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA14602; Wed, 18 Oct 89 11:18:54 -0500
Message-Id: <8910181618.AA14602@yoda.ncsa.uiuc.edu>
Date: Mon, 16 Oct 89 18:47:44 EDT
From: LEONARDZ@uoguelph.bitnet
Subject: X-Windows versions ( Or SGI,Sun,Apollo )
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

We have several workstations here used for research which are not NeXT or
Macs. We have a requirement for a symbolic manipulation package with all the
attributes of the NeXT/Mac versions of Mathematica,eg. the Notebook facility,
on a wide range of Unix workstations (Sun, Apollo and SGI in particular). Does
X-Window version support all these features ? When do you expect them to be
ready ?? Will all of the above ( which have X-Window support ), X-Window termin
als, etc. be able to run this version (X-Term support of front end only I
presume) ??

        Thanks.                                     Regards
                                                    Len Zaifman


From testgroup-adm@yoda.ncsa.uiuc.edu Thu Oct 19 14:18:48 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA16258; Thu, 19 Oct 89 14:18:47 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA03240; Thu, 19 Oct 89 14:18:32 CDT
Return-Path: <testgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA06152; Thu, 19 Oct 89 14:18:15 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA16245; Thu, 19 Oct 89 13:36:20 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA16241; Thu, 19 Oct 89 13:36:19 -0500
Message-Id: <8910191836.AA16241@yoda.ncsa.uiuc.edu>
Date: Wed, 18 Oct 89 15:28 PDT
From: DCRUZ%T9ACC1@sc.intel.com
Subject: Californian quake & questions
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

[Please respond to the address below and not to the mailing
list. -- smc]

Dear Mathematica list,

I saw on TV last night (Manila time) the California earthquake.
I hope all of you there are safe and well.

I just learned that Mathematica is a program that does symbolic
math.  I want to thank all of you who answered my question on
calculus last time.

Does anyone know how I can subscribe to a Mathematics discussion
group?  Is it ok with everyone if I continue to ask questions in
calculus?

Sorry if my questions were off the purpose of this discussion group.
I didn't know until recently that Mathematica was a program and mistook 
it for a math discussion group.

Take Care & thanks to all,
Dave Cruz @ Intel Philippines
dcruz@t9acc1.intel.com


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Oct 19 17:22:15 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA16381; Thu, 19 Oct 89 17:22:15 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA04835; Thu, 19 Oct 89 17:21:56 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA10481; Thu, 19 Oct 89 17:21:41 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA16282; Thu, 19 Oct 89 15:26:21 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA16278; Thu, 19 Oct 89 15:26:19 -0500
Message-Id: <8910192026.AA16278@yoda.ncsa.uiuc.edu>
Date: Wed, 18 Oct 89 15:28 PDT
From: DCRUZ%T9ACC1@sc.intel.com
Subject: Californian quake & questions
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

[Please respond to the address below and not to the mailing
list. -- smc]

Dear Mathematica list,

I saw on TV last night (Manila time) the California earthquake.
I hope all of you there are safe and well.

I just learned that Mathematica is a program that does symbolic
math.  I want to thank all of you who answered my question on
calculus last time.

Does anyone know how I can subscribe to a Mathematics discussion
group?  Is it ok with everyone if I continue to ask questions in
calculus?

Sorry if my questions were off the purpose of this discussion group.
I didn't know until recently that Mathematica was a program and mistook 
it for a math discussion group.

Take Care & thanks to all,
Dave Cruz @ Intel Philippines
dcruz@t9acc1.intel.com


From testgroup-adm@yoda.ncsa.uiuc.edu Tue Oct 24 01:16:17 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA22524; Tue, 24 Oct 89 01:16:15 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA08664; Tue, 24 Oct 89 01:15:50 CDT
Return-Path: <testgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA02860; Tue, 24 Oct 89 01:15:48 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22501; Tue, 24 Oct 89 00:51:13 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22497; Tue, 24 Oct 89 00:51:11 -0500
Message-Id: <8910240551.AA22497@yoda.ncsa.uiuc.edu>
Date: Mon, 23 Oct 89 22:44:40 PDT
From: ghe@nucthy.PHYSICS.ORST.EDU (Guangliang He)
To: Mathematica Mailling list <mathgroup@yoda.ncsa.uiuc.edu>
Subject: Mathematica on a SE/30
Status: RO

Is it possible to get a Mac II version of Mathematica running on a Mac
SE/30? What kind problem could possiblly happen? I'm interested to see the
results. 

Thank you all for your time.

-- 
=======================================================================
USMAIL:   Guangliang He             |  INTERNET: ghe@PHYSICS.ORST.EDU
          Department of Physics     |  BITNET:   hegl@ORSTVM.BITNET
          Weniger Hall 301          |
          Oregon State University   |
          Corvallis, OR 97331-6507  |  PHONE:    (503) 737-4631
=======================================================================


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Oct 24 06:11:37 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA22586; Tue, 24 Oct 89 06:11:35 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA10084; Tue, 24 Oct 89 06:11:03 CDT
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from uxc.cso.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA01146; Tue, 24 Oct 89 06:10:56 CDT
Received: from yoda.ncsa.uiuc.edu by uxc.cso.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA25498; Tue, 24 Oct 89 04:37:34 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22539; Tue, 24 Oct 89 01:21:17 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22535; Tue, 24 Oct 89 01:21:15 -0500
Message-Id: <8910240621.AA22535@yoda.ncsa.uiuc.edu>
Date: Mon, 23 Oct 89 22:44:40 PDT
From: ghe@nucthy.PHYSICS.ORST.EDU (Guangliang He)
To: Mathematica Mailling list <mathgroup@yoda.ncsa.uiuc.edu>
Subject: Mathematica on a SE/30
Status: RO

Is it possible to get a Mac II version of Mathematica running on a Mac
SE/30? What kind problem could possiblly happen? I'm interested to see the
results. 

Thank you all for your time.

-- 
=======================================================================
USMAIL:   Guangliang He             |  INTERNET: ghe@PHYSICS.ORST.EDU
          Department of Physics     |  BITNET:   hegl@ORSTVM.BITNET
          Weniger Hall 301          |
          Oregon State University   |
          Corvallis, OR 97331-6507  |  PHONE:    (503) 737-4631
=======================================================================


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Nov  1 18:05:24 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA10214; Wed, 1 Nov 89 18:05:23 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA29029; Wed, 1 Nov 89 18:04:56 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA01667; Wed, 1 Nov 89 18:04:46 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10105; Wed, 1 Nov 89 15:05:25 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10101; Wed, 1 Nov 89 15:05:23 -0600
Message-Id: <8911012105.AA10101@yoda.ncsa.uiuc.edu>
Date: Mon, 30 Oct 89 22:17:20 PST
From: ghe@nucthy.PHYSICS.ORST.EDU (Guangliang He)
To: Mathematica Mailling list <mathgroup@yoda.ncsa.uiuc.edu>
Subject: Tensor operations in Mathematica
Status: RO

In Mathematica, Inner[f, u, v, g] contracts the last index of tensor u
and first index of tensor v. But how can I contract 2 indexes of a rand
r tensor T to get a rank (r-2) tensor? When r=2, that is just the trace
of the matrix. But how about higher rank tensor?

-- 
=======================================================================
USMAIL:   Guangliang He             |  INTERNET: ghe@PHYSICS.ORST.EDU
          Department of Physics     |  BITNET:   hegl@ORSTVM.BITNET
          Weniger Hall 301          |
          Oregon State University   |
          Corvallis, OR 97331-6507  |  PHONE:    (503) 737-4631
=======================================================================


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Nov  1 18:55:56 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA10241; Wed, 1 Nov 89 18:55:55 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA29149; Wed, 1 Nov 89 18:55:27 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA02208; Wed, 1 Nov 89 18:55:16 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10110; Wed, 1 Nov 89 15:05:35 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10106; Wed, 1 Nov 89 15:05:34 -0600
Message-Id: <8911012105.AA10106@yoda.ncsa.uiuc.edu>
Date: Tue, 31 Oct 89 08:58:09 PST
From: ghe@nucthy.PHYSICS.ORST.EDU (Guangliang He)
To: Mathematica Mailling list <mathgroup@yoda.ncsa.uiuc.edu>
Subject: Question about Transpose in Mathematica
Status: RO

Hello everybody,

I  have some problem with understanding the Transpose function in
Mathetmatica. For example, I have a tensor a as

            a={{{1,2,3},{2,3,4}}}

which has the dimension as

            Dimensions[a]={1,2,3}

I thought that   Transpose[a, {3,1,2}]   should give a  tensor with
dimension {3,1,2}. But instead, Mathematica MacII version 1.1 gives the
resulting tensor as

            {{{1}, {2}, {3}}, {{2}, {3}, {4}}}

which has the dimension

            {2, 3, 1}

As I understand, Transpose[a, {3,1,2}] should put the 3rd level of a to
the first level of the output. So the leading dimension of the output
should be 3, not 2. Am I misunderstanding something here?

Any help will be welcome.

-- 
=======================================================================
USMAIL:   Guangliang He             |  INTERNET: ghe@PHYSICS.ORST.EDU
          Department of Physics     |  BITNET:   hegl@ORSTVM.BITNET
          Weniger Hall 301          |
          Oregon State University   |
          Corvallis, OR 97331-6507  |  PHONE:    (503) 737-4631
=======================================================================


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Nov  1 19:48:34 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA10311; Wed, 1 Nov 89 19:48:33 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA29311; Wed, 1 Nov 89 19:48:08 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA02777; Wed, 1 Nov 89 19:47:57 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10189; Wed, 1 Nov 89 16:02:09 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10185; Wed, 1 Nov 89 16:02:07 -0600
Message-Id: <8911012202.AA10185@yoda.ncsa.uiuc.edu>
Date: Wed, 1 Nov 89 13:49:30 CST
From: kant@SLCS.SLB.COM
To: stevec@yoda.ncsa.uiuc.edu
Subject: Mathematica question
Status: RO

Does anyone have a good text string and/or user interface package?  Example
facilities desired:  smart wrap around of lines indenting wrapped around lines
to parameterized number of spaces, type checking of inputs (e.g. ask user
for a number), etc.  Thanks.  -- Elaine Kant


From testgroup-adm@yoda.ncsa.uiuc.edu Wed Nov  8 15:01:21 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02023; Wed, 8 Nov 89 15:01:20 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA13059; Wed, 8 Nov 89 15:00:46 CST
Return-Path: <testgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA02001; Wed, 8 Nov 89 15:00:44 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01961; Wed, 8 Nov 89 14:37:07 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01957; Wed, 8 Nov 89 14:37:06 -0600
Message-Id: <8911082037.AA01957@yoda.ncsa.uiuc.edu>
Date: Tue, 7 Nov 89 20:00:32 PST
From: mdeale@vega.ACS.CalPoly.EDU (Myron Deale)
To: mathgroup-request@yoda.ncsa.uiuc.edu
Subject: question on CellularAutomata
Status: RO


Hello,
   Our University has Mathematica liscensed to run on two Sun 3 machines
(under X11, Sunview, or NeWS).  I would like to get the CellularAutomata
example package to run. Has anyone tried this yet?  Not being a wiz at CA
I don't know how to produce some simple graphics / plots.
   Thanks in advance,

-Myron
// mdeale@cosmos.acs.calpoly.edu


From testgroup-adm@yoda.ncsa.uiuc.edu Wed Nov  8 15:01:26 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02030; Wed, 8 Nov 89 15:01:25 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA13062; Wed, 8 Nov 89 15:00:52 CST
Return-Path: <testgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA02004; Wed, 8 Nov 89 15:00:50 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01955; Wed, 8 Nov 89 14:35:59 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01951; Wed, 8 Nov 89 14:35:57 -0600
Message-Id: <8911082035.AA01951@yoda.ncsa.uiuc.edu>
Date: Tue, 7 Nov 89 13:58:09 PST
From: Walter Vogel - Biochem  <vogelw@bionette.CGRB.ORST.EDU>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: nonlinear regression curve fitting
Status: RO

	Does anyone know of a package to do nonlinear regression curve fit to a function, possibly using Marquardt's algorithm?
	I am interested in fitting data to an equation of the form y=f(y,x) or
z=f(x,y). Below is the equation I wish to fit.

The equation:
          _                                           _
         |                                             |
    [L]  |        F1                        F2         |
Y= ----- | -------------------  +  ------------------- |
     K   | 1 + [I]/K1 + [L]/K      1 + [I]/K2 + [L]/K  |
         |_                                           _|
        
There are 4 parameters to be determined: K, K1, K2, F1 (since F1 + F2 =1, F2
is not a parameter. Our raw data is obtained as radioactive counts versus the 
independent variable, [I]. The counts are used to calculate both Y and [L] thus
our dependent variable appears on both sides of the equation. Y=(T-n)/r and 
[L]=q-T. As written above the equation is a function of two variables [I] and
[L] but it can be recast as function of one T=f(T([I]),[I]).

Sincerely

Walter K. Vogel
vogelw@bionette.cgrb.orst.edu



From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Nov  9 13:24:58 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03340; Thu, 9 Nov 89 13:24:57 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA25504; Thu, 9 Nov 89 13:24:22 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA28135; Thu, 9 Nov 89 13:24:19 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03289; Thu, 9 Nov 89 11:44:46 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03285; Thu, 9 Nov 89 11:44:44 -0600
Message-Id: <8911091744.AA03285@yoda.ncsa.uiuc.edu>
Date: Tue, 7 Nov 89 13:58:09 PST
From: Walter Vogel - Biochem  <vogelw@bionette.CGRB.ORST.EDU>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: nonlinear regression curve fitting
Status: RO

	Does anyone know of a package to do nonlinear regression curve fit to a function, possibly using Marquardt's algorithm?
	I am interested in fitting data to an equation of the form y=f(y,x) or
z=f(x,y). Below is the equation I wish to fit.

The equation:
          _                                           _
         |                                             |
    [L]  |        F1                        F2         |
Y= ----- | -------------------  +  ------------------- |
     K   | 1 + [I]/K1 + [L]/K      1 + [I]/K2 + [L]/K  |
         |_                                           _|
        
There are 4 parameters to be determined: K, K1, K2, F1 (since F1 + F2 =1, F2
is not a parameter. Our raw data is obtained as radioactive counts versus the 
independent variable, [I]. The counts are used to calculate both Y and [L] thus
our dependent variable appears on both sides of the equation. Y=(T-n)/r and 
[L]=q-T. As written above the equation is a function of two variables [I] and
[L] but it can be recast as function of one T=f(T([I]),[I]).

Sincerely

Walter K. Vogel
vogelw@bionette.cgrb.orst.edu



From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Nov  9 14:03:37 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03414; Thu, 9 Nov 89 14:03:36 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA25944; Thu, 9 Nov 89 14:03:00 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA29071; Thu, 9 Nov 89 14:02:57 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03294; Thu, 9 Nov 89 11:44:57 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03290; Thu, 9 Nov 89 11:44:56 -0600
Message-Id: <8911091744.AA03290@yoda.ncsa.uiuc.edu>
Date: Tue, 7 Nov 89 20:00:32 PST
From: mdeale@vega.ACS.CalPoly.EDU (Myron Deale)
To: mathgroup-request@yoda.ncsa.uiuc.edu
Subject: question on CellularAutomata
Status: RO


Hello,
   Our University has Mathematica liscensed to run on two Sun 3 machines
(under X11, Sunview, or NeWS).  I would like to get the CellularAutomata
example package to run. Has anyone tried this yet?  Not being a wiz at CA
I don't know how to produce some simple graphics / plots.
   Thanks in advance,

-Myron
// mdeale@cosmos.acs.calpoly.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Nov  9 14:51:25 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03477; Thu, 9 Nov 89 14:51:24 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA26519; Thu, 9 Nov 89 14:50:49 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00714; Thu, 9 Nov 89 14:50:47 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03374; Thu, 9 Nov 89 13:36:01 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03370; Thu, 9 Nov 89 13:36:00 -0600
Message-Id: <8911091936.AA03370@yoda.ncsa.uiuc.edu>
Date: Thu, 9 Nov 89 11:42:11 -0600
From: Steve Christensen <stevec@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Programming in Mathematica files
Status: RO


Roman Maeder's new book - Programming in Mathematica - is
about to be published by Addison-Wesley.  He has kindly sent
the files containing the programs from that book to me
for inclusion in the Mathematica archive.  These
can be obtained by doing anonymous ftp to

128.174.2o.50  ftp.ncsa.uiuc.edu

Once logged in by using the user name anonymous and
any password, do a 

ftp> cd Symbolic/Mathematica/Packages

There you will find two new files -

Programming_in_Mathematica.1
Programming_in_Mathematica.2

You can get these files using

ftp> mget Programming*

and responding to the questions with y .
Now log out of the server.

These are shell archives. Follow the instructions given at the beginning
of the .1 file to unpack the programs.

Have fun.

Steve Christensen
NCSA, Illinois






From testgroup-adm@yoda.ncsa.uiuc.edu Fri Nov 10 23:01:20 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA04863; Fri, 10 Nov 89 23:01:19 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA17285; Fri, 10 Nov 89 23:00:49 CST
Return-Path: <testgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA09817; Fri, 10 Nov 89 23:00:46 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04856; Fri, 10 Nov 89 22:54:58 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04852; Fri, 10 Nov 89 22:54:56 -0600
Message-Id: <8911110454.AA04852@yoda.ncsa.uiuc.edu>
Date: Sat Nov 11 15:14:58 1989
From: leon@extro.ucc.su.oz.au (L. Poladian)
To: mathgroup-adm@yoda.ncsa.uiuc.edu, mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  nonlinear regression curve fitting
Status: RO

In response to a recent enquiry about non-linear regression here are the
definitions for a routine that can be used.
I have not had time to set this all up correctly as a package with
contexts etc. and have only briefly tested it.
Therefore, use at your own peril.

Given a function f = F[x,y,...,a,b,...] of several variables x,y,...
which also depends on a number of parameters a,b,...  and a list of data
data = { {x1,y1,...,f1},  {x2,y2,...,f2}, ...  } the routine attempts to
find the values of a,b,... which minimizes the sum of the squares of the
residuals.
The only restriction on F[] is that Mathematica must be able to calculate
symbolic derivatives of F with respect to a,b,....

An initial estimate of the paramters is required and the routine returns
a "better" estimate of the parameters. If the original estimate is good
enough, repeating the process will eventually produce a converged result.

The definitions follow:

LinearFit[list_,fun_,f0_,var_] :=Block[{n,n2,m,b},
	n = Length[list];
	n2 = Length[fun];
	m = Table[
		Sum[ (fun[[j]] fun[[k]] /. 
			Thread[var -> Drop[list[[i]],-1]]), {i,1,n}],
		{j,1,n2}, {k,1,n2}];
	b = Table[
		Sum[ (fun[[j]] (list[[i,-1]]-f0) /.
			Thread[var -> Drop[list[[i]],-1]]), {i,1,n}],
		{j,1,n2}];
	LinearSolve[m,b]
	]


NonLinearFit[list_,fun_,par_,init_,var_]:=
 Block[{npar,sub,linfun,f0,coeff},
	npar = Length[par];
	sub = Thread[par -> init];
	linfun = Table[ D[ fun, par[[i]] ], {i,1,npar}] /.sub;
	f0 = fun /. sub;
	coeff = LinearFit[list,linfun,f0,var];
	init+coeff
	]


The routine is used as follows:

data = { {x1,y1,..,f1}, {x2,y2,...,f2}, ...};
function = F[x,y,...,a,b,...]; (* whatever function you are fitting *)
pars = {a,b,... };
initialestimate = {a0, b0, ... }; (* reasonable values for the parameters *)
vars = {x,y,...};

estimate = NonLinearFit[data,function,pars,initialestimate,vars]

estimate = NonLinearFit[data,function,pars,estimate,vars] (*keep repeating*)

Alternatively one can use FixedPoint

estimate = FixedPoint[NonLinearFit[data,function,pars,#,vars]&,initialestimate]

Leon Poladian
Theoretical Physics
University of Sydney

leon@extro.ucc.su.oz


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Nov 11 03:15:49 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA05659; Sat, 11 Nov 89 03:15:46 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA21249; Sat, 11 Nov 89 03:15:05 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA15439; Sat, 11 Nov 89 03:14:59 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04897; Fri, 10 Nov 89 23:21:22 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04893; Fri, 10 Nov 89 23:21:21 -0600
Message-Id: <8911110521.AA04893@yoda.ncsa.uiuc.edu>
Date: Sat Nov 11 15:14:58 1989
From: leon@extro.ucc.su.oz.au (L. Poladian)
To: mathgroup-adm@yoda.ncsa.uiuc.edu, mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  nonlinear regression curve fitting
Status: RO

In response to a recent enquiry about non-linear regression here are the
definitions for a routine that can be used.
I have not had time to set this all up correctly as a package with
contexts etc. and have only briefly tested it.
Therefore, use at your own peril.

Given a function f = F[x,y,...,a,b,...] of several variables x,y,...
which also depends on a number of parameters a,b,...  and a list of data
data = { {x1,y1,...,f1},  {x2,y2,...,f2}, ...  } the routine attempts to
find the values of a,b,... which minimizes the sum of the squares of the
residuals.
The only restriction on F[] is that Mathematica must be able to calculate
symbolic derivatives of F with respect to a,b,....

An initial estimate of the paramters is required and the routine returns
a "better" estimate of the parameters. If the original estimate is good
enough, repeating the process will eventually produce a converged result.

The definitions follow:

LinearFit[list_,fun_,f0_,var_] :=Block[{n,n2,m,b},
	n = Length[list];
	n2 = Length[fun];
	m = Table[
		Sum[ (fun[[j]] fun[[k]] /. 
			Thread[var -> Drop[list[[i]],-1]]), {i,1,n}],
		{j,1,n2}, {k,1,n2}];
	b = Table[
		Sum[ (fun[[j]] (list[[i,-1]]-f0) /.
			Thread[var -> Drop[list[[i]],-1]]), {i,1,n}],
		{j,1,n2}];
	LinearSolve[m,b]
	]


NonLinearFit[list_,fun_,par_,init_,var_]:=
 Block[{npar,sub,linfun,f0,coeff},
	npar = Length[par];
	sub = Thread[par -> init];
	linfun = Table[ D[ fun, par[[i]] ], {i,1,npar}] /.sub;
	f0 = fun /. sub;
	coeff = LinearFit[list,linfun,f0,var];
	init+coeff
	]


The routine is used as follows:

data = { {x1,y1,..,f1}, {x2,y2,...,f2}, ...};
function = F[x,y,...,a,b,...]; (* whatever function you are fitting *)
pars = {a,b,... };
initialestimate = {a0, b0, ... }; (* reasonable values for the parameters *)
vars = {x,y,...};

estimate = NonLinearFit[data,function,pars,initialestimate,vars]

estimate = NonLinearFit[data,function,pars,estimate,vars] (*keep repeating*)

Alternatively one can use FixedPoint

estimate = FixedPoint[NonLinearFit[data,function,pars,#,vars]&,initialestimate]

Leon Poladian
Theoretical Physics
University of Sydney

leon@extro.ucc.su.oz


From testgroup-adm@yoda.ncsa.uiuc.edu Tue Nov 14 22:01:22 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA11502; Tue, 14 Nov 89 22:01:21 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA18573; Tue, 14 Nov 89 22:00:55 CST
Return-Path: <testgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA03676; Tue, 14 Nov 89 22:00:51 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA11483; Tue, 14 Nov 89 21:50:37 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA11479; Tue, 14 Nov 89 21:50:35 -0600
Message-Id: <8911150350.AA11479@yoda.ncsa.uiuc.edu>
Date: Tue, 14 Nov 89 21:48:57 -0600
From: Steve Christensen <stevec@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica SIG and SUG
Status: RO


There will be a Special Interest Group meeting
on Mathematica at 5:15pm on Thursday, Dec. 7 at
the Anaheim, CA Sun User Group Conference. If
you would like to give a short 10-15 minute
presentation at this SIG, please email me ASAP.
Please send your name, title and organization
and a one paragraph summary of what you would like
to say.  Since I want to leave some time for
discussion, I can accept only 3-4 short talks.

Please email me at steve@ncsa.uiuc.edu.

Nancy Blachman will be giving a one hour presentation
entitled "The Advantages of Running Mathematica Under
UNIX" at 4pm the same day.

Steve Christensen
NCSA & Beckman Institute
University of Illinois


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Nov 15 02:23:00 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA12349; Wed, 15 Nov 89 02:22:59 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA22680; Wed, 15 Nov 89 02:22:30 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA09854; Wed, 15 Nov 89 02:22:26 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA11570; Tue, 14 Nov 89 23:43:25 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA11566; Tue, 14 Nov 89 23:43:24 -0600
Message-Id: <8911150543.AA11566@yoda.ncsa.uiuc.edu>
Date: Tue, 14 Nov 89 21:48:57 -0600
From: Steve Christensen <stevec@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica SIG and SUG
Status: RO


There will be a Special Interest Group meeting
on Mathematica at 5:15pm on Thursday, Dec. 7 at
the Anaheim, CA Sun User Group Conference. If
you would like to give a short 10-15 minute
presentation at this SIG, please email me ASAP.
Please send your name, title and organization
and a one paragraph summary of what you would like
to say.  Since I want to leave some time for
discussion, I can accept only 3-4 short talks.

Please email me at steve@ncsa.uiuc.edu.

Nancy Blachman will be giving a one hour presentation
entitled "The Advantages of Running Mathematica Under
UNIX" at 4pm the same day.

Steve Christensen
NCSA & Beckman Institute
University of Illinois


From @uunet.UU.NET,@munnari:leon@extro.ucc.su.oz.au Thu Nov 16 09:38:05 1989
Received: from uunet.UU.NET by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA13644; Thu, 16 Nov 89 09:38:02 -0600
Received: from munnari.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA28664; Thu, 16 Nov 89 10:37:20 -0500
Message-Id: <8911161537.AA28664@uunet.uu.net>
Received: from extro.ucc.su.oz (via munnari) by murtoa.cs.mu.OZ.AU with SunIII (5.5)
	id AA25607; Fri, 17 Nov 89 02:33:41 EST
	(from leon@extro.ucc.su.oz for uunet!mathgroup-adm@yoda.ncsa.uiuc.edu)
Date: Sat Nov 11 15:14:58 1989
From: leon@extro.ucc.su.oz.au (L. Poladian)
To: mathgroup-adm@yoda.ncsa.uiuc.edu, mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  nonlinear regression curve fitting
Status: RO

In response to a recent enquiry about non-linear regression here are the
definitions for a routine that can be used.
I have not had time to set this all up correctly as a package with
contexts etc. and have only briefly tested it.
Therefore, use at your own peril.

Given a function f = F[x,y,...,a,b,...] of several variables x,y,...
which also depends on a number of parameters a,b,...  and a list of data
data = { {x1,y1,...,f1},  {x2,y2,...,f2}, ...  } the routine attempts to
find the values of a,b,... which minimizes the sum of the squares of the
residuals.
The only restriction on F[] is that Mathematica must be able to calculate
symbolic derivatives of F with respect to a,b,....

An initial estimate of the paramters is required and the routine returns
a "better" estimate of the parameters. If the original estimate is good
enough, repeating the process will eventually produce a converged result.

The definitions follow:

LinearFit[list_,fun_,f0_,var_] :=Block[{n,n2,m,b},
	n = Length[list];
	n2 = Length[fun];
	m = Table[
		Sum[ (fun[[j]] fun[[k]] /. 
			Thread[var -> Drop[list[[i]],-1]]), {i,1,n}],
		{j,1,n2}, {k,1,n2}];
	b = Table[
		Sum[ (fun[[j]] (list[[i,-1]]-f0) /.
			Thread[var -> Drop[list[[i]],-1]]), {i,1,n}],
		{j,1,n2}];
	LinearSolve[m,b]
	]


NonLinearFit[list_,fun_,par_,init_,var_]:=
 Block[{npar,sub,linfun,f0,coeff},
	npar = Length[par];
	sub = Thread[par -> init];
	linfun = Table[ D[ fun, par[[i]] ], {i,1,npar}] /.sub;
	f0 = fun /. sub;
	coeff = LinearFit[list,linfun,f0,var];
	init+coeff
	]


The routine is used as follows:

data = { {x1,y1,..,f1}, {x2,y2,...,f2}, ...};
function = F[x,y,...,a,b,...]; (* whatever function you are fitting *)
pars = {a,b,... };
initialestimate = {a0, b0, ... }; (* reasonable values for the parameters *)
vars = {x,y,...};

estimate = NonLinearFit[data,function,pars,initialestimate,vars]

estimate = NonLinearFit[data,function,pars,estimate,vars] (*keep repeating*)

Alternatively one can use FixedPoint

estimate = FixedPoint[NonLinearFit[data,function,pars,#,vars]&,initialestimate]

Leon Poladian
Theoretical Physics
University of Sydney

leon@extro.ucc.su.oz

From testgroup-adm@yoda.ncsa.uiuc.edu Wed Nov 15 23:01:24 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA12921; Wed, 15 Nov 89 23:01:23 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05413; Wed, 15 Nov 89 23:00:58 CST
Return-Path: <testgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA06057; Wed, 15 Nov 89 23:00:53 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA12902; Wed, 15 Nov 89 22:25:44 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA12898; Wed, 15 Nov 89 22:25:43 -0600
Message-Id: <8911160425.AA12898@yoda.ncsa.uiuc.edu>
From: tim@merlin.bhpmrl.oz.au (Tim Monks)
Subject: New books from Addison Wesley ?
To: mathgroup@yoda.ncsa.uiuc.edu (mathgroup)
Date: Thu, 16 Nov 89 14:17:23 EST
Status: RO

Can anybody tell me what the publication dates are on the following 
books ?

Maeder      :    Programming for Mathematica
Crandall    :    Scientific Applications of Mathematica

Both books have been listed in Addison Wesley catalogues for a while - 
even with ISB numbers, but the local A-W office does not know when they
are due out.

Thanks,

         Tim Monks                                

Image Processing & Data Analysis Group   |   (direct) +61-3-566-7448
BHP Melbourne Research Laboratories      |   (switch) +61-3-560-7066
245 Wellington Rd, Mulgrave, 3170,       |   (fax)    +61-3-561-6709
AUSTRALIA                                |   (EMAIL)  tim@merlin.bhpmrl.oz.au


From lie@itk.unit.no Wed Nov 15 09:17:22 1989
Received: from loke.idt.unit.no by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA12454; Wed, 15 Nov 89 09:17:10 -0600
Received: from adam.itk.unit.no by loke.idt.unit.no; Wed, 15 Nov 89 16:16:26 +0100
Date: Wed, 15 Nov 89 16:16:15 GMT
Received: from [129.241.10.55] by adam.itk.unit.no; Wed, 15 Nov 89 16:16:15 GMT
From: lie@itk.unit.no
Message-Id: <8911151518.AA03031@rudolf.itk.unit.no>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: ContourPlot
Status: RO

Re: Mixture of ContourPlot and Plot in Show.

Problem: I have a constrained optimization problem that I want to illustrate
         graphically. The object function is z[x,y], and I want to use
         ContourPlot to map it into the (x,y) plane. Then I want to overlay
         this plot with constraints of the form y[x]. I tried to Show both
         plots in the same picture, but this was apparently not possible
         (according to the error message).

Does anyone have a suggestion on how to solve my "problem"?

Bernt Lie
e-mail: lie@itk.unit.no

From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Nov 16 13:04:40 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA13805; Thu, 16 Nov 89 13:04:37 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA15306; Thu, 16 Nov 89 13:04:09 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA03910; Thu, 16 Nov 89 13:04:02 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA13687; Thu, 16 Nov 89 10:21:23 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA13683; Thu, 16 Nov 89 10:21:21 -0600
Message-Id: <8911161621.AA13683@yoda.ncsa.uiuc.edu>
Date: Wed, 15 Nov 89 16:16:15 GMT
From: lie@itk.unit.no
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: ContourPlot
Status: RO

Re: Mixture of ContourPlot and Plot in Show.

Problem: I have a constrained optimization problem that I want to illustrate
         graphically. The object function is z[x,y], and I want to use
         ContourPlot to map it into the (x,y) plane. Then I want to overlay
         this plot with constraints of the form y[x]. I tried to Show both
         plots in the same picture, but this was apparently not possible
         (according to the error message).

Does anyone have a suggestion on how to solve my "problem"?

Bernt Lie
e-mail: lie@itk.unit.no


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Nov 16 13:51:06 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA13849; Thu, 16 Nov 89 13:51:04 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA15883; Thu, 16 Nov 89 13:50:36 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05163; Thu, 16 Nov 89 13:50:30 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA13677; Thu, 16 Nov 89 10:21:05 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA13673; Thu, 16 Nov 89 10:21:03 -0600
Message-Id: <8911161621.AA13673@yoda.ncsa.uiuc.edu>
From: tim@merlin.bhpmrl.oz.au (Tim Monks)
Subject: New books from Addison Wesley ?
To: mathgroup@yoda.ncsa.uiuc.edu (mathgroup)
Date: Thu, 16 Nov 89 14:17:23 EST
Status: RO

Can anybody tell me what the publication dates are on the following 
books ?

Maeder      :    Programming for Mathematica
Crandall    :    Scientific Applications of Mathematica

Both books have been listed in Addison Wesley catalogues for a while - 
even with ISB numbers, but the local A-W office does not know when they
are due out.

Thanks,

         Tim Monks                                

Image Processing & Data Analysis Group   |   (direct) +61-3-566-7448
BHP Melbourne Research Laboratories      |   (switch) +61-3-560-7066
245 Wellington Rd, Mulgrave, 3170,       |   (fax)    +61-3-561-6709
AUSTRALIA                                |   (EMAIL)  tim@merlin.bhpmrl.oz.au


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Nov 16 14:43:13 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA13959; Thu, 16 Nov 89 14:43:12 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA16525; Thu, 16 Nov 89 14:42:43 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA06432; Thu, 16 Nov 89 14:42:37 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA13682; Thu, 16 Nov 89 10:21:12 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA13678; Thu, 16 Nov 89 10:21:10 -0600
Message-Id: <8911161621.AA13678@yoda.ncsa.uiuc.edu>
Date: Sat Nov 11 15:14:58 1989
From: leon@extro.ucc.su.oz.au (L. Poladian)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  nonlinear regression curve fitting
Status: RO

In response to a recent enquiry about non-linear regression here are the
definitions for a routine that can be used.
I have not had time to set this all up correctly as a package with
contexts etc. and have only briefly tested it.
Therefore, use at your own peril.

Given a function f = F[x,y,...,a,b,...] of several variables x,y,...
which also depends on a number of parameters a,b,...  and a list of data
data = { {x1,y1,...,f1},  {x2,y2,...,f2}, ...  } the routine attempts to
find the values of a,b,... which minimizes the sum of the squares of the
residuals.
The only restriction on F[] is that Mathematica must be able to calculate
symbolic derivatives of F with respect to a,b,....

An initial estimate of the paramters is required and the routine returns
a "better" estimate of the parameters. If the original estimate is good
enough, repeating the process will eventually produce a converged result.

The definitions follow:

LinearFit[list_,fun_,f0_,var_] :=Block[{n,n2,m,b},
	n = Length[list];
	n2 = Length[fun];
	m = Table[
		Sum[ (fun[[j]] fun[[k]] /. 
			Thread[var -> Drop[list[[i]],-1]]), {i,1,n}],
		{j,1,n2}, {k,1,n2}];
	b = Table[
		Sum[ (fun[[j]] (list[[i,-1]]-f0) /.
			Thread[var -> Drop[list[[i]],-1]]), {i,1,n}],
		{j,1,n2}];
	LinearSolve[m,b]
	]


NonLinearFit[list_,fun_,par_,init_,var_]:=
 Block[{npar,sub,linfun,f0,coeff},
	npar = Length[par];
	sub = Thread[par -> init];
	linfun = Table[ D[ fun, par[[i]] ], {i,1,npar}] /.sub;
	f0 = fun /. sub;
	coeff = LinearFit[list,linfun,f0,var];
	init+coeff
	]


The routine is used as follows:

data = { {x1,y1,..,f1}, {x2,y2,...,f2}, ...};
function = F[x,y,...,a,b,...]; (* whatever function you are fitting *)
pars = {a,b,... };
initialestimate = {a0, b0, ... }; (* reasonable values for the parameters *)
vars = {x,y,...};

estimate = NonLinearFit[data,function,pars,initialestimate,vars]

estimate = NonLinearFit[data,function,pars,estimate,vars] (*keep repeating*)

Alternatively one can use FixedPoint

estimate = FixedPoint[NonLinearFit[data,function,pars,#,vars]&,initialestimate]

Leon Poladian
Theoretical Physics
University of Sydney

leon@extro.ucc.su.oz



From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Nov 16 14:46:10 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA13964; Thu, 16 Nov 89 14:46:08 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA16573; Thu, 16 Nov 89 14:45:39 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA06532; Thu, 16 Nov 89 14:45:33 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA13732; Thu, 16 Nov 89 10:52:28 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA13728; Thu, 16 Nov 89 10:52:27 -0600
Message-Id: <8911161652.AA13728@yoda.ncsa.uiuc.edu>
Date: Thu, 16 Nov 89 17:35:19 GMT
From: lie@itk.unit.no
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  ContourPlot
Status: RO

[Here are more details on the question regarding contour plots
previously sent to the mailing list. -s christensen]

More details.

Assume that you want to pick the pair (x,y) that minimize the function
     f[x_,y_]={x-3,y-5}.{{5,2},{2,5}}.{x-3,y-5}
By simplifying this expression, you get:
     f[x_,y_]=230 - 50x + 5x^2 - 62y + 4x y + 5y^2
The minimum is obviously the pair (x=3,y=5). Now, suppose that the solution is
constrained to lie on the curve:
     y[x_]=6 - 0.5x
What is then the pair (x,y) that minimize f[x,y]? This can be solved 
graphically by plotting the contours of f[x,y] into the x-y plane for different
values of f. Then plot the constraint (y[x]) in the x-y plane of the same
display. This will produce a visualization of the solution.

I tried to:
1.   ContourPlot[f[x,y],{x,-1,5},{y,0,8}]
2.   Plot[z[x],{x,-1,5}]   (I denoted y[x] by z[x])
3.   Show[%(no. of ContourPlot output), %(no. of Plot output)]

The result:
a.   Warning:
     Show::nocombine: Graphics of type ContourGraphics cannot be combined.
b.   Out[nn]=Show[-ContourGraphics-,-Graphics-]

Question: How can I solve my problem, i.e., how can I plot a ContourPlot
          in the same display as an ordinary plot??

Thanks!
Bernt Lie,
e-mail: lie@itk.unit.no


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Nov 17 15:35:44 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA15764; Fri, 17 Nov 89 15:35:41 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05241; Fri, 17 Nov 89 15:35:13 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA09435; Fri, 17 Nov 89 15:35:03 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA15624; Fri, 17 Nov 89 13:57:58 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA15620; Fri, 17 Nov 89 13:57:56 -0600
Date: Fri, 17 Nov 89 13:57:56 -0600
Message-Id: <8911171957.AA15620@yoda.ncsa.uiuc.edu>
From: tori@itk.unit.no
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: MathTalk
Status: RO

I'm writing a program where I want to call Mathematica to perform
symbolic and numerical operations. In the User's Guide for SUN Work-
stations it says that Mathematica supports communication with front 
ends and application-programs through the packet-based protocol
MathTalk. I've got the MathTalk utility programs
         control
         leftcrc
         leftend
         rightcrc
         rightend
         twoway
but there is no information on *how* to use these programs.

Question: Can anyone help me with some hints or examples on how to
          communicate with Mathematica through the MathTalk protocol
          from a general application program / front end?
          (I'm running Mathematica version 1.2 on a SUN 3/60 Work-
          station)


Tor Ivar Eikaas                     
Research Scientist               
SINTEF Automatic Control
NORWAY

Phone: +47-7-59449
email: tori@itk.unit.no

             


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Nov 17 15:51:00 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA15782; Fri, 17 Nov 89 15:50:59 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA05429; Fri, 17 Nov 89 15:50:31 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA09828; Fri, 17 Nov 89 15:50:24 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA15630; Fri, 17 Nov 89 13:59:26 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA15626; Fri, 17 Nov 89 13:59:24 -0600
Message-Id: <8911171959.AA15626@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Workshops in Mathematica 
Date: Fri, 17 Nov 89 01:41:44 -0800
From: nb@Polya.Stanford.EDU
Status: RO

----------------
Problem Solving with Mathematica
Taught by Nancy Blachman

This workshop offers a comprehensive introduction to Mathematica,
The course is targeted for engineers, physicists, financial analysts,
academic professionals, or anyone whose work or study involves
mathematical problem solving or analysis.  It focuses on using
Mathematica effectively to solve problems in such areas as calculus,
data analysis, algebra, number theory, and discrete mathematics.
Class participants will receive a 150-page class manual as well
as set of reference cards (listing all functions built into 
Mathematica).

Course Organization:

Introduction to Mathematica	
	Numerical, algebraic or symbolic, and graphics capabilities 	
	Data analysis 	
	Programming 	
Mathematica's internal representation 	
	Data Types 	
	Contexts, scoping of variables 	
I/O 	
Interfacing to other programs 	
	C, PostScript, TeX 	
Programming techniques 	
	Procedural 	
	Pattern matching 	
Debugging techniques 	
Writing packages (collections of functions) 	
Problem Solving 	
	An assortment of problems will be presented 	
Documentation	
	Notebooks	
	TeX	 

Nancy Blachman  worked at Wolfram Research, Inc. in 1988 and 1989
and recently started her own training and consulting business.  Nancy
has a B.S. in Mathematics from the University of Birmingham, U.K.,
an M.S. in Operations Research from UC Berkeley, and an M.S. in
Computer Science from Stanford University.  In addition to instructing 
a graduate level course in Computer Graphics, and working as a teaching
assistant in a course in Concrete Mathematics, Nancy has been a software
developer at Bell Laboratories and at the Research Institute for 
Advanced Computer Science at NASA Ames.

Below is a tentative list of the organizations where Nancy
Blachman will be offering courses in Mathematica this fall and
winter.  These courses vary in length and content.

ComputerWare
490 California Ave., Suite 202
Palo Alto, CA  94306
Tel: 415-323-7951
Contact: Anne Krause
Cost: $350-400
Dates: February 8, 1990

Rice University
Office of Continuing Studies
P. O. Box 1892
Houston, TX  77251-1892
Contact:  Edie Carlson-Abbey
Tel: 713-527-4803
Cost: $150-200
Date: February 23, 1990

Stanford University
Stanford Instructional Television Network (SITN)
Computer Science Department
Stanford, University CA  94305
Course Number: CS 193M
Contact:  Sally Kiester
Tel:  415-725-3002
Dates: Winter quarter, Tuesday 12 noon-1:05 pm

UC Berkeley Extension
Continuing Education
2223 Fulton Street
Berkeley, CA  94720
Contact:  Nanette Pike
Tel:  415-642-4151

UC Santa Cruz Extension
5201 Great America Parkway
Santa Clara, CA  95054
Contact:  Tim Johnson
Tel:  408-562-5726
Cost:  $600
Dates: February 15-16, 1990


Nancy Blachman also gives private courses in Mathematica.


Variable Symbols 
1701 Lincoln Street * Berkeley, CA 94703 * 415-486-8073
Email: nb@polya.stanford.edu or uunet.uu.net!polya.stanford.edu!nb


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Nov 17 17:00:15 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA15870; Fri, 17 Nov 89 16:59:33 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA06231; Fri, 17 Nov 89 16:59:06 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA11389; Fri, 17 Nov 89 16:58:58 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA15656; Fri, 17 Nov 89 14:09:24 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA15652; Fri, 17 Nov 89 14:09:22 -0600
Message-Id: <8911172009.AA15652@yoda.ncsa.uiuc.edu>
Date: Fri, 17 Nov 89 19:44:25 GMT
From: lie@itk.unit.no
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Combining plots
Status: RO

A partial solution to the problem of combining plots.

This is a *partial* solution to the problem of combining different types of
graphics in one plot. By partial is meant that the solution is cumbersome,
and not very elegant.

In general, two plots of different types (e.g., Plot and ContourPlot) cannot be combined in one plot by means of the Mathematica Show command. A solution to
this problem is to save the plots with the Display["file",%out] command, one
file per plot. The files are then merged into one file as they are. Finally, 
use the Wolfram Research program x11ps to display the merged file:
     ..path../x11ps < merged_file_name

x11ps displays the file on an X11 terminal. For other types of terminals, use:
sunps, tekps, ttyps (!), ... instead of x11ps.

The PROBLEM is that it is highly unlikely that you are able to produce the plots
such that the axis of the two plots coincide (i.e., I haven't found how to do
it). Even by use of the Show options PlotRange and Axes, I didn't succed.

A "dirty" way to solve this problem when combining a ContourPlot and a two-
dimensional plot is examplified  below:

-Problem:  Combine the plots (ContourPlot) of the object function:
                f[x_,y_]=x^2+2y^2
           and the constraint:
                y[x_]=5-x
           in the region {x,-5,5}, {y,-5,5}

-Amateurs solution:
           1. ContourPlot[f[x,y],{x,-5,5},{y,-5,5}]
               --> out[n] (for instance)
           2. It is very difficult to use Plot[y[x],{x,-5,5}], then
                 Show[%,PlotRange->{-5,5},AspectRatio->Automatic] and make
                 the axis overlay perfectly!! (i.e., for me).
               Solution: restate the constraint as:
                  z[x_,y_]=5-x-y
               ContourPlot[z[x,y],{x,-5,5},{y,-5,5}] gives you a heap of contour                  lines, where the sought one is that at z[x,y]=0. Now you just
                  Show the previous ContourPlot for z in the range of, say
                  {-.001,.001}: Show[%,PlotRange->{-.001,.001}]
                       --> out[m] (for instance)
                  If z is plotted in the range {-.1,.1}, the "line" will become
                  rather thick.
            3. Display["fxy",%n] and Display["zxy",%m] will save the files,
               which may then be merged into file "fzxy".
            4. The combined plots are shown with the command (on an x11-
               terminal):
                  ...path../x11ps < fzxy

As stated above, this is not a very proffesional way to do it. *Someone*
should write a general Mathematica command/routine to do it in one batch.

- Bernt Lie
  
PS. Valuable tips has been received from rgf@terra.... and nb@Polya...
   
                
               
            


From lie@itk.unit.no Sun Nov 19 08:56:01 1989
Received: from loke.idt.unit.no by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA17562; Sun, 19 Nov 89 08:54:28 -0600
Received: from adam.itk.unit.no by loke.idt.unit.no; Sun, 19 Nov 89 15:53:27 +0100
Date: Sun, 19 Nov 89 15:53:17 GMT
Received: from [129.241.10.55] by adam.itk.unit.no; Sun, 19 Nov 89 15:53:17 GMT
From: lie@itk.unit.no
Message-Id: <8911191455.AA08408@rudolf.itk.unit.no>
To: stevec@yoda.ncsa.uiuc.edu
Status: RO

Subject: Re: Combining plots
     
A partial solution to the problem of combining plots.
     
This is a *partial* solution to the problem of combining different types of
graphics in one plot. By partial is meant that the solution is cumbersome,
and not very elegant.
     
In general, two plots of different types (e.g., Plot and ContourPlot) cannot be
combined in one plot by means of the Mathematica Show command. A solution to
this problem is to save the plots with the Display["file",%out] command, one
file per plot. The files are then merged into one file as they are. Finally,
use the Wolfram Research program x11ps to display the merged file:
     ..path../x11ps < merged_file_name
     
x11ps displays the file on an X11 terminal. For other types of terminals, use:
sunps, tekps, ttyps (!), ... instead of x11ps.
     
The PROBLEM is that it is highly unlikely that you are able to produce the plots
such that the axis of the two plots coincide (i.e., I haven't found how to do
it). Even by use of the Show options PlotRange and Axes, I didn't succed.
     
A "dirty" way to solve this problem when combining a ContourPlot and a two-
dimensional plot is examplified  below:
     
-Problem:  Combine the plots (ContourPlot) of the object function:
                f[x_,y_]=x^2+2y^2
           and the constraint:
                y[x_]=5-x
           in the region {x,-5,5}, {y,-5,5}
     
-Amateurs solution:
           1. ContourPlot[f[x,y],{x,-5,5},{y,-5,5}]
               --> out[n] (for instance)
           2. It is very difficult to use Plot[y[x],{x,-5,5}], then
                 Show[%,PlotRange->{-5,5},AspectRatio->Automatic] and make
                 the axis overlay perfectly!! (i.e., for me).
               Solution: restate the constraint as:
                  z[x_,y_]=5-x-y
               ContourPlot[z[x,y],{x,-5,5},{y,-5,5}] gives you a heap of contour
                  lines, where the sought one is that at z[x,y]=0. Now you just
                  Show the previous ContourPlot for z in the range of, say
                  {-.001,.001}: Show[%,PlotRange->{-.001,.001}]
                       --> out[m] (for instance)
                  If z is plotted in the range {-.1,.1}, the "line" will become
                  rather thick.
            3. Display["fxy",%n] and Display["zxy",%m] will save the files,
               which may then be merged into file "fzxy".
            4. The combined plots are shown with the command (on an x11-
               terminal):
                  ...path../x11ps < fzxy
     
As stated above, this is not a very professional way to do it. *Someone*
should write a general Mathematica command/routine to do it in one batch.
     
- Bernt Lie
     
PS. Valuable tips has been received from rgf@terra.... and nb@Polya...
     
     
     
     
     


----- End Included Message -----


From testgroup-adm@yoda.ncsa.uiuc.edu Sun Nov 19 19:01:31 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA17819; Sun, 19 Nov 89 19:01:30 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA08647; Sun, 19 Nov 89 19:01:09 CST
Return-Path: <testgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA06291; Sun, 19 Nov 89 19:00:58 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA17807; Sun, 19 Nov 89 18:27:58 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA17803; Sun, 19 Nov 89 18:27:55 -0600
Message-Id: <8911200027.AA17803@yoda.ncsa.uiuc.edu>
Date: Sun, 19 Nov 89 16:16:36 PST
From: campbell@garnet.berkeley.edu (Robert I. Campbell)
To: mathgroup@garnet.berkeley.edu
Subject: EMACS front end for Mathematica
Status: RO

[Any information on front end development out there
in Mathematica land would be interesting. -s christensen]

I understand that someone has written an EMACS front end for
Mathematica (sort of a poor man's Notebook system without
fonts or graphics). Is this the case, and if so, how can I 
get a copy of it?

					- Robert Campbell -
					campbell@math.berkeley.edu
					Math Dept, UCBerkeley


From mathgroup-adm@yoda.ncsa.uiuc.edu Sun Nov 19 21:38:19 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA17878; Sun, 19 Nov 89 21:38:18 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA10151; Sun, 19 Nov 89 21:37:53 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA08852; Sun, 19 Nov 89 21:37:47 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA17835; Sun, 19 Nov 89 19:06:01 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA17831; Sun, 19 Nov 89 19:05:59 -0600
Message-Id: <8911200105.AA17831@yoda.ncsa.uiuc.edu>
Date: Sun, 19 Nov 89 16:16:36 PST
From: campbell@garnet.berkeley.edu (Robert I. Campbell)
To: mathgroup@garnet.berkeley.edu
Subject: EMACS front end for Mathematica
Status: RO

[Any information on front end development out there
in Mathematica land would be interesting. -s christensen]

I understand that someone has written an EMACS front end for
Mathematica (sort of a poor man's Notebook system without
fonts or graphics). Is this the case, and if so, how can I 
get a copy of it?

					- Robert Campbell -
					campbell@math.berkeley.edu
					Math Dept, UCBerkeley


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Nov 20 11:13:10 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA18944; Mon, 20 Nov 89 11:13:09 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA20240; Mon, 20 Nov 89 11:12:43 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA26198; Mon, 20 Nov 89 11:12:37 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA18823; Mon, 20 Nov 89 09:32:28 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA18819; Mon, 20 Nov 89 09:32:26 -0600
Message-Id: <8911201532.AA18819@yoda.ncsa.uiuc.edu>
Date: 20 Nov 1989 08:11:45 EST
From: JIM.THOMPSON@kbesrl.me.uiuc.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica front end in Lisp
Status: RO


> [Any information on front end development out there
> in Mathematica land would be interesting. -s christensen]

I have a front-end written in Common Lisp using CLOS (Common Lisp Object
System).  It presently runs on a Symbolics machine and relies on a few
Symbolics Common Lisp functions to create networked tcp byte streams
connected to a Sun running a Mathematica kernel.  I think it would be
a relatively easy port to a non-Lisp-machine Lisp and would be interested
in such a version.  No graphics display capability!  I use it for
a "mathematics computation server" for programs running in Lisp.

Anyone interested?

Jim Thompson

Knowledge-Based Engineering Systems Research Laboratory
University of Illinois at Urbana-Champaign
Department of Mechanical & Industrial Engineering
1206 W. Green St.  Urbana IL 61801

217-244-0292   jb-thompson@uiuc.edu



From conal@kestrel.edu Thu Dec 14 12:03:58 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02639; Thu, 14 Dec 89 12:03:56 -0600
Received: from ncsa.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA23814; Thu, 14 Dec 89 12:03:44 CST
Return-Path: <conal@kestrel.edu>
Received: from kestrel.kestrel.edu (kestrel.edu) by ncsa.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA21284; Thu, 14 Dec 89 12:02:53 CST
Received: from raven.kestrel.edu by kestrel.kestrel.edu (5.58/SMI-DDN)
	id AA15638; Thu, 14 Dec 89 09:59:02 PDT
Received: from localhost by raven.kestrel.edu (4.0/SMI-4.0)
	id AA06775; Thu, 14 Dec 89 10:02:39 PST
To: mathgroup <stevec@ncsa.uiuc.edu>
Reply-To: Conal Elliott <conal@kestrel.edu>
Subject: Polyhedra
Date: Thu, 14 Dec 89 10:02:38 PST
Message-Id: <6774.629661758@raven.kestrel.edu>
From: conal@kestrel.edu
Status: RO

I'm curious about how the coordinates of the vertices of the polyhedra in
polyhedra.m were computed.  Any pointers?

Also, has anybody worked out a program for doing "REAL" stellations, which
conceptually are formed by extending faces and clipping at plane
intersections, as opposed to adding pyramids to faces?  Thanks,

    Conal Elliott
    Kestrel Institute
    3260 Hillview Ave.
    Palo Alto, CA  94304
    (415) 493-6871
    conal@kestrel.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Dec 14 14:40:46 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02854; Thu, 14 Dec 89 14:40:45 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA25732; Thu, 14 Dec 89 14:40:28 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA13024; Thu, 14 Dec 89 14:40:09 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02782; Thu, 14 Dec 89 13:31:27 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02778; Thu, 14 Dec 89 13:31:25 -0600
Message-Id: <8912141931.AA02778@yoda.ncsa.uiuc.edu>
To: mathgroup <stevec@ncsa.uiuc.edu>
Subject: Polyhedra
Date: Thu, 14 Dec 89 10:02:38 PST
From: conal@kestrel.edu
Status: RO

I'm curious about how the coordinates of the vertices of the polyhedra in
polyhedra.m were computed.  Any pointers?

Also, has anybody worked out a program for doing "REAL" stellations, which
conceptually are formed by extending faces and clipping at plane
intersections, as opposed to adding pyramids to faces?  Thanks,

    Conal Elliott
    Kestrel Institute
    3260 Hillview Ave.
    Palo Alto, CA  94304
    (415) 493-6871
    conal@kestrel.edu



From stevec Wed Dec 20 00:26:35 1989
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09897; Wed, 20 Dec 89 00:26:33 -0600
Date: Wed, 20 Dec 89 00:26:33 -0600
From: Steve Christensen <stevec@yoda.ncsa.uiuc.edu>
Message-Id: <8912200626.AA09897@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Sci.math.symbolic archive and NeWS.view
Status: RO


Mark Phillips from the University of Maryland has very
generously volunteered to archive Mathematica related
entries in the sci.math.symbolic newsgroup and other
newsgroups on the net.  He has sent me the latest archive
called Archive4 and the NeWS graphics upgrade for
Mathematica from Roman Maeder called NeWS.view.
Both of these have been placed on the MathGroup
anonymous ftp server.  If you cannot reach
the archive, I can email you a shar file containing
the above files.

Mark will send more archives as he collects them.

Thanks to Mark.

Steve Christensen


From stevec Wed Dec 27 02:24:44 1989
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04197; Wed, 27 Dec 89 02:24:43 -0600
Date: Wed, 27 Dec 89 02:24:43 -0600
From: Steve Christensen <stevec@yoda.ncsa.uiuc.edu>
Message-Id: <8912270824.AA04197@yoda.ncsa.uiuc.edu>
To: stevec@yoda.ncsa.uiuc.edu
Subject: Mathematica Reference Card
Status: RO


From:
-----------------------------------------------------------------------------
Variable Symbols provides reference material, training courses, software, and 
other products to people who use or plan to use Mathematica.

We developed a set of Mathematica reference cards listing all functions, 
options, variables, etc. built into Mathematica.  Each set includes four 
laminated cards displaying the usage statements included in the file info.m 
distributed with version 1.2 of Mathematica.  The cards also list aliases and 
special forms.  The list price for these cards is $9.95. They are available 
from various bookstores and Mathematica dealers including M.A.C. (2156A 
University Ave., Berkeley, CA 94704, FAX (415) 644-0584, tel. (415) 644-0516).
When ordering directly from Variable Symbols, include $2 for postage and 
handling.  California residents include 7% for sales tax.  One complimentary 
set of cards is included for each set of 10 cards purchased directly from 
Variable Symbols.

    Nancy Blachman      (415) 486-8073        Email:  nb@polya.stanford.edu  
Variable Symbols * 1701 Lincoln Street * Berkeley, CA 94703-1308 * 415 486 8073
_______________________________________________________________________________
                    Mathematica Reference Card Order Form

Variable Symbols provides reference material, training courses, software,
and other products of interest to people who use or plan to use Mathematica. 

You may use this form to order Mathematica reference cards from Variable
Symbols.  

Name___________________________________________________________________________

Job Title______________________________________________________________________

Firm___________________________________________________________________________

Street Address_________________________________________________________________

City, State ZIP (postal code), Country_________________________________________

Electronic Address_____________________________________________________________

FAX____________________________________________________________________________

Telephone______________________________________________________________________

Order Information
Description                     Price            Quantity        Total

Mathematica reference cards     $9.95           __________    $________

Postage and handling            $2.00                         $    2.00

California residents include 7% sales tax                     $________

                                                Total price   $________
Make your check payable to Variable Symbols. 

Name (printed) ________________________________________ Date___________________

Signature______________________________________________________________________

We provide workshops in Mathematica.  Would you be interested in (mark all that
apply)?
__ On-site training   __ Video tapes  __ Notification of Workshops in your area
__ Off-site training  __ On-line tutorials  
_______________________________________________________________________________
Variable Symbols * 1701 Lincoln Street * Berkeley, CA 94703-1308 * 415 486 8073


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Dec 27 05:05:04 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA04265; Wed, 27 Dec 89 05:05:03 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA07929; Wed, 27 Dec 89 05:04:47 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA18556; Wed, 27 Dec 89 05:04:42 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04214; Wed, 27 Dec 89 02:28:09 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04210; Wed, 27 Dec 89 02:28:08 -0600
Message-Id: <8912270828.AA04210@yoda.ncsa.uiuc.edu>
Date: Wed, 27 Dec 89 02:24:43 -0600
From: stevec@yoda.ncsa.uiuc.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica Reference Card
Status: RO

I have been asked to post this to the mailing list.

-----------------------------------------------------------------------------
Variable Symbols provides reference material, training courses, software, and 
other products to people who use or plan to use Mathematica.

We developed a set of Mathematica reference cards listing all functions, 
options, variables, etc. built into Mathematica.  Each set includes four 
laminated cards displaying the usage statements included in the file info.m 
distributed with version 1.2 of Mathematica.  The cards also list aliases and 
special forms.  The list price for these cards is $9.95. They are available 
from various bookstores and Mathematica dealers including M.A.C. (2156A 
University Ave., Berkeley, CA 94704, FAX (415) 644-0584, tel. (415) 644-0516).
When ordering directly from Variable Symbols, include $2 for postage and 
handling.  California residents include 7% for sales tax.  One complimentary 
set of cards is included for each set of 10 cards purchased directly from 
Variable Symbols.

    Nancy Blachman      (415) 486-8073        Email:  nb@polya.stanford.edu  
Variable Symbols * 1701 Lincoln Street * Berkeley, CA 94703-1308 * 415 486 8073
_______________________________________________________________________________
                    Mathematica Reference Card Order Form

Variable Symbols provides reference material, training courses, software,
and other products of interest to people who use or plan to use Mathematica. 

You may use this form to order Mathematica reference cards from Variable
Symbols.  

Name___________________________________________________________________________

Job Title______________________________________________________________________

Firm___________________________________________________________________________

Street Address_________________________________________________________________

City, State ZIP (postal code), Country_________________________________________

Electronic Address_____________________________________________________________

FAX____________________________________________________________________________

Telephone______________________________________________________________________

Order Information
Description                     Price            Quantity        Total

Mathematica reference cards     $9.95           __________    $________

Postage and handling            $2.00                         $    2.00

California residents include 7% sales tax                     $________

                                                Total price   $________
Make your check payable to Variable Symbols. 

Name (printed) ________________________________________ Date___________________

Signature______________________________________________________________________

We provide workshops in Mathematica.  Would you be interested in (mark all that
apply)?
__ On-site training   __ Video tapes  __ Notification of Workshops in your area
__ Off-site training  __ On-line tutorials  
_______________________________________________________________________________
Variable Symbols * 1701 Lincoln Street * Berkeley, CA 94703-1308 * 415 486 8073



From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Dec 30 04:49:13 1989
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA07230; Sat, 30 Dec 89 04:49:12 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA22325; Sat, 30 Dec 89 04:49:00 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA11973; Sat, 30 Dec 89 04:48:54 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA07200; Sat, 30 Dec 89 02:20:02 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA07196; Sat, 30 Dec 89 02:20:01 -0600
Message-Id: <8912300820.AA07196@yoda.ncsa.uiuc.edu>
From: ssa@wri.com
Date: Fri, 29 Dec 89 14:37:02 CST
To: mathgroup@ncsa.uiuc.edu
Subject: SUN upgrades
Status: RO

Please post information about upgrading
the copies of Mathematica that were sold directly by SUN.  If a user has
a "PILOT" copy or 1.1 copy of SunMathematica, they are eligible for a free
upgrade. 

To do the upgrade we need the following information:
1. Original Sun invoice number
2. Original Sun sales order (S.O.) number
3. Machine type they are running the software on
4. Host name
5. CPU ID
6. password

Once we have verified ( against the list from Sun ) they have purchased the
stated number of copies of software, we will ship out a new tape, update 
release notes and new installation instructions.

Unlike Sun, we will only send out one binary form of the software.  Sun provided
the customer with 386i, Sun3 and Sun4 version and let them chose. So we
have to know which machine the have been running the software on.  

If users have questions about the program, they can contact me at
217-398-0700.  Thanks!!

Stuart Ariewitz


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Jan  2 20:05:21 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA10390; Tue, 2 Jan 90 20:05:20 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14001; Tue, 2 Jan 90 20:05:13 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA15752; Tue, 2 Jan 90 20:05:06 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10367; Tue, 2 Jan 90 18:28:39 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10363; Tue, 2 Jan 90 18:28:38 -0600
Message-Id: <9001030028.AA10363@yoda.ncsa.uiuc.edu>
Date: Tue, 2 Jan 90 15:59:48 PST
From: kenward@mdivax1.UUCP (Gary Kenward)
To: mathgroup-request@yoda.ncsa.uiuc.edu
Subject: looking for DSP algorithms in Mathematica
Status: RO

I am interested in finding a source for Mathematica 
implementations of various DSP algorithms:  
FIR filter design (Parks-McClellan, bilinear transform), 
IIR filter design (Prony, Yule-Walker), power spectral 
estimation, FFTs (1 and 2 dimensions), windows (Blackman, 
Kaiser, Hamming, Hanning, etc.), decimation and
interpolation, pole-zero plots, and so forth.

Shareware would be nice, but any leads to a good source would
be appreciated.

Thanks in advance.

Gary W. Kenward
Advanced Technology and Communications Standards
Mobile Data International Inc.
Richmond B.C. Canada.


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Jan  2 21:10:31 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA10463; Tue, 2 Jan 90 21:10:30 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14594; Tue, 2 Jan 90 21:10:24 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA16800; Tue, 2 Jan 90 21:10:17 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10372; Tue, 2 Jan 90 18:28:49 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10368; Tue, 2 Jan 90 18:28:47 -0600
Message-Id: <9001030028.AA10368@yoda.ncsa.uiuc.edu>
Date: Tue, 2 Jan 90 17:57:50 EST
From: crm@summanulla.nbsr.duke.edu (Charles R. Martin)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica and External Numeric Packages.
Status: RO

We are considering re-implementing or extending our existing simulation
package by using Mathematica; I've been thinking about ways in which
fast numeric packages for special problems might be made accessible
through Mathematica.  So far, my cursory reading of the Mathematica book
suggests that a program can be run subsidiary to Mathematica through a
pipe and the results returned.  This could be nearly useful, but some
details of how the results are obtained and their formats are unclear to
me.  Also, I wonder if it might not be possible to implement new
primitives in C and import them somehow.

This is all prologue to asking anyone who has had experience with
implementing new numeric routines, especially those which are not coded
in Mathematica form, to share with me any information they can.

Thanks very much,


Charlie Martin (...!mcnc!duke!crm, crm@summanulla.mc.duke.edu)
NBSR/Box 3709/Duke University Medical Center/Durham, NC 27710


From @uunet.UU.NET:smay@wri.UUCP Fri Jan  5 17:26:22 1990
Received: from uunet.UU.NET by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA14728; Fri, 5 Jan 90 17:26:17 -0600
Received: from wri.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA16500; Fri, 5 Jan 90 18:25:21 -0500
Received: by WRI.com (3.2/SMI-3.0DEV3)
	id AA03340; Fri, 5 Jan 90 17:22:02 CST
Date: Fri, 5 Jan 90 17:22:02 CST
From: smay@wri.UUCP (Scott May)
Message-Id: <9001052322.AA03340@WRI.com>
To: stevec@yoda.ncsa.uiuc.edu
Subject: fourier
Status: RO

This may have to do with the trouble those guys were having with fourier

>From ebneter Thu Jan  4 12:20:31 1990
Date: Thu, 4 Jan 90 12:20:23 CST
From: ebneter (Kate Ebneter)
To: koch@vms1.engr.utk.edu, smay
Status: RO


Unfortunately, Fourier transforms are one of those areas of mathematics where
several different conventions are used, both for the normalization constants
and for the integrand.  A search of several mathematics handbooks reveals that
both definitions of the forward and inverse Fourier transform are used, with
engineering-oriented texts leaning heavily towards the opposite convention
from the one which we used.  The convention we chose is, for example, used in
Press et al., Numerical Recipes and many other texts.  In cases like this we
have to make a design decision about which convention to use.

Thank you for your interest in Mathematica.

Kate Ebneter
Software Quality Assurance Manager
Wolfram Research, Inc.

From u12253@ux.ncsa.uiuc.edu Mon Feb 12 13:21:59 1990
Received: from ncsa.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA28179; Mon, 12 Feb 90 13:21:58 -0600
Return-Path: <u12253@ux.ncsa.uiuc.edu>
Received: from ux.ncsa.uiuc.edu by ncsa.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA21740; Mon, 12 Feb 90 13:21:23 CST
Received:  by ux.ncsa.uiuc.edu
	id AA51690; 5.61/CRI-%I%; Mon, 12 Feb 90 13:20:36 -0600
Date: Mon, 12 Feb 90 13:20:36 -0600
From: u12253@ux.ncsa.uiuc.edu (Charles G. Fleming)
Message-Id: <9002121920.AA51690@ux.ncsa.uiuc.edu>
To: steve@ncsa.ncsa.uiuc.edu
Status: RO

splice

I have been  using Mathematica to generate some systems of differential
equations and then splice the resulting equations into a FORTRAN (gag)
program so that they can be numberically solved using the imsl package.
The problem is that if the equations are too long for FORTRAN splice does
not break the output into several lines with continuation  markers.  In other
words, it seems that FortranForm on Mathematica  doesn't work as it should.
I wrote a C program to reformat splice's output, but this is something that
FortranForm should do. Perhaps I'm not using the correct options with splice.
Are you familiar with this problem or do you know someone at WRI that could
give me a work-around?  Thanks.
chuck fleming


From testgroup-adm@yoda.ncsa.uiuc.edu Fri Mar  2 02:08:02 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09058; Fri, 2 Mar 90 02:08:01 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA00715; Fri, 2 Mar 90 02:06:52 CST
Return-Path: <testgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA11143; Fri, 2 Mar 90 02:06:52 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09027; Fri, 2 Mar 90 01:13:20 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09023; Fri, 2 Mar 90 01:13:19 -0600
Message-Id: <9003020713.AA09023@yoda.ncsa.uiuc.edu>
Date: Tue, 27 Feb 90 12:37:20 EST
From: Carl L. Gardner <gardner@cs.duke.edu>
Subject: graphics questions
Apparently-To: testgroup-send@yoda.ncsa.uiuc.edu
Status: RO


I have three graphics questions:

(1) On my SPARCstation (which has a graphics accelerator), if I zoom a
plot to full screen, the lines become very blobby.  If I close the
window, & then reopen it, the lines are reasonably thin (correct).  Is
this a bug--sunview or graphics accelerator?

(2) Do you know how to get Greek letters & math symbols on the
Mathematica plots?

(3) Is there a standard coloring for 3D plots, i.e., can I get a spectrum
instead of gray tones easily?  (I know how to color the plots "by hand",
but there ought to be a default spectrum & coloring.)

Thanks very much!

--Carl


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Mar  2 14:15:15 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09252; Fri, 2 Mar 90 14:15:14 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA10494; Fri, 2 Mar 90 14:13:55 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA01685; Fri, 2 Mar 90 14:13:54 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09209; Fri, 2 Mar 90 12:15:13 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09205; Fri, 2 Mar 90 12:15:11 -0600
Message-Id: <9003021815.AA09205@yoda.ncsa.uiuc.edu>
Date: Tue, 27 Feb 90 12:37:20 EST
From: Carl L. Gardner <gardner@cs.duke.edu>
Subject: graphics questions
Apparently-To: mathgroup-send@yoda.ncsa.uiuc.edu
Status: RO


I have three graphics questions:

(1) On my SPARCstation (which has a graphics accelerator), if I zoom a
plot to full screen, the lines become very blobby.  If I close the
window, & then reopen it, the lines are reasonably thin (correct).  Is
this a bug--sunview or graphics accelerator?

(2) Do you know how to get Greek letters & math symbols on the
Mathematica plots?

(3) Is there a standard coloring for 3D plots, i.e., can I get a spectrum
instead of gray tones easily?  (I know how to color the plots "by hand",
but there ought to be a default spectrum & coloring.)

Thanks very much!

--Carl


From gardner@cs.duke.edu Tue Feb 27 11:39:13 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA06107; Tue, 27 Feb 90 11:39:12 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA23341; Tue, 27 Feb 90 11:38:17 CST
Return-Path: <gardner@cs.duke.edu>
Received: from duke.cs.duke.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA07741; Tue, 27 Feb 90 11:37:42 CST
Received: from babel-17.cs.duke.edu by duke.cs.duke.edu (5.59/DUKE/08-19-88)
	id AA15977; Tue, 27 Feb 90 12:37:28 EST
Received: by babel-17.cs.duke.edu (5.59/DUKE/08-19-88)
	id AA06635; Tue, 27 Feb 90 12:37:20 EST
Date: Tue, 27 Feb 90 12:37:20 EST
From: Carl L. Gardner <gardner@cs.duke.edu>
Message-Id: <9002271737.AA06635@babel-17.cs.duke.edu>
To: stevec@ncsa.uiuc.edu
Subject: graphics questions
Cc: gardner@cs.duke.edu
Status: RO


I have three graphics questions:

(1) On my SPARCstation (which has a graphics accelerator), if I zoom a
plot to full screen, the lines become very blobby.  If I close the
window, & then reopen it, the lines are reasonably thin (correct).  Is
this a bug--sunview or graphics accelerator?

(2) Do you know how to get Greek letters & math symbols on the
Mathematica plots?

(3) Is there a standard coloring for 3D plots, i.e., can I get a spectrum
instead of gray tones easily?  (I know how to color the plots "by hand",
but there ought to be a default spectrum & coloring.)

Thanks very much!

--Carl

From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Mar  9 13:17:42 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA17357; Fri, 9 Mar 90 13:17:40 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA04595; Fri, 9 Mar 90 13:16:38 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA16175; Fri, 9 Mar 90 13:16:25 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA17080; Fri, 9 Mar 90 10:55:13 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA17076; Fri, 9 Mar 90 10:55:12 -0600
Message-Id: <9003091655.AA17076@yoda.ncsa.uiuc.edu>
Date: Tue, 6 Mar 90 14:59:06 EST
From: jack@sun.acs.udel.edu
Subject: Use of Literal
Apparently-To: mathgroup-send@yoda.ncsa.uiuc.edu
Status: RO


I want to define a function of Mathematica built-in function.  I can do this
but to evaluate it seems a little awkward.  I must be doing something wrong!?

In[1]:= f[Literal[Integrate[g_,x_]]]:=Integrate[g,x] + Sin[x]

In[2]:= f[Integrate[q[t],t]]

Out[2]= Integrate[q[t], t] + Sin[t]

In[3]:= %/.q[t]->t^3

         4
        t
Out[3]= -- + Sin[t]
        4

In[4]:= "However................"

In[5]:= r[t]:=t^3

In[6]:= f[Integrate[r[t],t]]

           4
          t
Out[6]= f[--]
          4

In[7]:= "or....";

In[8]:= r[t_]:=t^3

In[9]:= f[Integrate[r[t],t]]

           4
          t
Out[9]= f[--]


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Mar  9 15:28:09 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA17668; Fri, 9 Mar 90 15:28:08 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA06785; Fri, 9 Mar 90 15:27:04 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA20202; Fri, 9 Mar 90 15:26:52 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA17237; Fri, 9 Mar 90 12:38:37 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA17233; Fri, 9 Mar 90 12:38:36 -0600
Message-Id: <9003091838.AA17233@yoda.ncsa.uiuc.edu>
Date: Fri, 09 Mar 90 10:33:58 PST
From: jacobson@cello.hpl.hp.com
Subject: Re: Literal
Apparently-To: mathgroup-send@yoda.ncsa.uiuc.edu
Status: RO

jack@sun.acs.udel.edu writes: 

    I want to define a function of Mathematica built-in function.  I can
    do this but to evaluate it seems a little awkward.  I must be doing
    something wrong!?

    In[1]:= f[Literal[Integrate[g_,x_]]]:=Integrate[g,x] + Sin[x]

    r[t_]:=t^3
    ...
    In[9]:= f[Integrate[r[t],t]]

	       4
	      t
    Out[9]= f[--]
	      4

The problem has nothing to do with literal, but rather with the fact
that f[] evaluates its argument.  

Since Integrate[r[t],t] evaluates to t^4/4, all f ever gets to see is
f[t^4/4], and that won't evaluate, so that is what it gives you.  

If before defining f you make f have the HoldAll attribute, everything
will work fine.

----------------------
In[1]:= SetAttributes[f,HoldAll]

In[2]:=  f[Literal[Integrate[g_,x_]]]:=Integrate[g,x] + Sin[x]

In[3]:= r[t_] := t^3 

In[4]:= f[Integrate[r[t],t]]

         4
        t
Out[4]= -- + Sin[t]
        4
---------------
  -- David Jacobson


From PIOTR.FLATAU@ARIES.ATMOS.COLOSTATE.EDU Sun Mar 11 00:49:02 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA19894; Sun, 11 Mar 90 00:49:01 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA03040; Sun, 11 Mar 90 00:48:04 CST
Return-Path: <PIOTR.FLATAU@ARIES.ATMOS.COLOSTATE.EDU>
Received: from ccncsu.ColoState.EDU by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA24549; Sun, 11 Mar 90 00:47:50 CST
Received: from aries.ATMOS.ColoState.EDU by ccncsu.ColoState.EDU (5.59/Ultrix2.0-B)
	id AA14808; Sat, 10 Mar 90 23:44:27 MST
Message-Id: <9003110644.AA14808@ccncsu.ColoState.EDU>
Date: 10 Mar 1990 23:46:30 EST
From: PIOTR.FLATAU@ARIES.ATMOS.COLOSTATE.EDU
To: STEVE@ncsa.uiuc.edu
Subject: 
Status: RO

Steve,
I wonder if it is possible to overlap two surfaces in Mathematica
(on one plot).  Something like, say:

a:= 2x+y
b:=x+y
pl1:= Plot3D[a, {x,0,1}, {y,0,1}]
pl2:= Plot3D[b, {x,0,1}, {y,0,1}]

Show[pl1,pl2] -----------------------------> doesn't work
or
Plot3D[{a,b}, {x, 0,1}, {y,0,1}] ------> doesn't work

I read the first 5 archives but nothing there except, possibly,
Ken Yip's question ?

Peter
flatau@handel.cs.colostate.edu

From mathgroup-adm@yoda.ncsa.uiuc.edu Sun Mar 11 20:28:07 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA20239; Sun, 11 Mar 90 20:28:06 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA16514; Sun, 11 Mar 90 20:28:13 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA13069; Sun, 11 Mar 90 20:28:00 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA20135; Sun, 11 Mar 90 16:29:14 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA20131; Sun, 11 Mar 90 16:29:13 -0600
Message-Id: <9003112229.AA20131@yoda.ncsa.uiuc.edu>
Date: Sat, 10 Mar 90 17:08:00 CST
From: paul@wri.UUCP (Paul Abbott)
Subject: Re:  Use of Literal
Apparently-To: mathgroup-send@yoda.ncsa.uiuc.edu
Status: RO

I would use HoldFirst (or HoldAll) instead:

Mathematica (sun3.68881) 1.2 (November 6, 1989) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
with I. Rivin and D. Withoff
Copyright 1988,1989 Wolfram Research Inc.
 -- Terminal graphics initialized --

In[1]:= SetAttributes[f,HoldFirst]

In[2]:= f[Integrate[g_,x_]] := Integrate[g,x] + Sin[x]

In[3]:= f[Integrate[x^2,x]]

	 3
	x
Out[3]= -- + Sin[x]
	3

In[4]:= ^D



From mathgroup-adm@yoda.ncsa.uiuc.edu Sun Mar 11 21:22:13 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA20343; Sun, 11 Mar 90 21:22:12 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA17108; Sun, 11 Mar 90 21:22:20 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA13851; Sun, 11 Mar 90 21:22:07 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA20147; Sun, 11 Mar 90 16:30:52 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA20143; Sun, 11 Mar 90 16:30:50 -0600
Message-Id: <9003112230.AA20143@yoda.ncsa.uiuc.edu>
Date: 10 Mar 1990 23:46:30 EST
From: PIOTR.FLATAU@ARIES.ATMOS.COLOSTATE.EDU
Subject:  Plotting two surfaces
Apparently-To: mathgroup-send@yoda.ncsa.uiuc.edu
Status: RO

I wonder if it is possible to overlap two surfaces in Mathematica
(on one plot).  Something like, say:

a:= 2x+y
b:=x+y
pl1:= Plot3D[a, {x,0,1}, {y,0,1}]
pl2:= Plot3D[b, {x,0,1}, {y,0,1}]

Show[pl1,pl2] -----------------------------> doesn't work
or
Plot3D[{a,b}, {x, 0,1}, {y,0,1}] ------> doesn't work

I read the first 5 archives but nothing there except, possibly,
Ken Yip's question ?

Peter
flatau@handel.cs.colostate.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Sun Mar 11 21:41:21 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA20445; Sun, 11 Mar 90 21:41:20 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA17332; Sun, 11 Mar 90 21:41:28 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA14169; Sun, 11 Mar 90 21:41:15 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA20141; Sun, 11 Mar 90 16:29:53 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA20137; Sun, 11 Mar 90 16:29:51 -0600
Message-Id: <9003112229.AA20137@yoda.ncsa.uiuc.edu>
Date: Sat, 10 Mar 90 17:11:26 CST
From: paul@wri.UUCP (Paul Abbott)
Subject: Re:  DSolve
Apparently-To: mathgroup-send@yoda.ncsa.uiuc.edu
Status: RO

I think that I posted a solution to this before.  Here is another attempt.
Note that DSolve allows the boundary conditions to be entered as equations:

Mathematica (sun3.68881) 1.2 (November 6, 1989) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
with I. Rivin and D. Withoff
Copyright 1988,1989 Wolfram Research Inc.
 -- Terminal graphics initialized --

In[1]:= ?DSolve
DSolve[eqn, y[x], x] solves differential equations for the function y[x] with
   independent variable x. DSolve[{eqn1, eqn2, ...}, {y1[x1], y2[x2], ...},
   {x1, x2, ...}] solves a list of differential equations. Equations can
   either be differential equations or constraints: a differential equation
   may have the form F[y[x], y'[x], ..., Derivative[n][y][x], x] == 0;
   constraints may be of the form Derivative[k][y][pti]== vali.

In[1]:= DSolve[{x'[t]==-t, x[0]==1},x[t],t]

                       2
                      t
Out[1]= {{x[t] -> 1 - --}}
                      2

In[2]:= ^D


From @uunet.UU.NET:paul@wri.UUCP Mon Mar 12 02:28:17 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA22153; Mon, 12 Mar 90 02:28:15 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA22349; Mon, 12 Mar 90 02:28:27 CST
Return-Path: <wri!paul@uunet.UU.NET>
Received: from uunet.uu.net by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA20131; Mon, 12 Mar 90 02:28:14 CST
Received: from wri.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA24635; Mon, 12 Mar 90 03:26:26 -0500
From: paul@wri.UUCP
Received: by WRI.com (3.2/SMI-3.0DEV3)
	id AA09999; Mon, 12 Mar 90 02:19:21 CST
Message-Id: <9003120819.AA09999@WRI.com>
Date: Mon, 12 Mar 90 02:19:16 CST
To: PIOTR.FLATAU@ARIES.ATMOS.COLOSTATE.EDU
Subject: Re:  Plotting two surfaces
Cc: mathgroup@uunet.UU.NET
Status: RO

One way of doing this is to convert the -SurfaceGraphics- to -Graphics3D-
objects first.  

plot1 = Plot3D[2x+y, {x,0,1}, {y,0,1}]
plot2 = Plot3D[x+y, {x,0,1}, {y,0,1}]

This is easily done using

graphics1 = Graphics3D[plot1];
graphics2 = Graphics3D[plot2];

You then show the two graphics together:

Show[graphics1,graphics2]

From @uunet.UU.NET:paul@wri.UUCP Sun Mar 11 15:09:47 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA20078; Sun, 11 Mar 90 15:09:45 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA12959; Sun, 11 Mar 90 15:09:57 CST
Return-Path: <wri!paul@uunet.UU.NET>
Received: from uunet.uu.net by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA08316; Sun, 11 Mar 90 15:09:43 CST
Received: from wri.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA03861; Sun, 11 Mar 90 16:09:04 -0500
Received: by WRI.com (3.2/SMI-3.0DEV3)
	id AA00590; Sat, 10 Mar 90 17:08:00 CST
Date: Sat, 10 Mar 90 17:08:00 CST
From: paul@wri.UUCP (Paul Abbott)
Message-Id: <9003102308.AA00590@WRI.com>
To: jack@sun.acs.udel.edu
Subject: Re:  Use of Literal
Cc: mathgroup@uunet.UU.NET
Status: RO

I would use HoldFirst (or HoldAll) instead:

Mathematica (sun3.68881) 1.2 (November 6, 1989) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
with I. Rivin and D. Withoff
Copyright 1988,1989 Wolfram Research Inc.
 -- Terminal graphics initialized --

In[1]:= SetAttributes[f,HoldFirst]

In[2]:= f[Integrate[g_,x_]] := Integrate[g,x] + Sin[x]

In[3]:= f[Integrate[x^2,x]]

	 3
	x
Out[3]= -- + Sin[x]
	3

In[4]:= ^D


From @uunet.UU.NET:paul@wri.UUCP Sun Mar 11 15:12:30 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA20083; Sun, 11 Mar 90 15:12:28 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA13012; Sun, 11 Mar 90 15:12:40 CST
Return-Path: <wri!paul@uunet.UU.NET>
Received: from uunet.uu.net by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA08379; Sun, 11 Mar 90 15:12:26 CST
Received: from wri.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA04885; Sun, 11 Mar 90 16:11:56 -0500
Received: by WRI.com (3.2/SMI-3.0DEV3)
	id AA00616; Sat, 10 Mar 90 17:11:26 CST
Date: Sat, 10 Mar 90 17:11:26 CST
From: paul@wri.UUCP (Paul Abbott)
Message-Id: <9003102311.AA00616@WRI.com>
To: jack@sun.acs.udel.edu
Subject: Re:  DSolve
Cc: mathgroup@uunet.UU.NET
Status: RO

I think that I posted a solution to this before.  Here is another attempt.
Note that DSolve allows the boundary conditions to be entered as equations:

Mathematica (sun3.68881) 1.2 (November 6, 1989) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
with I. Rivin and D. Withoff
Copyright 1988,1989 Wolfram Research Inc.
 -- Terminal graphics initialized --

In[1]:= ?DSolve
DSolve[eqn, y[x], x] solves differential equations for the function y[x] with
   independent variable x. DSolve[{eqn1, eqn2, ...}, {y1[x1], y2[x2], ...},
   {x1, x2, ...}] solves a list of differential equations. Equations can
   either be differential equations or constraints: a differential equation
   may have the form F[y[x], y'[x], ..., Derivative[n][y][x], x] == 0;
   constraints may be of the form Derivative[k][y][pti]== vali.

In[1]:= DSolve[{x'[t]==-t, x[0]==1},x[t],t]

                       2
                      t
Out[1]= {{x[t] -> 1 - --}}
                      2

In[2]:= ^D

From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Mar 13 01:20:55 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA23951; Tue, 13 Mar 90 01:20:53 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA18046; Tue, 13 Mar 90 01:20:47 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA21697; Tue, 13 Mar 90 01:20:45 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22843; Mon, 12 Mar 90 20:10:10 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22839; Mon, 12 Mar 90 20:10:09 -0600
Message-Id: <9003130210.AA22839@yoda.ncsa.uiuc.edu>
Date: Mon, 12 Mar 90 16:16:34 PST
From: campbell@garnet.berkeley.edu (Robert I. Campbell)
Subject: Re: Plotting two surfaces
Apparently-To: mathgroup-send@yoda.ncsa.uiuc.edu
Status: RO

>I wonder if it is possible to overlap two surfaces in Mathematica
>(on one plot).
>
>Peter
>flatau@handel.cs.colostate.edu

Basically, the way to do this is to convert both surfaces (SurfaceGraphics
objects) to Graphics3D objects, then Show the resulting Graphics3D objects.
It would be nice to be able to directly combine SurfaceGraphics objects,
but the whole idea of such an object is that if it can be assumed to be a
graph of a SINGLE function of two variables, then the hidden line
algorithms sued in displaying it are much simplified. Try the following:
plot1=Plot3D[Sin[x y],{x,-Pi,Pi},{y,-Pi,Pi}]
plot2=Plot3D[(x^2-y^2)/9,{x,-Pi,Pi},{y,-Pi,Pi}]
plot1=Graphics3D[plot1]  (* Converts to Graphics3D object *)
plot2=Graphics3D[plot2]
Show[{plot1,plot2}]
	Alternatively, I wrote a widget to do this called MultiPlot3D. It
is in a package called "Student.m", which I will append to this letter.
It is also available for anonymous ftp from otter.stanford.edu in the
/ftp/mma directory.

					- Robert Campbell -
					Math Dept, UC Berkeley

BeginPackage["Student`"]

(* Copyright 1990 Robert Campbell *)

Bezier::usage = "Bezier[{{x0,y0},...,{x3,y3}}]
computes the cubic bezier curve with control points
{xi,yi}, prints out its parametric description, and
then draws the curve and its control polygon, and
returns the parametric description.
Bezier[{{x0,y0},...},nodraw] returns a list of the two
components of the parametric description."

Midpoint::usage = "Midpoint[f,{x,xmin,xmax},n] will compute the numeric
integral of the function f(x) on the interval [xmin,xmax],
using the midpoint method with n divisions. The numeric
result and the error, or difference from the system command
NIntegrate, will be printed and the result returned will
be a graph of the	process. Midpoint[f,{x,xmin,xmax},n,nodraw]
prints the error and returns the numeric result without graphing it."
	
MultiPlot3D::usage = "MultiPlot3D[{f1,...},{x_,x0_,x1_},{y_,y0_,y1_}]
extends the function Plot3D by allowing the user to plot 
several functions of two variables on the same set of axes. 
The result is a Graphics3D object, not a SurfaceGraphics object.
The function can use the same options as Plot3D (Not entirely true at
present 14 Feb, 1990). THIS IS A VERY SLOW AND EXPENSIVE PROGRAM."

	
Newton::usage = "Newton[f,{x,xstart},n] will use n steps
of Newton's method to try to compute a root of f(x),
starting at the point x=xstart and will return a graph of
the process. Newton[f,{x,xstart},n,nodraw] will print the
result at each step of the process, and will return a list
of the values."

Polyapprox::usage = "Polyapprox[f,x,{x0,...,xn}]
will compute the polynomial of degree (n-1) which interpolates
f(x) at the points {x0,...}. It will print this polynomial
and then graph it on the same plot with f along with f."

Trapezoid::usage = "Trapezoid[f,{x,xmin,xmax},n] will
compute the numeric integral of f(x) on the interval
[xmin,xmax], using the trapezoid method with n divisions.
The numeric result and the error, or difference from the
system command NIntegrate, will be printed and a
graph will be returned. Trapezoid[f,{x,xmin,xmax},n,nodraw]
prints the error and returns the numeric result without graphing it."

nodraw;

Begin["`Private`"]

Bezier[{{x0_,y0_},{x1_,y1_},{x2_,y2_},{x3_,y3_}}]:=
(* Compute and display the cubic Bzier curve with the specified control pts.*)
Block[{xcoord,ycoord,plot,points,poly,paramname,t},
	(* Define the x and y coordinates of the point on the curve 
	with parameter un. Generate a new name, of the form un, for the 
	parametric variable used in Bezier. *)
	paramname = Unique["u"];
	xcoord=x0*(1-paramname)^3 + 3*x1*paramname*(1-paramname)^2 \
		+ 3*x2*paramname^2*(1-paramname) + x3*paramname^3;
	ycoord=y0*(1-paramname)^3 + 3*y1*paramname*(1-paramname)^2 \
		+ 3*y2*paramname^2*(1-paramname) + y3*paramname^3;
	Print["The Bzier curve is:"];
	Print["x(",paramname,") = ",xcoord];
	Print["y(",paramname,") = ",ycoord];
	(* recompute the curve using an internal variable parameter *)
	xcoord=x0*(1-t)^3 + 3*x1*t*(1-t)^2 + 3*x2*t^2*(1-t) + x3*t^3;
	ycoord=y0*(1-t)^3 + 3*y1*t*(1-t)^2 + 3*y2*t^2*(1-t) + y3*t^3;
	(* Now draw the curve invisibly *)
	plot=ParametricPlot[{xcoord,ycoord},{t,0,1},DisplayFunction->Identity];
	(* Prepare to draw the control points *)
	points={Point[{x0,y0}],Point[{x1,y1}],Point[{x2,y2}],Point[{x3,y3}]};
	(* Connect the control points to get the control polygon. *)
	poly=Line[{{x0,y0},{x1,y1},{x2,y2},{x3,y3}}];
	(* combine the graph with the control points, and display them. *)
	Show[Graphics[{PointSize[0.02],points,poly}],plot,\
		DisplayFunction->$DisplayFunction]
]

Bezier[{{x0_,y0_},{x1_,y1_},{x2_,y2_},{x3_,y3_}},nodraw]:=
(* Compute the cubic Bzier curve with the specified 
control pts and return it as a parametric curve in "un".*)
Block[{xcoord,ycoord,paramname},
	(* Generate a new name, of the form un, for the parametric 
	variable used in Bezier. *)
	paramname = Unique["u"];
	xcoord=x0*(1-paramname)^3 + 3*x1*paramname*(1-paramname)^2 \
		+ 3*x2*paramname^2*(1-paramname) + x3*paramname^3;
	ycoord=y0*(1-paramname)^3 + 3*y1*paramname*(1-paramname)^2 \
		+ 3*y2*paramname^2*(1-paramname) + y3*paramname^3;
	{xcoord,ycoord}
]	

Midpoint[f_,{x_,xmin_,xmax_},n_]:=
(* This routine will compute the numeric integral of the
function f(x) on the interval [xmin,xmax], using the 
midpoint method with n divisions. The numeric result and
the error, or difference from the system NIntegrate, will
be printed and the result returned will be a graph of the
process.*)
Block[{mp,error,i,j,rectlist,linelist,val,step,plot}, 
	mp=0;
	step=(xmax-xmin)/n;
	For[i=0,i<n,i++,
		val[i]=f/. x-> xmin+(i+0.5) step;
		mp=mp+val[i] step;
	];
	rectlist=Table[Rectangle[{xmin+j*step,0},{xmin+(j+1) step,val[j]}]\
		,{j,0,n-1}];
	linelist=Table[Line[{{xmin+j*step,0},{xmin+j*step,val[j]},\
		{xmin+(j+1) step,val[j]},{xmin+(j+1) step,0}}],{j,0,n-1}];
	rectlist=Prepend[rectlist,GrayLevel[0.6]];
	linelist=Prepend[linelist,GrayLevel[0]];
	plot=Plot[f,{x,xmin,xmax},DisplayFunction->Identity];
	error=Abs[N[mp-NIntegrate[f,{x,xmin,xmax}]]];
	Print["The integral is approximately ",N[mp]];
	Print["error=",error];
	Show[Graphics[Join[rectlist,linelist]],plot,\
		DisplayFunction->$DisplayFunction]
]

Midpoint[f_,{x_,xmin_,xmax_},n_,nodraw]:=
(* This routine will compute the numeric integral of the
function f(x) on the interval [xmin,xmax], using the 
midpoint method with n divisions. The error, or 
difference from the system NIntegrate, will be printed 
and the result returned will be the numeric result. *)
Block[{mp,error,i,j,rectlist,val,step}, 
	mp=0;
	step=(xmax-xmin)/n;
	For[i=0,i<n,i++,
		val[i]=f/. x-> xmin+(i+0.5) step;
		mp=mp+val[i] step;
	];
	error=Abs[N[mp-NIntegrate[f,{x,xmin,xmax}]]];
	Print["error=",error];
	N[mp]
]

MultiPlot3D[fcns_List,{x_,x0_,x1_},{y_,y0_,y1_},opts___]:=
(* This routine extends the function Plot3D by allowing the
user to plot several functions of two variables on the same
set of axes. The result is a Graphics3D object, not a 
SurfaceGraphics object. At present those options which are
valid for Graphics3D, as well as the Mesh option, are not
properly passed or acted on *)
Block[{plotopts,showopts,plotoptstest},
	(* Strip out those options which are unique to Plot3D, as
	opposed to those options understood by Graphics3D *)
	plotoptstest=(MatchQ[#,PlotPoints->_] || 
		MatchQ[#,ClipFill->_] || MatchQ[#,HiddenSurface->_] ||
		MatchQ[#,Mesh->_] || MatchQ[#,MeshStyle->_])&;
	plotopts=Cases[{opts},_?plotoptstest];
	showopts=Cases[{opts},_?(Not[plotoptstest[#]]&)];
	Show[Map[Graphics3D,Map[Plot3D[#,{x,x0,x1},{y,y0,y1},plotopts,\
		DisplayFunction->Identity]&,fcns]],showopts,\
		DisplayFunction->$DisplayFunction]
]
	
Newton[f_,{x_,xstart_},n_,nodraw]:=
(* This routine will use Newton's method to solve the equation f(x)=0 for x.
The initial guess, xstart, is supplied by the user, as is the desired number
of iterations, n. At each step the routine prints out the new estimate, xi, the
value of the function at xi, and the amount the new estimate differs from the
previous estimate. *)
Block[{fprime,xi,xiold,xlist},
	xlist = {xstart};	
	fprime:=D[f,x];
	xi=xstart;                (* We start out with our first guess *)
	For[i=1,i<n,i++,
		xiold=xi;                (* Keep track of our last guess *)
		(* Use Newton's Method to find a better guess. 
		We keep track of 60 digits internally. *)
		xi=xi-N[((f/fprime)/.x->xi),60]; 
		AppendTo[xlist,xi];   (* And add it to our list of guesses *)
		Print[i];
		Print["xi=",N[xi,10]];         (* Print guess to 10 digits *)
		Print["f(xi)=",N[(f /. x->xi),10]];(* Print function value *)
		Print["xi-x(i-1)=",N[xi-xiold,10]];(* Change in guess *)
		(* Print out the relevant information *)
	];
	N[xlist,10]                   (* Return 10 digits as a final value *)
]

Newton[f_,{x_,xstart_},n_]:=
(* This routine will use Newton's method to solve the equation f(x)=0 for x.
The initial guess, xstart, is supplied by the user, as is the desired number
of iterations, n. The output is a graph which shows a plot of the function f,
each successive estimate, xi, and the value of f at xi. The plot also draws
the tangent line to f at {xi,f(xi)} which is used to get the next estimate. *)
Block[{fprime,xi,xiold,i,pointlist,linelist,xmin,xmax,plot},
	(* Keep track of max and min x to get the plot bounds *)
	xmin = xstart;
	xmax = xstart;
	fprime := D[f,x];
	xi = N[xstart];
	(* Put in the initial elements of the graphics lists *)
	pointlist={Point[N[{xstart,f/.x->xstart}]]};
	linelist={};
	For[i=1,i<=n,i++,
		xiold = xi;             (* Save the old value of xi *)
		xi = xi-((f/fprime)/.x->xi); 
		(* Use Newton's Method to find a better guess *)
		(* Draw the line and the new point *)
		pointlist=Append[pointlist,Point[{xi,f/.x->xi}]];
		linelist=Append[linelist,Line[{{xiold,f/.x->xiold},{xi,0}}]];
		(* Keep track of max and min x to get the plot bounds *)
		If[xi<xmin,xmin=xi,];
		If[xi>xmax,xmax=xi,];
	];
	(* First we plot the graph invisibly, adding some space on each end *)
	plot=Plot[f,{x,xmin-0.2(xmax-xmin),xmax+0.2(xmax-xmin)},\
		DisplayFunction->Identity];
	(* Then we plot all the desired information *)
	Show[Graphics[Join[{PointSize[0.02]},pointlist,linelist]],plot\
		,DisplayFunction->$DisplayFunction]
]

Polyapprox[f_,x_,p_]:=
(* This function will find the polynomial of least degree which
passes through the points {x0,f(x0)},{x1,f(x1},... It will print
this polynomial and then plot the polynomial on the same graph 
with f(x). Actually, the command Fit can be used to do the same thing.*)
Block[{i,soln,pts,points,a,plot},
	pts=Table[{p[[i]],f/.x->p[[i]]},{i,Length[p]}];
	poly=Fit[pts,Table[x^i,{i,0,Length[p]-1}],x];
	points=Table[Point[{p[[i]],poly/.x->p[[i]]}],{i,1,Length[p]}];
	plot=Plot[{f,poly},{x,Min[p]-1,Max[p]+1},DisplayFunction->Identity];
	Show[Graphics[{PointSize[0.02],points}],plot,\
		DisplayFunction->$DisplayFunction];
	poly
	]
	
Trapezoid[f_,{x_,xmin_,xmax_},n_]:=
(* This routine will compute the numeric integral of the
function f(x) on the interval [xmin,xmax], using the 
trapezoid method with n divisions. The numeric result and
the error, or difference from the system NIntegrate, will
be printed and the result returned will be a graph of the
process.*)
Block[{trap,error,i,j,rectlist,linelist,val,step,plot},
Array[val,n,0];
	mp=0;
	step=(xmax-xmin)/n;
	val[0]=f/. x->xmin;
	For[j=0,j<n,j++,
		val[j+1]=f/. x-> xmin+(j+1)*step];
		j=.;
	trap=Sum[(val[i]+val[i+1])*step/2,{i,0,n-1}];
	rectlist=Table[Polygon[{{xmin+j*step,0},{xmin+j*step,val[j]}\
		,{xmin+(j+1) step,val[j+1]},{xmin+(j+1) step,0}}],{j,0,n-1}];
	linelist=Table[Line[{{xmin+j*step,0},{xmin+j*step,val[j]},\
		{xmin+(j+1) step,val[j+1]},{xmin+(j+1) step,0}}],{j,0,n-1}];
	rectlist=Prepend[rectlist,GrayLevel[0.6]];
	linelist=Prepend[linelist,GrayLevel[0]];
	plot=Plot[f,{x,xmin,xmax},DisplayFunction->Identity];
	error=Abs[N[trap-NIntegrate[f,{x,xmin,xmax}]]];
	Print["The integral is approximately ",N[trap]];
	Print["error=",error];
	N[trap];
	Show[Graphics[Join[rectlist,linelist]],plot,\
		DisplayFunction->$DisplayFunction]
]

Trapezoid[f_,{x_,xmin_,xmax_},n_,nodraw]:=
(* This routine will compute the numeric integral of the
function f(x) on the interval [xmin,xmax], using the 
trapezoid method with n divisions. The error, or 
difference from the system NIntegrate, will be printed 
and the result returned will be the numeric result. *)
Block[{trap,error,j,val,step},
Array[val,n,0];
	mp=0;
	step=(xmax-xmin)/n;
	val[0]=f/. x->xmin;
	For[j=0,j<n,j++,
		val[j+1]=f/. x-> xmin+(j+1)*step];
		j=.;
	trap=Sum[(val[i]+val[i+1])*step/2,{i,0,n-1}];
	error=Abs[N[trap-NIntegrate[f,{x,xmin,xmax}]]];
	Print["error=",error];
	N[trap]
]

End[]
EndPackage[]


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Mar 13 16:08:13 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA24728; Tue, 13 Mar 90 16:08:11 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA00250; Tue, 13 Mar 90 16:08:08 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA11506; Tue, 13 Mar 90 16:08:07 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA24641; Tue, 13 Mar 90 13:57:07 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA24637; Tue, 13 Mar 90 13:57:05 -0600
Message-Id: <9003131957.AA24637@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Speeding up Mathematica
Date: Tue, 13 Mar 90 03:26:30 -0500
From: ksuzuki@caen.engin.umich.edu
Status: RO

I am now playing with Mathematica, adding up several numerical algorithms.
Capability of matrix and vector form and a lot of built-in functions makes
codes so simple, compared to C and FORTRAN, its symbolic manupulating capa-
bility enables what traditional languages could not do. (e.g. analytical
differentiation when doing Newton Rapson algorithm) Also its capability of
graphics makes results so easy to visualize. It is really epoch making
software in the field of numerical analysis, needless to say, in the field
of analytical mathematics.

Its biggest drawback I felt, however, is its speed compared to compilable
language like C or FORTRAN. I wonder if Wolfram Research is going to develop
compiler of Mathematica. With compiler, Mathematica really can replace tradi-
tional computer languages, but not now.

Does anybody has infomation about compiler on Mathematica? Or any way to
speeding up? Any comments?

----------------------------------------------------------------------------
Katsu Suzuki
  University of Michigan, Ann Arbor


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Mar 13 17:14:48 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA24793; Tue, 13 Mar 90 17:14:46 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA01404; Tue, 13 Mar 90 17:14:44 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA13534; Tue, 13 Mar 90 17:14:42 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA24647; Tue, 13 Mar 90 13:58:17 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA24643; Tue, 13 Mar 90 13:58:15 -0600
Message-Id: <9003131958.AA24643@yoda.ncsa.uiuc.edu>
Date: Tue, 13 Mar 90 12:46:20 EST
From: rsarava@splash.Princeton.EDU (R Saravanan)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: supressing argument evaluation by function Part
Status: RO


I have been trying to define a formula using the variable "lamsq", which is
a list to be defined later. When I give the following input lines to
Mathematica- 

  lhs = { { -(k^2 + lamsq[[n]]), lamsq[[n]] },
          { lamsq[[n]], -(k^2 + lamsq[[n]]) } }
         
  rhs = { { -(k^2 + lamsq[[n]]) u1[[n]], lamsq[[n]] u1[[n]] },
          { lamsq[[n]] u2[[n]], -(k^2 + lamsq[[n]]) u2[[n]] } }
         
  cmatrix[k_,n_] = Inverse[lhs] . rhs

I get the following error messages-

Part::selectform: 
   Part specification n is neither an integer nor a list of
     nonzero integers.
Part::selectform: 
   Part specification n is neither an integer nor a list of
     nonzero integers.
Part::selectform: 
   Part specification n is neither an integer nor a list of
     nonzero integers.
General::stop: 
   Further output of Part::selectform
     will be suppressed during this calculation.

Although the end result (i.e. "cmatrix") turns out to be what I want, I would 
like to avoid these error messages. Basically, I would like to prevent the
function "Part" from evaluating the argument "n". One way out may be
to define "lamsq" to be a function, rather than a list. But in my problem,
"lamsq" actually happens to be a list of 33 numbers, and I would like
to avoid defining auxiliary functions, unless I really have to. Does
anybody have any comments/suggestions?

Saravanan     <rsarava@splash.princeton.edu>


From 76446.564@compuserve.com Tue Mar 13 22:01:17 1990
Received: from saqqara.cis.ohio-state.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA24981; Tue, 13 Mar 90 22:01:12 -0600
Received: by saqqara.cis.ohio-state.edu (5.61-kk/5.900309)
	id AA13606; Tue, 13 Mar 90 23:01:04 -0500
Date: 13 Mar 90 22:06:58 EST
From: James Spottiswoode <76446.564@compuserve.com>
To: mathematica <mathgroup@yoda.ncsa.uiuc.edu>
Subject: Re Speeding Computations
Message-Id: <"900314030657 76446.564 EHA50-1"@CompuServe.COM>
Status: RO

In reply to K. Suzuki,

Mathematica is indeed a wonderfully rich and powerful language.
But I doubt that it will ever have the speed of a lower level
language like Fortran 77, even if a compiled version were produced.  
I am new to the language,but I have found a couple of things which speed
up numerical analysis:

Avoid extracting elements of a list below the top level.  Transpose
or Flatten to get the required elements to the 'top' level.

Substitute dot products for summing operations where possible, e.g.
x = Table[i,{i,100}];
y = x;
Sum[x[[i]] y[[i]],{i,100}]//Timing
{0.7 Second, 338350}
x.y //Timing
{0.1 Second, 338350}

Has anyone any other advice for speeding the thing up, except faster
hardware???



From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Mar 14 00:34:43 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA25790; Wed, 14 Mar 90 00:34:41 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA08204; Wed, 14 Mar 90 00:34:38 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA22030; Wed, 14 Mar 90 00:34:36 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA24998; Tue, 13 Mar 90 22:04:02 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA24994; Tue, 13 Mar 90 22:04:00 -0600
Message-Id: <9003140404.AA24994@yoda.ncsa.uiuc.edu>
Date: 13 Mar 90 22:06:58 EST
From: James Spottiswoode <76446.564@compuserve.com>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Speeding Computations
Status: RO

In reply to K. Suzuki,

Mathematica is indeed a wonderfully rich and powerful language.
But I doubt that it will ever have the speed of a lower level
language like Fortran 77, even if a compiled version were produced.  
I am new to the language,but I have found a couple of things which speed
up numerical analysis:

Avoid extracting elements of a list below the top level.  Transpose
or Flatten to get the required elements to the 'top' level.

Substitute dot products for summing operations where possible, e.g.
x = Table[i,{i,100}];
y = x;
Sum[x[[i]] y[[i]],{i,100}]//Timing
{0.7 Second, 338350}
x.y //Timing
{0.1 Second, 338350}

Has anyone any other advice for speeding the thing up, except faster
hardware???


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Mar 14 11:21:29 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA26041; Wed, 14 Mar 90 11:21:28 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA17156; Wed, 14 Mar 90 11:20:32 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA20812; Wed, 14 Mar 90 11:20:30 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA25938; Wed, 14 Mar 90 09:46:07 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA25934; Wed, 14 Mar 90 09:46:05 -0600
Message-Id: <9003141546.AA25934@yoda.ncsa.uiuc.edu>
Date: Wed, 14 Mar 90 09:44:38 EST
From: Jim_Wendel@ub.cc.umich.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Speeding Computations
Status: RO

Apply[Plus,x[[i]]y[[i]],{i,100}] should be faster than Sum, but maybe not
as fast as dot-product.  I'll test it.

Jim Wendel


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Mar 14 12:14:09 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA26115; Wed, 14 Mar 90 12:14:07 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA17937; Wed, 14 Mar 90 12:13:13 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA22067; Wed, 14 Mar 90 12:13:11 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA25933; Wed, 14 Mar 90 09:45:57 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA25929; Wed, 14 Mar 90 09:45:55 -0600
Message-Id: <9003141545.AA25929@yoda.ncsa.uiuc.edu>
Date: Wed, 14 Mar 90 09:40:28 EST
From: Jim_Wendel@ub.cc.umich.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Speeding up Mathematica
Status: RO

I heard just yesterday that a compiler is under development.  No idea how far
along they are.  But since you can reformulate Mathematica notebooks in Fortran
or in C it's not that bad.

Jim Wendel

From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Mar 14 13:13:57 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA26253; Wed, 14 Mar 90 13:13:55 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA18819; Wed, 14 Mar 90 13:12:57 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA23335; Wed, 14 Mar 90 13:12:55 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA25960; Wed, 14 Mar 90 10:15:01 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA25956; Wed, 14 Mar 90 10:14:59 -0600
Message-Id: <9003141614.AA25956@yoda.ncsa.uiuc.edu>
Date: Wed, 14 Mar 90 09:57:41 -0600
From: Steve Christensen <stevec@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mailing list
Status: RO


Greetings, Mathematica mailing listers:

As you no doubt have noticed, the mailing list volume has started to
grow.  I am approaching 500 sites on the list and am beginning to
get requests from people connected via Compuserve, and Bitnet
people from places outside the US like Brazil, Japan, Taiwan, Austria,
Norway, Germany, Italy and others.  I think a critical mass of
people who want to participate actively may have been reached.
I am also pleased to say that Wolfram Research people are taking
an active part in answering questions that come up.

I am beginning to get questions about local Mathematica User
Groups.  If you have started one or want to, send me details
and I will try to coordinate with those folks in WRI who are
interested in supporting these efforts.  

As always, we want to archive any public domain Mathematica 
software you produce, so please send that my way.

Keep those email messages coming.

Steve Christensen
NCSA, Illinois




From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Mar 14 14:17:56 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA26494; Wed, 14 Mar 90 14:17:55 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA00922; Wed, 14 Mar 90 14:17:01 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA01103; Wed, 14 Mar 90 14:16:50 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA25989; Wed, 14 Mar 90 10:40:06 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA25985; Wed, 14 Mar 90 10:40:04 -0600
Message-Id: <9003141640.AA25985@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: More on speeding things up
Date: Wed, 14 Mar 90 08:33:19 PST
From: jacobson@cello.hpl.hp.com
Status: RO

Suppose foo is a list.  
If possible avoid 
	Do[ ... foo[[i]] ..., {i,1,Length[foo]}]
Instead use
	Scan[(... # ....)&,foo]
which we be much faster.  If you need to know the index you are at for
any reason, initialize a counter to 0 and increment it at the
beginning of the function in Scan.

On big arrays subscripting is VERY slow, and the reason is that 
foo[[i]] is really Part[foo,i] and Part[] evaluates it arguments.
So at every access it looks over the *entire* array for something that
might expand to something else.  You can avoid this by making the list
be something that won't evaluate.  I've speeding things up by orders
of magnitude (yes) with the following trick:

First execute

	SetAttributes[HoldList,HoldAll]

Suppose some code that I'll abbreviate xxxxxxx generates foo.  
Instead of writing 
	foo = xxxxxxxx
I write 
	foo = Apply[HoldList,xxxxxxxxx]

Now when I write foo[[i]], the Part function tries to evalute foo, but
since it has the HoldAll attributed, it goes no farther.  Most list
manipulating functions will work on these homemade HoldList objects.
But be careful with /. and Map because the subitituions/transformations 
will be made but not evaluated.

I've reported this idea to WRI's support people.  I'd like to see them
make it official and fix the few places that requrire real List
objects to accept HoldList objects as well.  

  -- David Jacobson


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Mar 14 13:51:43 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA26440; Wed, 14 Mar 90 13:51:42 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA00233; Wed, 14 Mar 90 13:49:57 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from uxc.cso.uiuc.edu by newton.ncsa.uiuc.edu (4.0/NCSA-1.2)
	id AA00182; Wed, 14 Mar 90 13:49:40 CST
Received: from yoda.ncsa.uiuc.edu by uxc.cso.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02651; Wed, 14 Mar 90 13:49:34 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA25979; Wed, 14 Mar 90 10:36:56 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA25975; Wed, 14 Mar 90 10:36:54 -0600
Message-Id: <9003141636.AA25975@yoda.ncsa.uiuc.edu>
Date: Wed, 14 Mar 90 10:21:49 CST
From: paul%wri@yoda.ncsa.uiuc.edu (Paul Abbott)
Subject: Re:  Speeding up Mathematica
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Stephen Wolfram has done quite a bit of work on a function compiler for
Mathematica which he hopes to make available for the next release.

Also, you remark that you find Mathematica slow compared to Fortran
and C.  This remark has to be taken into context because the algebraic
and diverse programming styles available in Mathematica mean that there
are several ways of attacking a problem and these may be comparable or
in many cases even faster than straight procedural programming.

Paul Abbott 
Wolfram Research

[I can fully support Paul's comments here.  I tried for several
years to write some pattern matchers in C to do some of my
quantum field theory calculations.  I was able to do the
same work in Mathematica in a few weeks and with more power.
True, the compiled C code ran a bit faster at first, but considering
development time, Mathematica won easily.  I have also found
it to be a lot of fun to find tricky ways to optimize Mathematica
code using lower level Mathematica functions.  Conversations with
Paul and others at WRI convince me that there are lots of nice
techniques one can try. - SMC]


From stevec Wed Mar 14 20:56:50 1990
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA26918; Wed, 14 Mar 90 20:56:49 -0600
Date: Wed, 14 Mar 90 20:56:49 -0600
From: Steve Christensen <stevec@yoda.ncsa.uiuc.edu>
Message-Id: <9003150256.AA26918@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Re: Speeding up Mathematica
Status: RO


I believe that my comments on "tricky ways to optimize" Mathematica
were misinterpreted.  Most of the code that I and my colleagues
write is very straightforward high level Mathematica programming -
not nearly as sophisticated as in Roman's book most of the time.
After we write prototype code to do some function, we may or may
not hack on it to make it faster or more powerful.  I think that
it is the sign of a good system that permits a user to get to
the depths a bit and make things work better.  This is true
in any computer language.  If you have ever tried to write
good vectorized FORTRAN code, you know what I mean.  It is my
feeling that Maeder's book is a wonderful resource for those
Mathematica users who want to go the extra mile to get really
powerful and elegant programs running.

If Mathematica is judged by the number of "gotchas" it has, then
I would hate to have to describe most of theoretical physics or
mathematics which at first sight seem to be nothing but "gotchas".

Steve Christensen

From malcolm@apple.com Wed Mar 14 20:01:18 1990
Received: from apple.com by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA26887; Wed, 14 Mar 90 20:01:16 -0600
Received: by apple.com with SMTP (5.61/25-eef)
	id AA28856; Wed, 14 Mar 90 18:00:11 -0800
	for mathgroup@yoda.ncsa.uiuc.edu
Message-Id: <9003150200.AA28856@apple.com>
To: paul@wri.UUCP (Paul Abbott)
Cc: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Speeding up Mathematica 
In-Reply-To: Your message of Wed, 14 Mar 90 10:21:49 -0600.
             <9003141636.AA25975@yoda.ncsa.uiuc.edu> 
Date: Wed, 14 Mar 90 18:00:09 -0800
From: malcolm@apple.com
Status: RO

I guess these are Steve's Christianson's comments....
	I have also found
	it to be a lot of fun to find tricky ways to optimize Mathematica
	code using lower level Mathematica functions.  Conversations with
	Paul and others at WRI convince me that there are lots of nice
	techniques one can try. - SMC]
OK...that's the last straw.

I read Roman Maeder's book on Mathematica programming and found it to 
remind me of all the reasons I *don't* like Mathematica.  It is a really
well written book, don't get me wrong, but why should it be necessary?

I don't consider a system to be good when you need to know lots of really 
minor details about syntax and when things get evaluated.  Consider this 
little excerpt from the first page (67) I opened to:
	An expression with head Sequence is very elusive.  You cannot
	even look at it with FullForm[].
The book is just filled with "tricky" things like this.  I realize that 
there are good reasons for each of these little gotchas.  But on the whole 
I think Mathematica has way too many of them.  Other languages (Lisp, C,
Prolog) don't seem to have this problem.  I think this (and the cost) are
the biggest weak points for Mathematica.

I'm still a heavy Mathematica notebook user.  These statements aren't any
sort of Apple policy.  I'm just wondering aloud.

								Malcolm

From crm@summanulla.nbsr.duke.edu Wed Mar 14 14:30:41 1990
Received: from duke.cs.duke.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA26518; Wed, 14 Mar 90 14:30:39 -0600
Received: from nbsr.nbsr.duke.edu by duke.cs.duke.edu (5.59/DUKE/08-19-88)
	id AA08260; Wed, 14 Mar 90 15:29:38 EST
Received: from summanulla.nbsr.duke.edu by nbsr.duke.edu (4.1/SMI-4.0)
	id AA29327; Wed, 14 Mar 90 15:28:36 EST
Received: by summanulla.nbsr.duke.edu (4.1/SMI-4.0)
	id AA20520; Wed, 14 Mar 90 15:28:39 EST
Date: Wed, 14 Mar 90 15:28:39 EST
From: crm@summanulla.nbsr.duke.edu (Charles R. Martin)
Message-Id: <9003142028.AA20520@summanulla.nbsr.duke.edu>
To: paul@wri.UUCP
Cc: mathgroup@yoda.ncsa.uiuc.edu
In-Reply-To: <9003141636.AA25975@yoda.ncsa.uiuc.edu> "wri!paul@yoda.ncsa.uiuc.edu"
Subject:  Speeding up Mathematica
Status: RO

Paul, Steve --

I've been following the discussion of compiled functions vs. Mathematica
with great interest.  Some of you may recall I asked related questions
several months ago; here's what I've found out:

(1) It is surprisingly easy to get Mathematica to take a function worked
    out in Mathematica and then generate C.   You all knew that.

(2) Using a sed script or the like, the generated code can be munged into 
    a C program that can run on the end of a pipe; this program can then
    be used to generate values that Mathematica can use.

(3) The net gain in speed by doing this is about a factor of 50,
    INCLUDING COMPILATION AND LINK TIME.

(This is all stuff that was done by Vick Khera here at Duke.  He's
supposed to be writing a paper on it, but I haven't seen it yet.)

Now, I understand these codes to be heavily numerical, so this speedup
can't be applied to the pattern-matching problem Steve mentions.  That
factor of fifty, though, makes me suspicious that the gains to be gotten
by fancy Mathematica optimizations are never going to give the gains
that can be had by running the function in compiled code.  Worse,
running things at the end of a pipe is not available on all systems
(e.g., the 386, at least with version 1.2) so this technique can't be
directly applied.

There are a number of applications that I would be interested in, mostly
in biological modelling, that this kind of speedup would make all the
difference between a usuable interactive program (a few minutes to an
hour) and imitation batch mode (many hours or overnight.)  A Mathematica
compiler might mean a gain, but what I'd *really* like to see is some
way of building C codes that fit some calling convention, and that can
be linked with or dynamically loaded into Mathematica.  Then I could
build fast numerical methods from known algorithms, optimize them for
greater speed, and call them from Mathematica as primitives.  While
there ae a lot of nice techniques for optimizing Mathematica functions,
most of my users aren't interested in learning the joys of Mathematica
hacking; they want to know what that organelle/cell/chunk of myocardium
is doing.

Being able to call a Crank-Nicholson solver that was *fast* might make a
lot of problems a lot easier for the users I might recommend Mathematica
to.   (Gack what a horrible sentence.)

Charlie Martin (...!mcnc!duke!crm, crm@summanulla.mc.duke.edu)
NBSR/Box 3709/Duke University Medical Center/Durham, NC 27710


P.S.  Let me know about Mathematica users groups.

From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Mar 14 22:53:16 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA27086; Wed, 14 Mar 90 22:53:15 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA08070; Wed, 14 Mar 90 22:52:20 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA12268; Wed, 14 Mar 90 22:52:09 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA26981; Wed, 14 Mar 90 21:21:17 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA26977; Wed, 14 Mar 90 21:21:16 -0600
Message-Id: <9003150321.AA26977@yoda.ncsa.uiuc.edu>
Date: Wed, 14 Mar 90 20:56:49 -0600
From: Steve Christensen <stevec@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Re: Speeding up Mathematica
Status: RO

In reference to Malcolm@apply.com's comments:

I believe that my comments on "tricky ways to optimize" Mathematica
were misinterpreted.  Most of the code that I and my colleagues
write is very straightforward high level Mathematica programming -
not nearly as sophisticated as in Roman's book most of the time.
After we write prototype code to do some function, we may or may
not hack on it to make it faster or more powerful.  I think that
it is the sign of a good system that permits a user to get to
the depths a bit and make things work better.  This is true
in any computer language.  If you have ever tried to write
good vectorized FORTRAN code, you know what I mean.  It is my
feeling that Maeder's book is a wonderful resource for those
Mathematica users who want to go the extra mile to get really
powerful and elegant programs running.

If Mathematica is judged by the number of "gotchas" it has, then
I would hate to have to describe most of theoretical physics or
mathematics which at first sight seem to be nothing but "gotchas".

Steve Christensen


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Mar 15 01:16:05 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA28038; Thu, 15 Mar 90 01:16:04 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA11262; Thu, 15 Mar 90 01:15:05 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA16192; Thu, 15 Mar 90 01:14:54 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA26986; Wed, 14 Mar 90 21:21:24 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA26982; Wed, 14 Mar 90 21:21:23 -0600
Message-Id: <9003150321.AA26982@yoda.ncsa.uiuc.edu>
Date: Wed, 14 Mar 90 15:28:39 EST
From: crm@summanulla.nbsr.duke.edu (Charles R. Martin)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject:  Speeding up Mathematica
Status: RO

Paul, Steve --

I've been following the discussion of compiled functions vs. Mathematica
with great interest.  Some of you may recall I asked related questions
several months ago; here's what I've found out:

(1) It is surprisingly easy to get Mathematica to take a function worked
    out in Mathematica and then generate C.   You all knew that.

(2) Using a sed script or the like, the generated code can be munged into 
    a C program that can run on the end of a pipe; this program can then
    be used to generate values that Mathematica can use.

(3) The net gain in speed by doing this is about a factor of 50,
    INCLUDING COMPILATION AND LINK TIME.

(This is all stuff that was done by Vick Khera here at Duke.  He's
supposed to be writing a paper on it, but I haven't seen it yet.)

Now, I understand these codes to be heavily numerical, so this speedup
can't be applied to the pattern-matching problem Steve mentions.  That
factor of fifty, though, makes me suspicious that the gains to be gotten
by fancy Mathematica optimizations are never going to give the gains
that can be had by running the function in compiled code.  Worse,
running things at the end of a pipe is not available on all systems
(e.g., the 386, at least with version 1.2) so this technique can't be
directly applied.

There are a number of applications that I would be interested in, mostly
in biological modelling, that this kind of speedup would make all the
difference between a usuable interactive program (a few minutes to an
hour) and imitation batch mode (many hours or overnight.)  A Mathematica
compiler might mean a gain, but what I'd *really* like to see is some
way of building C codes that fit some calling convention, and that can
be linked with or dynamically loaded into Mathematica.  Then I could
build fast numerical methods from known algorithms, optimize them for
greater speed, and call them from Mathematica as primitives.  While
there ae a lot of nice techniques for optimizing Mathematica functions,
most of my users aren't interested in learning the joys of Mathematica
hacking; they want to know what that organelle/cell/chunk of myocardium
is doing.

Being able to call a Crank-Nicholson solver that was *fast* might make a
lot of problems a lot easier for the users I might recommend Mathematica
to.   (Gack what a horrible sentence.)

Charlie Martin (...!mcnc!duke!crm, crm@summanulla.mc.duke.edu)
NBSR/Box 3709/Duke University Medical Center/Durham, NC 27710


P.S.  Let me know about Mathematica users groups.


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Mar 15 00:05:52 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA27907; Thu, 15 Mar 90 00:05:51 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA09224; Thu, 15 Mar 90 00:04:41 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA14127; Thu, 15 Mar 90 00:04:28 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA26976; Wed, 14 Mar 90 21:21:10 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA26972; Wed, 14 Mar 90 21:21:09 -0600
Message-Id: <9003150321.AA26972@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Speeding up Mathematica 
Date: Wed, 14 Mar 90 18:00:09 -0800
From: malcolm@apple.com
Status: RO

I guess these are Steve's Christensen's comments....
	I have also found
	it to be a lot of fun to find tricky ways to optimize Mathematica
	code using lower level Mathematica functions.  Conversations with
	Paul and others at WRI convince me that there are lots of nice
	techniques one can try. - SMC]

OK...that's the last straw.

I read Roman Maeder's book on Mathematica programming and found it to 
remind me of all the reasons I *don't* like Mathematica.  It is a really
well written book, don't get me wrong, but why should it be necessary?

I don't consider a system to be good when you need to know lots of really 
minor details about syntax and when things get evaluated.  Consider this 
little excerpt from the first page (67) I opened to:
	An expression with head Sequence is very elusive.  You cannot
	even look at it with FullForm[].
The book is just filled with "tricky" things like this.  I realize that 
there are good reasons for each of these little gotchas.  But on the whole 
I think Mathematica has way too many of them.  Other languages (Lisp, C,
Prolog) don't seem to have this problem.  I think this (and the cost) are
the biggest weak points for Mathematica.

I'm still a heavy Mathematica notebook user.  These statements aren't any
sort of Apple policy.  I'm just wondering aloud.

								Malcolm


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Mar 15 00:12:40 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA27914; Thu, 15 Mar 90 00:12:39 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA10390; Thu, 15 Mar 90 00:11:44 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA14870; Thu, 15 Mar 90 00:11:32 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA26991; Wed, 14 Mar 90 21:21:33 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA26987; Wed, 14 Mar 90 21:21:31 -0600
Message-Id: <9003150321.AA26987@yoda.ncsa.uiuc.edu>
Date: Wed, 14 Mar 90 15:17:25 MST
From: Rod Frehlich <rgf@terra.Colorado.EDU>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Complex I
Status: RO

The strange convention of placing negative signs with the complex number I
produces errors with substitutions. For example, the following program

AppendTo[$Echo, "stdout"] 
(* Error in Rules *)
a = I*x/f-I*x/g+z
a = a /.{x_/f-x_/g -> x/h}
(* Error disappears if I is replaced by a variable *)
b = v*x/f-v*x/g+z
b = b /.{x_/f-x_/g -> x/h}

results in

Mathematica (sun3.68881) 1.2 (November 6, 1989) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
with I. Rivin and D. Withoff
Copyright 1988,1989 Wolfram Research Inc.
 -- Terminal graphics initialized -- 

In[1]:= 
Out[1]= {stdout}

In[2]:= (* Error in Rules *)

In[3]:= a = I*x/f-I*x/g+z

        I x   -I x
Out[3]= --- + ---- + z
         f     g

In[4]:= a = a /.{x_/f-x_/g -> x/h}

        I x   -I x
Out[4]= --- + ---- + z
         f     g

In[5]:= (* Error disappears if I is replaced by a variable *)

In[6]:= b = v*x/f-v*x/g+z

        v x   v x
Out[6]= --- - --- + z
         f     g

In[7]:= b = b /.{x_/f-x_/g -> x/h}

        v x
Out[7]= --- + z
         h

In[8]:= 


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Mar 15 01:37:09 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA28095; Thu, 15 Mar 90 01:37:08 -0600
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA11666; Thu, 15 Mar 90 01:36:15 CST
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA16646; Thu, 15 Mar 90 01:36:04 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA27044; Wed, 14 Mar 90 22:09:42 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA27040; Wed, 14 Mar 90 22:09:40 -0600
Message-Id: <9003150409.AA27040@yoda.ncsa.uiuc.edu>
From: paul@wri.UUCP
Date: Wed, 14 Mar 90 20:23:35 CST
Subject: Re:  Speeding up Mathematica
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

You may not be aware that preliminary documentation for the the
MathLink protocol for Mathematica has been released (Please contact
WRI, via lisa@wri.com for a copy of the documentation).  MathLink will
be included with the next release of Mathematica and, I think, will
supply solutions to many of the problems that people have with linking
Mathematica to running processes, calling Mathematica from C or
Fortran and vice versa, etc ...

Also, one of our users, Elaine Kant from Schlumberger 
(uunet!SLCS.SLB.COM!kant) is doing some of the things that you are
also interested in.


From @wimsey.bc.ca:kenward@mdivax1.UUCP Thu Mar 15 12:43:32 1990
Received: from van-bc.wimsey.bc.ca by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA28553; Thu, 15 Mar 90 12:42:52 -0600
Received: by wimsey.bc.ca (/\=-/\ Smail3.1.17.5 #17.80 sendmail)
	id <m0h8zjt-0001BQC@wimsey.bc.ca>; Thu, 15 Mar 90 10:40 PST
Received: by mdivax1.mdi.eng (5.57/SMI-3.2)
	id AA13597; Thu, 15 Mar 90 08:46:02 PST
Received: by sun05f.mdi.eng (4.0/SMI-4.0)
	id AA10353; Thu, 15 Mar 90 08:46:42 PST
Date: Thu, 15 Mar 90 08:46:42 PST
From: kenward%mdivax1@van-bc.UUCP (Gary Kenward)
Message-Id: <9003151646.AA10353@sun05f.mdi.eng>
To: mathgroup-adm@yoda.ncsa.uiuc.edu
Subject: Mathematica precision
Status: RO

How can I set the precision for a group of calculations:
i.e. how can I set the precison of all my calculations for 
a Mathematica session;  how can I set the precision for
all calculations withing a function definition?

I am sure this is in the text somewhere, but as yet,
I have not been able to determine where.


Thanks,
Gary W. Kenward
Radio Network Systems Engineering
Mobile Data International, Inc.
(a Motorola company)

From @uunet.UU.NET:m1rih00@fed.UUCP Thu Mar 15 11:19:12 1990
Received: from uunet.UU.NET by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA28464; Thu, 15 Mar 90 11:19:09 -0600
Received: from fed.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA28583; Thu, 15 Mar 90 12:17:25 -0500
Received: from arcws9.FRB.GOV by fed.FRB.GOV (4.0/SMI-4.0)
	id AA06366; Thu, 15 Mar 90 11:45:50 EST
Received: from localhost by arcws9.FRB.GOV (4.0/SMI-4.0)
	id AA14868; Thu, 15 Mar 90 11:46:55 EST
Message-Id: <9003151646.AA14868@arcws9.FRB.GOV>
To: mathgroup@yoda.ncsa.uiuc.edu
Cc: m1rih00@arcws9.UUCP
Subject: Mathematica User Group in Econometrics
Date: Thu, 15 Mar 90 11:46:53 -0500
From: Ron I. Herman <m1rih00@fed.UUCP>
Status: RO

Is there any Mathematica User Group primarily devoted
to econometric applications?

Ron Herman
Federal Reserve Board

From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Mar 15 17:26:54 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA28859; Thu, 15 Mar 90 17:26:53 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA06623; Thu, 15 Mar 90 17:22:08 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA28724; Thu, 15 Mar 90 15:38:28 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA28720; Thu, 15 Mar 90 15:38:27 -0600
Message-Id: <9003152138.AA28720@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica User Group in Econometrics
Date: Thu, 15 Mar 90 11:46:53 -0500
From: Ron I. Herman <m1rih00@fed.UUCP>
Status: RO

Is there any Mathematica User Group primarily devoted
to econometric applications?

Ron Herman
Federal Reserve Board


From mcdonald@quark.UMD.EDU Thu Mar 15 16:44:18 1990
Received: from quark.umd.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA28785; Thu, 15 Mar 90 16:44:16 -0600
Received: by quark.UMD.EDU (5.57/Ultrix3.0-C)
	id AA05364; Thu, 15 Mar 90 17:45:20 EST
Date: Thu, 15 Mar 90 17:45:20 EST
From: mcdonald@quark.umd.edu (Bill MacDonald)
Message-Id: <9003152245.AA05364@quark.UMD.EDU>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Problem defining delta function
Status: RO

I began to try to define the delta function, but the first step fails. Why?
  delta/: delta[x_]f_[x_]:=delta[x]f[0]
Then if
   f[x_]=(x-a)^2
and I try
  delta[x]f[x]
Mathematica simply gives back
  (-a + x)^2 delta[x]
What is wrong ?  

From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Mar 15 18:32:43 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA28957; Thu, 15 Mar 90 18:32:42 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA07772; Thu, 15 Mar 90 18:27:57 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA28718; Thu, 15 Mar 90 15:37:44 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA28714; Thu, 15 Mar 90 15:37:43 -0600
Message-Id: <9003152137.AA28714@yoda.ncsa.uiuc.edu>
Date: Thu, 15 Mar 90 08:46:42 PST
From: kenward@mdivax1.UUCP (Gary Kenward)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica precision
Status: RO

How can I set the precision for a group of calculations:
i.e. how can I set the precison of all my calculations for 
a Mathematica session;  how can I set the precision for
all calculations withing a function definition?

I am sure this is in the text somewhere, but as yet,
I have not been able to determine where.


Thanks,
Gary W. Kenward
Radio Network Systems Engineering
Mobile Data International, Inc.
(a Motorola company)


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Mar 15 19:26:05 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA29063; Thu, 15 Mar 90 19:26:04 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA08622; Thu, 15 Mar 90 19:21:20 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA28878; Thu, 15 Mar 90 17:43:25 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA28874; Thu, 15 Mar 90 17:43:23 -0600
Message-Id: <9003152343.AA28874@yoda.ncsa.uiuc.edu>
Date: Thu, 15 Mar 90 17:45:20 EST
From: mcdonald@quark.umd.edu (Bill MacDonald)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Problem defining delta function
Status: RO

I began to try to define the delta function, but the first step fails. Why?
  delta/: delta[x_]f_[x_]:=delta[x]f[0]
Then if
   f[x_]=(x-a)^2
and I try
  delta[x]f[x]
Mathematica simply gives back
  (-a + x)^2 delta[x]
What is wrong ?  


From 76446.564@compuserve.com Tue Mar 13 22:01:17 1990
Received: from saqqara.cis.ohio-state.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA24981; Tue, 13 Mar 90 22:01:12 -0600
Received: by saqqara.cis.ohio-state.edu (5.61-kk/5.900309)
	id AA13606; Tue, 13 Mar 90 23:01:04 -0500
Date: 13 Mar 90 22:06:58 EST
From: James Spottiswoode <76446.564@compuserve.com>
To: mathematica <mathgroup@yoda.ncsa.uiuc.edu>
Subject: Re Speeding Computations
Message-Id: <"900314030657 76446.564 EHA50-1"@CompuServe.COM>
Status: RO

In reply to K. Suzuki,

Mathematica is indeed a wonderfully rich and powerful language.
But I doubt that it will ever have the speed of a lower level
language like Fortran 77, even if a compiled version were produced.  
I am new to the language,but I have found a couple of things which speed
up numerical analysis:

Avoid extracting elements of a list below the top level.  Transpose
or Flatten to get the required elements to the 'top' level.

Substitute dot products for summing operations where possible, e.g.
x = Table[i,{i,100}];
y = x;
Sum[x[[i]] y[[i]],{i,100}]//Timing
{0.7 Second, 338350}
x.y //Timing
{0.1 Second, 338350}

Has anyone any other advice for speeding the thing up, except faster
hardware???



From @uunet.UU.NET:paul@wri.UUCP Fri Mar 16 01:19:29 1990
To: kenward@yoda.ncsa.uiuc.edu
Subject: Re:  Mathematica precision
Cc: mathgroup@uunet.UU.NET
Status: RO

Gary Kenward asks:

> How can I set the precision for a group of calculations:
> i.e. how can I set the precison of all my calculations for 
> a Mathematica session;  how can I set the precision for
> all calculations within a function definition?
> 
> I am sure this is in the text somewhere, but as yet,
> I have not been able to determine where.

There are many ways of doing what you want:

One (global) method would be to set

$Pre = N[#,30]&

which will numerically evaluate all expressions to 30 decimals
from that point onward.

Jerry Keiper from Wolfram Research has recently written up some
tutorial notes on related topics which may be helpful.  These can
be obtained by contacting the marketing department at Wolfram Research
(try lisa@wri.com).

Paul C. Abbott

From mathgroup-adm@yoda.ncsa.uiuc.edu Sun Mar 18 00:18:10 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02891; Sun, 18 Mar 90 00:18:09 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA14825; Sun, 18 Mar 90 00:13:28 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02092; Sat, 17 Mar 90 21:57:43 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02088; Sat, 17 Mar 90 21:57:42 -0600
Date: Fri, 16 Mar 90 01:19:29 -0600
From: Steve Christensen <stevec@yoda.ncsa.uiuc.edu>
Message-Id: <9003180357.AA02088@yoda.ncsa.uiuc.edu>
Subject: Re:  Mathematica precision
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Gary Kenward asks:

> How can I set the precision for a group of calculations:
> i.e. how can I set the precison of all my calculations for 
> a Mathematica session;  how can I set the precision for
> all calculations within a function definition?
> 
> I am sure this is in the text somewhere, but as yet,
> I have not been able to determine where.

There are many ways of doing what you want:

One (global) method would be to set

$Pre = N[#,30]&

which will numerically evaluate all expressions to 30 decimals
from that point onward.

Jerry Keiper from Wolfram Research has recently written up some
tutorial notes on related topics which may be helpful.  These can
be obtained by contacting the marketing department at Wolfram Research
(try lisa@wri.com).

Paul C. Abbott


From jack@sun.acs.udel.edu Fri Mar 16 09:46:54 1990
To: mathgroup@yoda.ncsa.uiuc.edu, mcdonald@quark.umd.edu
Subject: Re:  Problem defining delta function
Status: RO

The following is not exactly the form you had, but gives the result you want.

SetAttributes[delta,HoldAll]
delta/: delta[f_[x_]]:=delta[x]f[0]


Then,

f[x_]:=(x-a)^2
delta[f[x]]


gives
 2
a  delta[x]


From fateman@renoir.Berkeley.EDU Sun Mar 18 14:59:45 1990
Received: from renoir.Berkeley.EDU by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03625; Sun, 18 Mar 90 14:59:43 -0600
Received: by renoir.Berkeley.EDU (5.61/1.29)
	id AA00731; Sun, 18 Mar 90 12:58:50 -0800
Date: Sun, 18 Mar 90 12:58:50 -0800
From: fateman@renoir.Berkeley.EDU (Richard Fateman)
Message-Id: <9003182058.AA00731@renoir.Berkeley.EDU>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  Speeding up Mathematica / numerical precision
Status: RO

The idea of sharing data structures (such as fortran arrays) between
algebraic manipulation programs and Fortran / C stuff was promoted
by Franz Lisp / Vaxima (c. 1979) when we decided to have the same
structures for convenience of "foreign function" calls.  I assumed
that no Lisp compiler would do as good as the best Fortran compiler
in compiling numerical code. Direct links to fortran code (NAG library,
IMSL library, MINPACK) were handled  fairly conveniently.

About using N[ ...,30] around everything... this may not work
because in Mathematica, f[N[...,30]] and N[f[...],30]  are not the same.
  Richard Fateman

From mathgroup-adm@yoda.ncsa.uiuc.edu Sun Mar 18 17:06:41 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03718; Sun, 18 Mar 90 17:06:40 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA00475; Sun, 18 Mar 90 17:01:58 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03641; Sun, 18 Mar 90 15:17:12 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03637; Sun, 18 Mar 90 15:17:11 -0600
Message-Id: <9003182117.AA03637@yoda.ncsa.uiuc.edu>
Date: Sun, 18 Mar 90 12:58:50 -0800
From: fateman@renoir.Berkeley.EDU (Richard Fateman)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  Speeding up Mathematica / numerical precision
Status: RO

The idea of sharing data structures (such as fortran arrays) between
algebraic manipulation programs and Fortran / C stuff was promoted
by Franz Lisp / Vaxima (c. 1979) when we decided to have the same
structures for convenience of "foreign function" calls.  I assumed
that no Lisp compiler would do as good as the best Fortran compiler
in compiling numerical code. Direct links to fortran code (NAG library,
IMSL library, MINPACK) were handled  fairly conveniently.

About using N[ ...,30] around everything... this may not work
because in Mathematica, f[N[...,30]] and N[f[...],30]  are not the same.

  Richard Fateman


From dmaria@gmuvax.gmu.edu Mon Mar 19 12:35:13 1990
Received: from gmuvax.gmu.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA05212; Mon, 19 Mar 90 12:35:11 -0600
Message-Id: <9003191835.AA05212@yoda.ncsa.uiuc.edu>
Date: 19 Mar 90 13:32:00 EDT
From: "MARIA DWORZECKA" <dmaria@gmuvax.gmu.edu>
Subject: Mathematica
To: "stevec" <stevec@yoda.ncsa.uiuc.edu>
Status: RO

Hello,
My name is Maria Dworzecka (DMARIA@GMUVAX.Bitnet). I was told, that you run 
newsletter and some friendly help for new users of Mathematica. Please, add
 my name to your mailing list. I surely can use some help.!!!
Regards and Thanks 
Maria


From @uunet.UU.NET:paul@wri.UUCP Thu Mar 22 00:01:56 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA08960; Thu, 22 Mar 90 00:01:55 -0600
Return-Path: <wri!paul@uunet.UU.NET>
Received: from uunet.uu.net by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA14821; Thu, 22 Mar 90 00:01:01 CST
Received: from wri.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA04339; Thu, 22 Mar 90 01:00:24 -0500
Received: by WRI.com (3.2/SMI-3.0DEV3)
	id AA02791; Mon, 19 Mar 90 15:06:47 CST
Date: Mon, 19 Mar 90 15:06:47 CST
From: paul@wri.UUCP (Paul Abbott)
Message-Id: <9003192106.AA02791@WRI.com>
To: fateman@renoir.Berkeley.EDU
Subject: Re:  Speeding up Mathematica / numerical precision
Cc: mathgroup@uunet.UU.NET
Status: RO

Richard Fateman states:

> About using N[ ...,30] around everything... this may not work
> because in Mathematica, f[N[...,30]] and N[f[...],30]  are not the same.

This is correct and reveals a subtle point about the use of N in 
Mathematica.  Jerry Keiper's tutorial notes on this topic (available,
as mentioned previously, directly from Wolfram Research) help to 
clarify this matter further.

			Paul C. Abbott

From @uunet.UU.NET:paul@wri.UUCP Thu Mar 22 00:03:52 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA08966; Thu, 22 Mar 90 00:03:50 -0600
Return-Path: <wri!paul@uunet.UU.NET>
Received: from uunet.uu.net by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA15228; Thu, 22 Mar 90 00:02:57 CST
Received: from wri.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA05544; Thu, 22 Mar 90 01:02:18 -0500
Received: by WRI.com (3.2/SMI-3.0DEV3)
	id AA05909; Mon, 19 Mar 90 18:00:46 CST
Date: Mon, 19 Mar 90 18:00:46 CST
From: paul@wri.UUCP (Paul Abbott)
Message-Id: <9003200000.AA05909@WRI.com>
To: mathgroup@uunet.UU.NET
Subject: Tutorial Notes
Cc: @uunet.UUCP,@uunet.UU.NET, leonard@cosmos.phys.uwm.edu,
        jack@sun.acs.udel.edu
Status: RO

Sorry if I have created any confusion.  The tutorial notes that I
mentioned in previous messages to mathgroup are the same ones that
many of you may have already heard about on sci.math.symbolic.  If you
want to order any of these, please fill out the following (electronic)
form and send it to any of the addresses listed below:

1990 MATHEMATICA CONFERENCE

Order Form for Tutorials and Conference Guide
=============================================

Fill out this form using your editor and return to Wolfram Research.
(See address information below.)


TUTORIALS:
---------

Algebraic Manipulation
Igor Rivin (9 pages)
  Printed $1.70 each                     quantity [  ]
  Macintosh diskette $4.50 each          quantity [  ]

Applications Survey
Paul Abbott (27 pages)
  Printed $2.10 each                     quantity [  ] 
  Macintosh diskette $4.50 each          quantity [  ]

Data Analysis
Dave Withoff (36 pages)                 
  Printed $2.50 each                     quantity [  ]

Developing Mathematical and 
Scientific Software
Sha Xin Wei (12 pages)
  Printed $1.70 each                     quantity [  ]
  Macintosh diskette $4.50               quantity [  ]

Document Preparation 
Joe Grohens, Cameron Smith (6 pages)
  Printed $1.70 each                     quantity [  ] 
  Macintosh diskette $4.50 each          quantity [  ] 

Graphics
Cameron Smith (14 pages)
  Printed $1.70 each                     quantity [  ]
  Macintosh diskette $4.50 each          quantity [  ]

Interfacing to External Programs
(MathLink documentation)
Henry Cejtin, Stephen Wolfram (37 pages)
  Printed $2.50 each                     quantity [  ]

Internals and Algorithms
Igor Rivin (9 pages)
  Printed $1.70 each                     quantity [  ]
  Macintosh diskette $4.50 each

Networking
Rob Brewer, Rory Murtagh (79 pages)
  Mac/TCP Installation Kit: $14.00       quantity [  ]

Numerical Computation
Jerry Keiper (22 pages)
  Printed $2.10 each                     quantity [  ]

Problem Solving with Mathematica
Nancy Blachman (73 pages)
  Printed $4.80 each                     quantity [  ]

Programming in Mathematica
Roman Maeder (44 pages)
(excerpts from his book)
  Printed $2.90 each                     quantity [  ]


OTHER:
------

Conference Guide: $25.00 each            quantity [  ]

Conference T-shirts: $10.00 each 
  Large:                                 quantity [  ]
  Extra Large:                           quantity [  ] 

Conference Buttons: free                 quantity [  ]

Conference Posters: free                 quantity [  ] 


Shipping and handling included for U.S. and Canada.

For overseas shipping, add $2.50: $

Illinois residents add 7.25% sales tax: $

Total Amount: $

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

Name:
Organization:
Street address:
City:
State:	        
Zip:
Country:
Telephone (include area and country codes):
Email address:
Fax:


[ ] Check enclosed, in U.S. dollars, payable to Wolfram Research, Inc.
[ ] Bill my credit card (check one):  [  ] Visa  [  ] MasterCard
    Card number:	
    Expr. date:   
    Name printed:	        
    Date:
    Signature:

Return completed order forms by mail, fax, or electronic mail to:

Wolfram Research, Inc.
P.O. Box 6059, Champaign, IL 61826-6059
info: (217) 398-0700
fax:  (217) 398-0747
email: conf@wri.com, or uunet!wri!conf



From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Mar 22 04:57:05 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09182; Thu, 22 Mar 90 04:57:04 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA21174; Thu, 22 Mar 90 04:52:34 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09038; Thu, 22 Mar 90 01:17:04 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09034; Thu, 22 Mar 90 01:17:03 -0600
Message-Id: <9003220717.AA09034@yoda.ncsa.uiuc.edu>
Date: Mon, 19 Mar 90 18:00:46 CST
From: paul@wri.UUCP (Paul Abbott)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Tutorial Notes
Status: RO

Sorry if I have created any confusion.  The tutorial notes that I
mentioned in previous messages to mathgroup are the same ones that
many of you may have already heard about on sci.math.symbolic.  If you
want to order any of these, please fill out the following (electronic)
form and send it to any of the addresses listed below:

1990 MATHEMATICA CONFERENCE

Order Form for Tutorials and Conference Guide
=============================================

Fill out this form using your editor and return to Wolfram Research.
(See address information below.)


TUTORIALS:
---------

Algebraic Manipulation
Igor Rivin (9 pages)
  Printed $1.70 each                     quantity [  ]
  Macintosh diskette $4.50 each          quantity [  ]

Applications Survey
Paul Abbott (27 pages)
  Printed $2.10 each                     quantity [  ] 
  Macintosh diskette $4.50 each          quantity [  ]

Data Analysis
Dave Withoff (36 pages)                 
  Printed $2.50 each                     quantity [  ]

Developing Mathematical and 
Scientific Software
Sha Xin Wei (12 pages)
  Printed $1.70 each                     quantity [  ]
  Macintosh diskette $4.50               quantity [  ]

Document Preparation 
Joe Grohens, Cameron Smith (6 pages)
  Printed $1.70 each                     quantity [  ] 
  Macintosh diskette $4.50 each          quantity [  ] 

Graphics
Cameron Smith (14 pages)
  Printed $1.70 each                     quantity [  ]
  Macintosh diskette $4.50 each          quantity [  ]

Interfacing to External Programs
(MathLink documentation)
Henry Cejtin, Stephen Wolfram (37 pages)
  Printed $2.50 each                     quantity [  ]

Internals and Algorithms
Igor Rivin (9 pages)
  Printed $1.70 each                     quantity [  ]
  Macintosh diskette $4.50 each

Networking
Rob Brewer, Rory Murtagh (79 pages)
  Mac/TCP Installation Kit: $14.00       quantity [  ]

Numerical Computation
Jerry Keiper (22 pages)
  Printed $2.10 each                     quantity [  ]

Problem Solving with Mathematica
Nancy Blachman (73 pages)
  Printed $4.80 each                     quantity [  ]

Programming in Mathematica
Roman Maeder (44 pages)
(excerpts from his book)
  Printed $2.90 each                     quantity [  ]


OTHER:
------

Conference Guide: $25.00 each            quantity [  ]

Conference T-shirts: $10.00 each 
  Large:                                 quantity [  ]
  Extra Large:                           quantity [  ] 

Conference Buttons: free                 quantity [  ]

Conference Posters: free                 quantity [  ] 


Shipping and handling included for U.S. and Canada.

For overseas shipping, add $2.50: $

Illinois residents add 7.25% sales tax: $

Total Amount: $

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

Name:
Organization:
Street address:
City:
State:	        
Zip:
Country:
Telephone (include area and country codes):
Email address:
Fax:


[ ] Check enclosed, in U.S. dollars, payable to Wolfram Research, Inc.
[ ] Bill my credit card (check one):  [  ] Visa  [  ] MasterCard
    Card number:	
    Expr. date:   
    Name printed:	        
    Date:
    Signature:

Return completed order forms by mail, fax, or electronic mail to:

Wolfram Research, Inc.
P.O. Box 6059, Champaign, IL 61826-6059
info: (217) 398-0700
fax:  (217) 398-0747
email: conf@wri.com, or uunet!wri!conf




From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Mar 22 04:21:40 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09146; Thu, 22 Mar 90 04:21:39 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA20666; Thu, 22 Mar 90 04:17:09 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09032; Thu, 22 Mar 90 01:16:07 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09028; Thu, 22 Mar 90 01:16:06 -0600
Message-Id: <9003220716.AA09028@yoda.ncsa.uiuc.edu>
Date: Mon, 19 Mar 90 15:06:47 CST
From: paul@wri.UUCP (Paul Abbott)
Subject: Re:  Speeding up Mathematica / numerical precision
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Richard Fateman states:

> About using N[ ...,30] around everything... this may not work
> because in Mathematica, f[N[...,30]] and N[f[...],30]  are not the same.

This is correct and reveals a subtle point about the use of N in 
Mathematica.  Jerry Keiper's tutorial notes on this topic (available,
as mentioned previously, directly from Wolfram Research) help to 
clarify this matter further.

			Paul C. Abbott


From jacobson@cello.hpl.hp.com Thu Mar 22 10:22:10 1990
Received: from hplms2.hpl.hp.com by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09341; Thu, 22 Mar 90 10:22:02 -0600
Received: from cello.hpl.hp.com by hplms2.hpl.hp.com with SMTP
	(15.11.1.3/15.5+IOS 3.20) id AA21083; Thu, 22 Mar 90 08:21:14 pst
Received: from localhost by cello.HPL.HP.COM; Thu, 22 Mar 90 08:20:58 pst
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: N
Date: Thu, 22 Mar 90 08:20:47 PST
Message-Id: <20238.638122847@cello>
From: jacobson@cello.hpl.hp.com
Status: RO

There has been discussion recently about using N[...,30] around
everything.  It is been observed by Richard Fateman and confirmed by
Paul Abbott that this may not work because f[N[...,30]] and
N[f[...],30] are not the same.  However there is a much more important
reason why it won't work.  N only reduces the accuracy of its first
argument, it never increases it.  Note the following:

In[1]:= N[1.2,30]

Out[1]= 1.2

In[2]:= Precision[%]

Out[2]= 16

To get N to work right on decimal things I have to rewrite them as
rationals, or use lots of zeros, then apply N.

In[3]:= N[12/10,30]

Out[3]= 1.2

In[4]:= Precision[%]

Out[4]= 30

You can force the accuracy up by SetPrecision or SetAccuracy, but
beware, because the number was first converted to binary in low
precision form before SetPrecision or SetAccuracy got to it.  So you
are declaring an inaccurate value to be accurate.

In[8]:= SetPrecision[1.2,30]

Out[8]= 1.19999999999999995559107901499

In[9]:= Precision[%]

Out[9]= 30

I know of no way to make the Mathematica "reader" convert decimal
input to high accuracy other than appending a long string of zeros.
If anybody know of a way, please speak up.

  -- David Jacobson


From @vmd.cso.uiuc.edu:AN123651@UTHVM1.BITNET Thu Mar 22 12:42:28 1990
Received: from vmd.cso.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09486; Thu, 22 Mar 90 12:42:26 -0600
Message-Id: <9003221842.AA09486@yoda.ncsa.uiuc.edu>
Received: from UTHVM1.BITNET by VMD.CSO.UIUC.EDU (IBM VM SMTP R1.2) with BSMTP id 6166; Thu, 22 Mar 90 12:43:10 CST
Received: from UTHVM1 (AN123651) by UTHVM1.BITNET (Mailer R2.05) with BSMTP id
 8630; Thu, 22 Mar 90 12:41:47 CST
Date:         Thu, 22 Mar 90 12:41:28 CST
From: "E. Neely Atkinson" <AN123651@uthvm1.bitnet>
Subject:      D and Derivative - help please
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO


I would appreciate some help with this from anyone who understands
Mathematica better than I. Suppose I define a function:

   f[x_,y_] := x + y + Gamma[x,y]

When I take its derivative using D, everything is fine.

   D[f[x,y],x]

            (1,0)
   1 + Gamma     [x, y]

Derivative, on the other hand, can't get as far.

   Derivative[1,0][f]

    (1,0)
   f

Now, suppose I define my own value for the derivative of the
Gamma function.

   Derivative[1,0][Gamma] = Plus

D understands this perfectly, but Derivative not at all.

   D[f[x,y],x]

   1 + x + y

   Derivative[1,0][f]

   (1,0)
   f

   Derivative[1,0][f][x,y]

   (1,0)
   f     [x, y]

What's the difference here? How can I get Derivative to use my
definition?

Thanks for any help.

                               E. Neely Atkinson
                               AN123651 at UTHVM1.BITNET
                               neely@mdaali.cancer.utexas.edu

From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Mar 22 13:29:08 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09533; Thu, 22 Mar 90 13:29:07 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA17995; Thu, 22 Mar 90 13:24:35 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09394; Thu, 22 Mar 90 11:08:21 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09390; Thu, 22 Mar 90 11:08:19 -0600
Message-Id: <9003221708.AA09390@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: N
Date: Thu, 22 Mar 90 08:20:47 PST
From: jacobson@cello.hpl.hp.com
Status: RO

There has been discussion recently about using N[...,30] around
everything.  It is been observed by Richard Fateman and confirmed by
Paul Abbott that this may not work because f[N[...,30]] and
N[f[...],30] are not the same.  However there is a much more important
reason why it won't work.  N only reduces the accuracy of its first
argument, it never increases it.  Note the following:

In[1]:= N[1.2,30]

Out[1]= 1.2

In[2]:= Precision[%]

Out[2]= 16

To get N to work right on decimal things I have to rewrite them as
rationals, or use lots of zeros, then apply N.

In[3]:= N[12/10,30]

Out[3]= 1.2

In[4]:= Precision[%]

Out[4]= 30

You can force the accuracy up by SetPrecision or SetAccuracy, but
beware, because the number was first converted to binary in low
precision form before SetPrecision or SetAccuracy got to it.  So you
are declaring an inaccurate value to be accurate.

In[8]:= SetPrecision[1.2,30]

Out[8]= 1.19999999999999995559107901499

In[9]:= Precision[%]

Out[9]= 30

I know of no way to make the Mathematica "reader" convert decimal
input to high accuracy other than appending a long string of zeros.
If anybody know of a way, please speak up.

  -- David Jacobson



From fateman@renoir.Berkeley.EDU Thu Mar 22 13:58:37 1990
Received: from renoir.Berkeley.EDU by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09588; Thu, 22 Mar 90 13:58:34 -0600
Received: by renoir.Berkeley.EDU (5.61/1.29)
	id AA19124; Thu, 22 Mar 90 11:56:21 -0800
Date: Thu, 22 Mar 90 11:56:21 -0800
From: fateman@renoir.Berkeley.EDU (Richard Fateman)
Message-Id: <9003221956.AA19124@renoir.Berkeley.EDU>
To: jacobson@cello.hpl.hp.com, mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: N
Cc: fateman@renoir.Berkeley.EDU
Status: RO

The notions of precision and accuracy as used in Mathematica
are, in my view, wrong.  I have argued at some length (and
apparently with no effect) for a model in which a floating-point
number's precision can be extended by adding 0's to its
internal representation, if you wish.  The mathematica model
is (somewhat crudely) that if you write 0.5  you do not mean
0.500000...  but any number between 0.450 and 0.5499.. . 

While this latter model may be reminiscent of a physics-lab
approach of carrying significant figures in your measurements,
it is not useful in computation. Numerical analysis texts
talk about relative and absolute error, not precision and accuracy.

  Richard Fateman
  UC Berkeley

From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Mar 22 14:47:36 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09696; Thu, 22 Mar 90 14:47:35 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA19620; Thu, 22 Mar 90 14:43:04 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09501; Thu, 22 Mar 90 12:53:38 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09497; Thu, 22 Mar 90 12:53:36 -0600
Message-Id: <9003221853.AA09497@yoda.ncsa.uiuc.edu>
Date:         Thu, 22 Mar 90 12:41:28 CST
From: AN123651@uthvm1.bitnet
Subject:      D and Derivative - help please
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO


I would appreciate some help with this from anyone who understands
Mathematica better than I. Suppose I define a function:

   f[x_,y_] := x + y + Gamma[x,y]

When I take its derivative using D, everything is fine.

   D[f[x,y],x]

            (1,0)
   1 + Gamma     [x, y]

Derivative, on the other hand, can't get as far.

   Derivative[1,0][f]

    (1,0)
   f

Now, suppose I define my own value for the derivative of the
Gamma function.

   Derivative[1,0][Gamma] = Plus

D understands this perfectly, but Derivative not at all.

   D[f[x,y],x]

   1 + x + y

   Derivative[1,0][f]

   (1,0)
   f

   Derivative[1,0][f][x,y]

   (1,0)
   f     [x, y]

What's the difference here? How can I get Derivative to use my
definition?

Thanks for any help.

                               E. Neely Atkinson
                               AN123651 at UTHVM1.BITNET
                               neely@mdaali.cancer.utexas.edu


From jacobson@cello.hpl.hp.com Thu Mar 22 15:50:18 1990
Received: from hplms2.hpl.hp.com by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09821; Thu, 22 Mar 90 15:50:16 -0600
Received: from cello.hpl.hp.com by hplms2.hpl.hp.com with SMTP
	(15.11.1.3/15.5+IOS 3.20) id AA23620; Thu, 22 Mar 90 13:49:29 pst
Received: from localhost by cello.HPL.HP.COM; Thu, 22 Mar 90 13:49:15 pst
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica speedup technique
Date: Thu, 22 Mar 90 13:49:13 PST
Message-Id: <20853.638142553@cello>
From: jacobson@cello.hpl.hp.com
Status: RO

I am presently working on a project where we needed to assign values
to MANY complicated expressions, as in

	FinishTime[packetToNet] = .1243

	FinishTime[PE[PI[diskread],1]] = .345

This can get real slow.  

	In[1]:= Timing[Do[FinishTime[PE[PI[diskread],i]] = i+1,{i,2000}]]

	Out[1]= {152.4 Second, Null}

	In[2]= Timing[FinishTime[PE[PI[diskread],500]]]

	Out[2]= {0.01 Second, 501}

I found that I could hash the expression to a new symbol and then
use it as the tag in a TagSet.  This speeded things up a lot.

I have coded this up in a package that defined a function "Wrap" to wrap
around the expressions.  The heart of the function is this definition:

   hashify[name_] := ToExpression[StringJoin["HASH$",ToString[Hash[name]]]]

The whole package appears at the end.

    In[1]:= <<wrap.m

    In[2]:= Timing[Do[Wrap[FinishTime[PE[PI[diskread],i]]] = i+1,{i,2000}]]

    Out[2]= {16.16 Second, Null}

    In[3]:= Timing[Wrap[FinishTime[PE[PI[diskread],500]]]]

    Out[3]= {0., 501}

WARNING: When I was preparing this, I was taking wrap, spelled in
lower case, from a larger program.  It was not in a package and was
simply entered one line at a time, down through the definition of
wrapset.  The above example did not work.  There must be a bug lurking
somewhere.
-----------------------------
(**********************************************************************
This "Wrap" package is experimental and HP shall have no obligation to
maintain or support it.  HP makes no express or implied warranty of
any kind with respect to this software, and HP shall not be liable for
any direct, indirect, special, incidental or consequential damages
(whether based on contract, tort or any other legal theory) arising in
any way from use of the software.
***********************************************************************)

BeginPackage["Wrap`"]

Wrap::usage = "Wrap[arg] = expr effectively assigns expr to wrap[arg],
but does so using TagSet with the tag being a hash value.  Wrap[exp]
retrieves that value.  Wrap[arg] := expr and Wrap[arg] =. also work.
Feature(?): Wrap[foo] returns an ugly expression if it has never been
defined.  Perhaps it ought to not evaluate, but we are doing this for
speed."

Begin["`Private`"]

hashify[name_] := ToExpression[StringJoin["HASH$",ToString[Hash[name]]]]

SetAttributes[wp,HoldRest]

Wrap/:Set[Literal[Wrap[arg_]],val_] := wrapset[hashify[arg],arg,val] 

wrapset[h_,arg_,val_] := h/: wp[h,arg] = val

Wrap[arg_] := wp[hashify[arg],arg]

Wrap/:Unset[Literal[Wrap[arg_]]] := wrapunset[hashify[arg],arg]

wrapunset[h_,arg_] := h/:wp[h,arg]=.

SetAttributes[wrapsetdelayed,HoldRest]

Wrap/:SetDelayed[Literal[Wrap[arg_]],val_] := wrapsetdelayed[hashify[arg],arg,val] 

wrapsetdelayed[h_,arg_,val_] := h/: wp[h,arg] = val

End[]

EndPackage[]
-----------------------------------------

From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Mar 22 16:32:38 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09861; Thu, 22 Mar 90 16:32:37 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA21849; Thu, 22 Mar 90 16:28:04 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09670; Thu, 22 Mar 90 14:28:06 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09666; Thu, 22 Mar 90 14:28:04 -0600
Message-Id: <9003222028.AA09666@yoda.ncsa.uiuc.edu>
Date: Thu, 22 Mar 90 11:56:21 -0800
From: fateman@renoir.Berkeley.EDU (Richard Fateman)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: N
Status: RO

The notions of precision and accuracy as used in Mathematica
are, in my view, wrong.  I have argued at some length (and
apparently with no effect) for a model in which a floating-point
number's precision can be extended by adding 0's to its
internal representation, if you wish.  The mathematica model
is (somewhat crudely) that if you write 0.5  you do not mean
0.500000...  but any number between 0.450 and 0.5499.. . 

While this latter model may be reminiscent of a physics-lab
approach of carrying significant figures in your measurements,
it is not useful in computation. Numerical analysis texts
talk about relative and absolute error, not precision and accuracy.

  Richard Fateman
  UC Berkeley


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Mar 22 17:36:03 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09943; Thu, 22 Mar 90 17:36:02 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA23111; Thu, 22 Mar 90 17:31:30 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09801; Thu, 22 Mar 90 15:45:23 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09797; Thu, 22 Mar 90 15:45:22 -0600
Message-Id: <9003222145.AA09797@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: N 
Date: Thu, 22 Mar 90 13:37:12 PST
From: jacobson@cello.hpl.hp.com
Status: RO

The real situation is even worse than Fateman claims.  On input
Mathematica uses trailing decimals to determine accuracy and
precision, but only if the resulting precision is higher than machine
precision.  Furthermore, one can't use N to reliably force the precision
down: N[...,3] seems to act as though it were N[...,Max[3,<<machine
precision>>]].

    In[39]:= 1.

    Out[39]= 1.

    In[40]:= Precision[%]

    Out[40]= 16

    In[41]:= N[%39,3]

    Out[41]= 1.

    In[42]:= Precision[%]

    Out[42]= 16

At the Mathematica conference, one of the WRI folks, (Jerry Keiper or
Igor Rivin, I believe) claimed than N[] only lowers precision, never
raises it.  However, here is a counter example.

    In[43]:= 1.000000000000000000000000001 -
	     1.0000000000000000000000000001

		  -28
    Out[43]= 9. 10

    In[44]:= Precision[%]

    Out[44]= 1

    In[45]:= N[%43]

		       -28
    Out[45]= 8.99999 10

    In[46]:= Precision[%]

    Out[46]= 16

and its not just that I used N with no second argument

	In[49]:= N[%43,16]

	                            -28
	Out[49]= 8.99999388963799 10

	In[50]:= Precision[%]

	Out[50]= 16


Finally, numbers seem to carry their precision around with them, but I
can't seem to access it.  I'd like to be able to do this in cases
where I want to do my own error analysis.

    In[58]:= p3 = N[Pi,3]

    Out[58]= 3.14

    In[59]:= p5=N[Pi,5]

    Out[59]= 3.1416

    In[60]:= Precision[p3]

    Out[60]= 16

    In[61]:= Precision[p5]

    Out[61]= 16

    In[62]:= Accuracy[p3]

    Out[62]= 15

    In[63]:= Accuracy[p5]

    Out[63]= 15

    In[64]:= p3===p5

    Out[64]= True

Somehow p3 will print to 3 places and p5 will print to 5 places, but I
don't know how the formatter knows that information.

  -- David Jacobson


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Mar 22 18:42:22 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA10035; Thu, 22 Mar 90 18:42:21 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA24089; Thu, 22 Mar 90 18:36:44 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09834; Thu, 22 Mar 90 15:52:34 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09830; Thu, 22 Mar 90 15:52:32 -0600
Message-Id: <9003222152.AA09830@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica speedup technique
Date: Thu, 22 Mar 90 13:49:13 PST
From: jacobson@cello.hpl.hp.com
Status: RO

I am presently working on a project where we needed to assign values
to MANY complicated expressions, as in

	FinishTime[packetToNet] = .1243

	FinishTime[PE[PI[diskread],1]] = .345

This can get real slow.  

	In[1]:= Timing[Do[FinishTime[PE[PI[diskread],i]] = i+1,{i,2000}]]

	Out[1]= {152.4 Second, Null}

	In[2]= Timing[FinishTime[PE[PI[diskread],500]]]

	Out[2]= {0.01 Second, 501}

I found that I could hash the expression to a new symbol and then
use it as the tag in a TagSet.  This speeded things up a lot.

I have coded this up in a package that defined a function "Wrap" to wrap
around the expressions.  The heart of the function is this definition:

   hashify[name_] := ToExpression[StringJoin["HASH$",ToString[Hash[name]]]]

The whole package appears at the end.

    In[1]:= <<wrap.m

    In[2]:= Timing[Do[Wrap[FinishTime[PE[PI[diskread],i]]] = i+1,{i,2000}]]

    Out[2]= {16.16 Second, Null}

    In[3]:= Timing[Wrap[FinishTime[PE[PI[diskread],500]]]]

    Out[3]= {0., 501}

WARNING: When I was preparing this, I was taking wrap, spelled in
lower case, from a larger program.  It was not in a package and was
simply entered one line at a time, down through the definition of
wrapset.  The above example did not work.  There must be a bug lurking
somewhere.
-----------------------------
(**********************************************************************
This "Wrap" package is experimental and HP shall have no obligation to
maintain or support it.  HP makes no express or implied warranty of
any kind with respect to this software, and HP shall not be liable for
any direct, indirect, special, incidental or consequential damages
(whether based on contract, tort or any other legal theory) arising in
any way from use of the software.
***********************************************************************)

BeginPackage["Wrap`"]

Wrap::usage = "Wrap[arg] = expr effectively assigns expr to wrap[arg],
but does so using TagSet with the tag being a hash value.  Wrap[exp]
retrieves that value.  Wrap[arg] := expr and Wrap[arg] =. also work.
Feature(?): Wrap[foo] returns an ugly expression if it has never been
defined.  Perhaps it ought to not evaluate, but we are doing this for
speed."

Begin["`Private`"]

hashify[name_] := ToExpression[StringJoin["HASH$",ToString[Hash[name]]]]

SetAttributes[wp,HoldRest]

Wrap/:Set[Literal[Wrap[arg_]],val_] := wrapset[hashify[arg],arg,val] 

wrapset[h_,arg_,val_] := h/: wp[h,arg] = val

Wrap[arg_] := wp[hashify[arg],arg]

Wrap/:Unset[Literal[Wrap[arg_]]] := wrapunset[hashify[arg],arg]

wrapunset[h_,arg_] := h/:wp[h,arg]=.

SetAttributes[wrapsetdelayed,HoldRest]

Wrap/:SetDelayed[Literal[Wrap[arg_]],val_] := wrapsetdelayed[hashify[arg],arg,val] 

wrapsetdelayed[h_,arg_,val_] := h/: wp[h,arg] = val

End[]

EndPackage[]
-----------------------------------------


From jacobson@cello.hpl.hp.com Fri Mar 23 10:50:39 1990
Received: from hplms2.hpl.hp.com by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA11450; Fri, 23 Mar 90 10:50:37 -0600
Received: from cello.hpl.hp.com by hplms2.hpl.hp.com with SMTP
	(15.11.1.3/15.5+IOS 3.20) id AA03834; Fri, 23 Mar 90 08:49:39 pst
Received: from localhost by cello.HPL.HP.COM; Fri, 23 Mar 90 08:49:35 pst
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: evaluation
Date: Fri, 23 Mar 90 08:49:33 PST
Message-Id: <27336.638210973@cello>
From: jacobson@cello.hpl.hp.com
Status: RO

Does anyone know how evaluation really works?  I submit this example
of funny behavior (compressed to single spacing for ease of reading):

In[1]:= foo[x_] := BAZZZ /; (Print["hi there"];y===True)
In[2]:= a = foo[xxx]
hi there
Out[2]= foo[xxx]
In[3]:= b=a
Out[3]= foo[xxx]
In[4]:= y=True
Out[4]= True
In[5]:= c=a
Out[5]= foo[xxx]
In[6]:= foo[xxx]
hi there
Out[6]= BAZZZ

Output 5, in particular, seems rather peculiar.  At that point y is True,
so it should be impossible to print anything that matches foo[_].

  -- David Jacobson

From @uunet.UU.NET:keiper@wri.UUCP Fri Mar 23 17:36:13 1990
Received: from uunet.UU.NET by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA11754; Fri, 23 Mar 90 17:36:10 -0600
Received: from wri.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA25418; Fri, 23 Mar 90 18:34:40 -0500
Received: by WRI.com (3.2/SMI-3.0DEV3)
	id AA17974; Fri, 23 Mar 90 17:33:12 CST
Received: by dragonfly. (4.0/SMI-4.0)
	id AA19166; Fri, 23 Mar 90 17:33:09 CST
Date: Fri, 23 Mar 90 17:33:09 CST
From: keiper@wri.UUCP (Jerry Keiper)
Message-Id: <9003232333.AA19166@dragonfly.>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: N[ ]
Status: RO


I stand by my statement that N[ ] never raises the precision of a number.
But perhaps I need to clarify what I mean by that.  There are two kinds of
numbers in Mathematica: machine numbers and bignums.  If a x is a machine
number Precision[x] will always return whatever the precision of a double
is; on a Sun that happens to be 16.  Mathematica never keeps track of the
precision of any machine number so Precision[x] tells you very little if
x is a machine number; you won't even be able to verify that it is a machine
number rather than a bignum with a certain precision.  Furthermore, if
the second argument to N[ ] is less than or equal to the precision of a
machine number it produces a machine number and displays it with the
number of digits requested (terminating zeros are suppressed).

This leads us to the second question: How does it know how many digits to
display in the case of a machine number?  Most of the time it doesn't so
it just shows 6 as a default.  However if the number was either entered
from the keyboard or resulted from N[ ] with a second argument less than
or equal to the precision of a machine number then the number of digits to
be displayed (NOT the precision) is stored in an int field in the number.
As soon as you do anything other than add 0 or multiply by 1, since it is
a machine number and Mathematica doesn't bother to keep track of its
precision, the number of digits to be displayed is lost and it will display
with the 6 digit default.  In my opinion this convention is pretty much
useless and it certainly leads to a great deal of confusion.

Jerry B. Keiper
Wolfram Research Inc.
keiper@wri.com


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Mar 23 20:30:23 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA11942; Fri, 23 Mar 90 20:30:21 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA18907; Fri, 23 Mar 90 20:25:54 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA11799; Fri, 23 Mar 90 18:26:32 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA11795; Fri, 23 Mar 90 18:26:31 -0600
Message-Id: <9003240026.AA11795@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: evaluation
Date: Fri, 23 Mar 90 08:49:33 PST
From: jacobson@cello.hpl.hp.com
Status: RO

Does anyone know how evaluation really works?  I submit this example
of funny behavior (compressed to single spacing for ease of reading):

In[1]:= foo[x_] := BAZZZ /; (Print["hi there"];y===True)
In[2]:= a = foo[xxx]
hi there
Out[2]= foo[xxx]
In[3]:= b=a
Out[3]= foo[xxx]
In[4]:= y=True
Out[4]= True
In[5]:= c=a
Out[5]= foo[xxx]
In[6]:= foo[xxx]
hi there
Out[6]= BAZZZ

Output 5, in particular, seems rather peculiar.  At that point y is True,
so it should be impossible to print anything that matches foo[_].

  -- David Jacobson



From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Mar 23 21:23:03 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA12066; Fri, 23 Mar 90 21:23:02 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-1.2)
	id AA19638; Fri, 23 Mar 90 21:18:35 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA11805; Fri, 23 Mar 90 18:31:29 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA11801; Fri, 23 Mar 90 18:31:28 -0600
Message-Id: <9003240031.AA11801@yoda.ncsa.uiuc.edu>
Date: Fri, 23 Mar 90 17:33:09 CST
From: keiper@wri.UUCP (Jerry Keiper)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: N[ ]
Status: RO


I stand by my statement that N[ ] never raises the precision of a number.
But perhaps I need to clarify what I mean by that.  There are two kinds of
numbers in Mathematica: machine numbers and bignums.  If a x is a machine
number Precision[x] will always return whatever the precision of a double
is; on a Sun that happens to be 16.  Mathematica never keeps track of the
precision of any machine number so Precision[x] tells you very little if
x is a machine number; you won't even be able to verify that it is a machine
number rather than a bignum with a certain precision.  Furthermore, if
the second argument to N[ ] is less than or equal to the precision of a
machine number it produces a machine number and displays it with the
number of digits requested (terminating zeros are suppressed).

This leads us to the second question: How does it know how many digits to
display in the case of a machine number?  Most of the time it doesn't so
it just shows 6 as a default.  However if the number was either entered
from the keyboard or resulted from N[ ] with a second argument less than
or equal to the precision of a machine number then the number of digits to
be displayed (NOT the precision) is stored in an int field in the number.
As soon as you do anything other than add 0 or multiply by 1, since it is
a machine number and Mathematica doesn't bother to keep track of its
precision, the number of digits to be displayed is lost and it will display
with the 6 digit default.  In my opinion this convention is pretty much
useless and it certainly leads to a great deal of confusion.

Jerry B. Keiper
Wolfram Research Inc.
keiper@wri.com



From @vmd.cso.uiuc.edu:WIESENEKKER@SARA.NL Sat Mar 24 17:31:27 1990
Received: from vmd.cso.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA13152; Sat, 24 Mar 90 17:31:25 -0600
Received: from HASARA5.BITNET by VMD.CSO.UIUC.EDU (IBM VM SMTP R1.2) with BSMTP id 1356; Sat, 24 Mar 90 17:30:06 CST
Received: from VE1.LCN by SARA.NL for mathgroup@yoda.ncsa.uiuc.edu;
          24 Mar 90 22:16 MET
Message-Id: <$147986941S0116D19900323T104331.0001.Mail-VE>
To: mathgroup@yoda.ncsa.uiuc.edu
From: WIESENEKKER@sara.nl
Subject: problem with solve
Date: 23 MAR 90 11:56:31
Status: RO

 Subject: problem with solve

 Try the following with Mathematica for the MacII running on a
 MacIIci:

 Solve[x^2==0.0,x]

 Mathematica starts complaining about ComplexInfinities etc. Why?

 Drs. G. Wiesenekker
 WIESENEKKER@SARA.NL


From gjc@mitech.com Sun Mar 25 16:59:23 1990
Received: from schizo.samsung.com by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA14088; Sun, 25 Mar 90 16:59:20 -0600
From: gjc@mitech.com
Received: by schizo.samsung.com from mitech.UUCP via UUCP (vers 5.61+)
	for mathgroup@yoda.ncsa.uiuc.edu (from gjc@mitech.com)
	id <AA01694@schizo.samsung.com>; Sun, 25 Mar 90 17:57:54 -0500
Message-Id: <9003252257.AA01694@schizo.samsung.com>
Reply-To: <gjc@mitech.com>
Received: by mitech.com (DECUS UUCP w/Smail);
          Sun, 25 Mar 90 09:57:07 EDT
Date: Sun, 25 Mar 90 09:57:07 EDT
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematic mailing list forwarding
X-Vms-Mail-To: uucp%"mathgroup@yoda.ncsa.uiuc.edu"
Status: RO

This is a test to see if mail to the
list mathgroup at yoda.ncsa.uiuc.edu is realling being
forwarded to sci.math.symbolic

-gjc

From jacobson@cello.hpl.hp.com Tue Mar 27 15:48:24 1990
Received: from hplms2.hpl.hp.com by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA00471; Tue, 27 Mar 90 15:48:21 -0600
Received: from cello.hpl.hp.com by hplms2.hpl.hp.com with SMTP
	(15.11.1.3/15.5+IOS 3.20) id AA21928; Tue, 27 Mar 90 13:47:18 pst
Received: from localhost by cello.HPL.HP.COM; Tue, 27 Mar 90 13:47:13 pst
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: GNU Emacs Mathematica mode
Date: Tue, 27 Mar 90 13:47:11 PST
Message-Id: <24831.638574431@cello>
From: jacobson@cello.hpl.hp.com
Status: RO

Here is a GNU Emacs package for use with Mathematica.  
Its main features are:  

  * Editing of multi-line "cells" before submission.
  * Limited error checking before submission
  * Copying of earlier cells by name or by pointing.
  * Go to the point of an error in a .m file.
  * On-line help
  * Symbol completion
  * Interrupts

Installation:  Check the $Path variable of your version of
Mathematica.  Edit the Mathematica-search-path variable (or just make
make sure it is set before loading this) to match.  Use nil for the
current working directory.

After loading, type M-X math to start a copy of Mathematica.  Edit an
input cell using normal editing commands, the submit with ESC-RET.

If the input is does not form a complete statement, Mathematica will
either hang waiting for more input or will type "^ <retype line>".  If
this happens, space down a couple of lines (so that there is a blank
line above the cursor) and type ESC-RET.  This will clear
Mathematica's input buffer; then remove the new prompt, edit the
input and resubmit.

You can copy previous cells with C-c C-y.  It will ask for what cell
you want in the minibuffer.  

  <nn> 		gives cell number <nn>
  .     	gives the cell the cursor is on
  <empty> 	gives the last cell.

With a prefix this will back over incarnation boundaries of
Mathematica.  See the on-line help for math-copy-cell for more info.

You can complete Mathematica symbols with ESC-TAB.  

C-c C-c interrupts Mathematica (as well is it can be interrupted).
When it gives you the prompt, type your response followed by ESC-RET.

C-c 9 is equivalent to kill -9 <Mathematica process number>.

If you have read in a .m file with "<<", and have gotten 
a response of the form

	"<filename>: <lineno>: syntax error in ..."

you can go directly to the point of the error by typing C-c C-e.
This is very useful because the line numbers are almost always wrong.
This function counts lines the way Mathematica does.

Enjoy,
  -- David Jacobson
================================
;; Copyright (c) 1990 Hewlett-Packard Company, all rights reserved.
;; 
;;                             LEGAL NOTICE
;; 
;; This math-mode package is experimental and HP shall have no obligation to
;; maintain or support it.  HP makes no express or implied warranty of any
;; kind with respect to this software, and HP shall not be liable for any
;; direct, indirect, special, incidental or consequential damages (whether
;; based on contract, tort or any other legal theory) arising in any way from
;; use of the software.
;; 
;; Everyone is granted permission to copy, modify and redistribute this
;; math-mode package, provided:
;;  1.  All copies contain this copyright notice.
;;  2.  All modified copies shall carry a prominant notice stating who
;;      made the last modification and the date of such modification.
;;  3.  No charge is made for this software or works derived from it.  
;;      This clause shall not be construed as constraining other software
;;      distributed on the same medium as this software, nor is a
;;      distribution fee considered a charge.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Portions of this package were adapted from GNU Emacs.
;;
;; Copyright (C) 1985, 1986, 1987, 1988 Free Software Foundation, Inc. 
;; 
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY.  No author or distributor
;; accepts responsibility to anyone for the consequences of using it
;; or for whether it serves any particular purpose or works at all,
;; unless he says so in writing.  Refer to the GNU Emacs General Public
;; License for full details.

;; Everyone is granted permission to copy, modify and redistribute
;; GNU Emacs, but only under the conditions described in the
;; GNU Emacs General Public License.   A copy of this license is
;; supposed to have been given to you along with GNU Emacs so you
;; can know your rights and responsibilities.  It should be in a
;; file named COPYING.  Among other things, the copyright notice
;; and this notice must be preserved on all copies.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;	Author: David Jacobson
;;      Experimental version of March 24, 1990
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'shell)

(defvar Mathematica-search-path 
  (list nil (getenv "HOME") "/usr/local/math/Init" "/usr/local/math/Packages")
  "*A list of directories in which to look for files.  
Use nil for the current directory.")

(defconst math-process-string "/usr/local/bin/math"
  "A string to pass to the unix exec function to start Mathematica")

(defconst math-header-re (concat "^" (regexp-quote "by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,"))
  "A regular expression that will match somewhere in Mathematica preamble")
						   

(defvar math-mode-map nil) 

(if math-mode-map
    nil
  (setq math-mode-map (deep-copy-keymap shell-mode-map))
  (define-key math-mode-map "\C-m" 'newline) ; the global keymap maps to newline
  (define-key math-mode-map "\e\C-m" 'math-send-input)
;  (define-key math-mode-map "\C-c\C-c" 'interrupt-math-proc)
  (define-key math-mode-map "\C-c9" 'kill-math-process)
  (define-key math-mode-map "\C-c\C-h"   'math-help); buffer specific C-h
  (define-key math-mode-map "\C-he" 'math-help) ; e-xpression in help menu
  (define-key math-mode-map "\C-hE" 'math-extra-help) ; E-xpression in help menu
  (define-key math-mode-map "\e\t"   'math-complete-symbol)
  (define-key math-mode-map "\C-c\C-y" 'math-copy-cell)
  (define-key math-mode-map "\C-c\C-e" 'find-math-error))

(defvar math-mode-syntax-table nil
  "Syntax table used while in math mode.")

(if math-mode-syntax-table
    ()
  (setq math-mode-syntax-table (make-syntax-table))
  (modify-syntax-entry ?% "." math-mode-syntax-table)
  (modify-syntax-entry ?& "." math-mode-syntax-table)
  (modify-syntax-entry ?* ". 23" math-mode-syntax-table) ;allow for (* comment *)
  (modify-syntax-entry ?+ "." math-mode-syntax-table)
  (modify-syntax-entry ?- "." math-mode-syntax-table)
  (modify-syntax-entry ?/ "." math-mode-syntax-table)
  (modify-syntax-entry ?< "." math-mode-syntax-table)
  (modify-syntax-entry ?= "." math-mode-syntax-table)
  (modify-syntax-entry ?> "." math-mode-syntax-table)
  (modify-syntax-entry ?_ "." math-mode-syntax-table)
  (modify-syntax-entry ?\| "." math-mode-syntax-table)
  (modify-syntax-entry ?\` "_" math-mode-syntax-table) ; Mathematica context symbol
  (modify-syntax-entry ?\( "()1" math-mode-syntax-table) ;allow for (* comment *)
  (modify-syntax-entry ?\) ")(4" math-mode-syntax-table)) ;allow for (* comment *)


(defun math-send-input ()
  "Send input to subshell.
At end of buffer, sends all text after last output
 as input to the subshell, including a newline inserted at the end.
When not at end, copies current line to the end of the buffer and sends it,
after first attempting to discard any prompt at the beginning of the line
by matching the regexp that is the value of shell-prompt-pattern if possible.
This regexp should start with \"^\"."
  (interactive)
  (or (get-buffer-process (current-buffer))
      (error "Current buffer has no process"))
  ;; Stick on a newline if the current line is non-blank and 
  ;; it's end is also the end of the buffer
  ;; In retrospect this seems stupid 3/21/90
  (beginning-of-line)
  (if (looking-at "\\s *\\S .*\\'")
      (progn
	(end-of-line)
	(newline)))
  ;; Find beginning of "cell"
  (let* ((cellinfo (math-identify-cell (point)))
	 (bpt (car cellinfo))
	 (ept (nth 1 cellinfo))
	 (query (nth 2 cellinfo))
	 copy)
    (if (not query) (check-math-syntax bpt ept))
    ;; If we are \"near\" the end of the buffer, we don't copy the data down
    ;; there, but we kill excess white space.  Otherwise, we go there and 
    ;; copy the data.
    (goto-char ept)
    (forward-line 1)
    (if (not (bolp)) (newline))
    (setq copy (buffer-substring bpt (point)))
    (if (looking-at "\\s *\\'")
	(replace-match "")
      (goto-char (point-max))
      (forward-line 0)
      (if (or (eolp) (looking-at "^In\\[[0-9]+\\]:=\\s *$"))
	  (end-of-line)
	(end-of-line)
	(newline))
      (insert copy))
    (if (= (length copy) 0) (setq copy "\n"))  ; hack
    (let ((process (get-buffer-process (current-buffer))))
      (set-process-filter process 'math-insert-blank-filter)
      (metered-process-send-string process copy)
      (set-marker (process-mark process) (point)))))

(defun math-insert-blank-filter (proc string)
  ; force a blank line after input cell.
  (let ((cbuf (current-buffer))
	(save-match-data (match-data)))
    (unwind-protect
	(progn
	  (set-buffer (process-buffer proc))
	  (goto-char (point-max))
	  ;; Sometimes Mathematica's first line of output 
	  ;; contains white space characters before the 
	  ;; newline.  We wish to treat that as an acceptable
	  ;; blank line.
	  ;; Zero testing is necessary to avoid matches on
	  ;; subsequent lines.  Zerop won't work since
	  ;; it gives an error with a nil arg.
	  (cond ((equal (string-match "^\\s *\n" string) 0)
		 (set-process-filter proc nil))
		((equal (string-match "^\\s *$" string) 0)) ; do nothing
		(t
		 (newline)
		 (message "newline inserted by Emacs' math-mode")))
	  (insert-string string)
	  (set-marker (process-mark proc) (point)) ; is this necessary?
	  ) ; matches progn
      (set-process-filter proc nil)
      (set-buffer cbuf)
      (store-match-data save-match-data))))

(defun math-mode ()
  "Major mode for interacting with Mathematica.  
\\[math] starts Mathematica.

\\[math-send-input] tries to identify stuff following last 
\"In[...]:= \" or blank line and sends it.  To clear out 
Mathmatica after an error occurs, move point two lines below 
last printing character and type \\[math-send-input] 

\\[math-help] gives help on a Mathematica symbol.  
C-u \\[math-help] or \\[math-extra-help] gives more verbose help.

\\[math-complete-symbol] will complete the symbol near point.

\\[math-copy-cell] will copy a previous cell to the end of the buffer.
See its description for details.

\\[find-math-error] when typed after <<filename has returned a
syntax error will goto the error.  (Depends on Mathematica-search-path.)

\\[goto-matherr-line] will go to the specificied line, with lines
counted as Mathematica does.  For use in .m files.


Entry to this mode calls the value of shell-mode-hook with no args,
if that value is non-nil."


  (interactive)
  (kill-all-local-variables)
  (setq major-mode 'math-mode)
  (setq mode-name "Mathematica")
  (setq mode-line-process '(": %s"))
  (use-local-map math-mode-map)
  (set-syntax-table math-mode-syntax-table)
  (make-local-variable 'shell-directory-stack)
  (setq shell-directory-stack nil)
  (make-local-variable 'parse-sexp-ignore-comment)
  (setq parse-sexp-ignore-comment t)
  (setq doing-math-complete-symbol nil)
  (run-hooks 'math-mode-hook))


(defun math ()
  "Run an inferior Mathematica process, input and output via buffer *math*."
  (interactive)
  (pop-to-buffer (start-buffer-process
		  "*math*" "math" math-process-string
		  nil))
  (math-mode))

(defun start-math ()
  (interactive "*")
  (start-buffer-process (current-buffer) "math" math-process-string
			nil)
  (math-mode))


(defun math-complete-symbol ()
  "Complete the symbol preceeding point."
  (interactive "*")
  (if (or (not (eq major-mode 'math-mode))
	  (not (memq (process-status 
		      (get-buffer-process (current-buffer))) 
		     '(run stop))))
      (error "No math process running in this buffer"))
  (let ((process (get-buffer-process (current-buffer)))
	sent-successfully)
    (setq math-completion-symbol (math-symbol-around-point))
    (unwind-protect
	(let ((cbuf (current-buffer)))
	  (set-buffer (get-buffer-create " Mathwork"))
	  (erase-buffer)
	  (set-buffer cbuf)
	  (setq doing-math-complete-symbol t)
	  (set-process-filter process 'math-help-filter)
	  (process-send-string process (concat "Scan[Print,Names[\"" math-completion-symbol "**\"]];Out[--$Line];\n"))
	  (setq sent-successfully t))
      (if (not sent-successfully)
	  (progn
	    (setq doing-math-complete-symbol nil)
	    (set-process-filter process nil))))))
	   
		      
(defun math-symbol-around-point ()
 "Return the symbol around the point as a string."
 (save-excursion
   (let (beg)
     (if (not (eobp)) (forward-char 1))
     (re-search-backward "\\w\\|\\s_")
     (forward-char 1)
     (backward-sexp)
     (setq beg (point))
     (forward-sexp)
     (buffer-substring beg (point)))))

(defun math-extra-help () 
  "Like math-help with a prefix arg"
  (interactive)
  (let ((current-prefix-arg (list 1))
	(prefix-arg (list 1)))          ; I'm hacking.  
					; current-prefix-arg makes M-X ... work
                                        ; prefix-arg makes it work when bound to a key
					; I'm sure RMS had something else in mind.
    (call-interactively 'math-help)))

(defun math-help (symbol arg)
  "Display what Mathematica knows about SYMBOL.  With prefix arg (2nd arg
when called from a program) it gives more info."
  (interactive  ; read a word, using the word around point as the default
   (let ((enable-recursive-minibuffers t)
	 (try-word (math-symbol-around-point))
	 val)
     (if (string-equal try-word "")
	 (setq val (read-string "Mathematica symbol: "))
       (setq val (read-string (format "Mathematica symbol (default %s): "
				      try-word)))
       (if (string-equal val "")
	   (setq val try-word)))
     (if (string-equal val "")
	 (error "No symbol read"))
     (list val current-prefix-arg)))
  (let ((process (get-buffer-process (current-buffer)))
	sent-successfully)
    (unwind-protect
	(progn
	  (with-output-to-temp-buffer "*Help*"
	    (print-help-return-message))
	  (set-process-filter process 'math-help-filter)
	  (process-send-string process (concat (if arg "??" "?") symbol "\n"))
	  (setq sent-successfully t))
      (if (not sent-successfully) (set-process-filter process nil)))))


(defun math-help-filter (proc string)
;  (message "Math filter: %s" string)
  (let ((cbuf (current-buffer))
	(save-match-data (match-data)))
    (unwind-protect
	(progn
	  (if doing-math-complete-symbol
	      (set-buffer " Mathwork")
	    (set-buffer "*Help*"))
	  (goto-char (point-max))
	  (insert string)
	  (beginning-of-line)
	  (if (looking-at "^In\\[[0-9]+\\]:=")
	      (progn
		(delete-region (point) (point-max))
		(bury-buffer (current-buffer))
		(set-process-filter proc nil)
		(if doing-math-complete-symbol
		    (progn
		      (set-buffer cbuf)
		      (setq doing-math-complete-symbol nil)
		      (insert (get-math-completion math-completion-symbol)))
		  (goto-char (point-min))))))
      (set-buffer cbuf)
      (store-match-data save-match-data))))

(defun check-math-syntax (pmin pmax)
  "Mathematica will screw up if there exists a prefix of a cell such that
the prefix ends in a newline and forms a valid mathematica expresssion.
This function causes an error if that is the case.  If that is ok it checks 
that the whole expression has balanced parens, comments and quotes.  It is
not perfect these checks since Gnu Emacs does not understand nested
comments.  Also it only checks that the nesting level of all paren constructs
is zero at the end, not that they really match."
  (interactive "r")
  (let ((pt (point))
	possibleerr)
    (save-restriction
      (narrow-to-region pmin pmax)
      (goto-char pmin)
      (while (and (not possibleerr)
		  (not (eobp)))
	(end-of-line)
	(let ((parsestate (parse-partial-sexp (point-min) (point))))
	  (if (not (looking-at "\\s *\\'")) ; not just all white space to eob
	      (progn      ; make sure this could NOT end a valid expression
		(if (and
		     (= (nth 0 parsestate) 0) ; zero paren depth
		     (not (nth 3 parsestate)) ; not in a string
		     (not (nth 4 parsestate)) ; not in a comment
		     (progn
		       (forward-line 0)
		       (looking-at  ; last symbol could be end of number or symbol or
					; right delim or postfix op
			".*\\([])}\"A-Za-z0-9!_'.]\\|\\+\\+\\|--\\|[^/];\\|\\.\\.\\)[ \t]*$")))
		    ;; might confuse mathematics
		    (progn
		      (setq possibleerr 
			    "Possible complete statement before end, submit anyway? ")
		      (end-of-line))))
	    ;; we are at the end of the statement
	    (cond ((nth 3 parsestate)
		   (setq possibleerr
			 "Apparently unterminated string, submit anyway? "))
		  ((nth 4 parsestate)
		   (setq possibleerr 
			 "Apparently unclosed comment, submit anyway? "))
		  ((not (zerop (nth 0 parsestate)))
		   (setq possibleerr
			 "Apparently mismatched parens, submit anyway? "))))
	  (if (not possibleerr) (forward-line 1)))))
    (if (and possibleerr (not (y-or-n-p possibleerr)))
	(error "Cancelled")
      (goto-char pt))))


(defun start-buffer-process (bufferid procname program &optional startfile &rest switches)
  ;; A munged version of make-shell
  ;; bufferid can be a buffer or the name of a buffer
  (let ((buffer (get-buffer-create bufferid))
	proc status size)
    (setq proc (get-buffer-process buffer))
    (if proc (setq status (process-status proc)))
    (save-excursion
      (set-buffer buffer)
      ;;    (setq size (buffer-size))
      (if (memq status '(run stop))
	  nil
	(if proc (delete-process proc))
	(message "Starting Mathematica...")
	(setq proc (apply 'start-process procname buffer
			  (concat exec-directory "env")
			  (format "TERMCAP=emacs:co#%d:tc=unknown:"
				  (screen-width))
			  "TERM=emacs"
			  "EMACS=t"
			  "-"
			  (or program explicit-shell-file-name
			      (getenv "ESHELL")
			      (getenv "SHELL")
			      "/bin/sh")
			  switches))
	(cond (startfile
	       ;;This is guaranteed to wait long enough
	       ;;but has bad results if the shell does not prompt at all
	       ;;	     (while (= size (buffer-size))
	       ;;	       (sleep-for 1))
	       ;;I hope 1 second is enough!
	       (sleep-for 1)
	       (goto-char (point-max))
	       (insert-file-contents startfile)
	       (setq startfile (buffer-substring (point) (point-max)))
	       (delete-region (point) (point-max))
	       (process-send-string proc startfile)))
	(setq procname (process-name proc)))  ; what in the world is this for?
      (goto-char (point-max))
      (set-marker (process-mark proc) (point))
      (shell-mode))
    buffer))

(defun math-copy-cell (numberstring incarnations pt)
  "Copies the \"cell\" ARG to the end of the buffer.  With arg
of null string, copies the previous \"In\" cell around point to the
end of the buffer.  With arg = \".\" copies the cell around point.
If supplied with a prefix arg, in the case of a numeric arg it will 
go back that many Mathematica incarnations before searching.
When called from a program third arg is the point around with to look
for the current cell."
  (interactive "*sCell number (`.' current cell, default last In cell): \nP\nd")
  (cond  ((string= numberstring ".")
	  (if (interactive-p) (push-mark))
	  (goto-char pt))
	 ((zerop (length numberstring))
	  (goto-char (point-max))
	  (re-search-backward "^In\\[[0-9]+\\]:=" nil nil 2)
	  (while (and (not (bobp))
		      (looking-at ; reject ones without any useful text 
		       "In\\[[0-9]+\\]:=\\s *\\(\\'\\|\n\\s *$\\)"))
		 (re-search-backward "^In\\[[0-9]+\\]:=")))
	 (t
	  (if (interactive-p) (push-mark))
	  (goto-char (point-max))
	  (if incarnations
	      (let ((count (cond ((numberp incarnations) incarnations)
				 ((equal incarnations '(4)) 1)
				 ((equal incarnations '(16)) 2)
				 ((equal incarnaitons '(64)) 3)
				 ((equal incarnations '(256)) 4)
				 ((equal incarnations '(1024)) 5)
				 (t (error "I'm too lazy to count that many prefix keys")))))
		(re-search-backward math-header-re nil nil count)))
	  (re-search-backward (concat "^In\\[" numberstring "\\]:="))))
  (let ((cellinfo (math-identify-cell (point))))
    (if (string= numberstring ".")
	(progn
	  (goto-char (point-max))
	  (re-search-backward "\\S ")
	  (forward-line 0)
	  (if (looking-at "^In\\[[0-9]+\\]:=\\s *$")
	      (end-of-line)
	    (goto-char (point-max))))
      (goto-char pt))
    (insert (buffer-substring (car cellinfo) (nth 1 cellinfo)))))



(defun math-identify-cell (pt)
  "Returns list of postions of first and last character of cell around 
   POS.  Third item is list is non-nil if the cell begins with a `?'"
  (save-excursion
    (goto-char pt)
    ;; back up at most one line looking for input
    (end-of-line)
    (re-search-backward 
     "^In\\[[0-9]+\\]:= ?\\|^\\s *\n\\|^Interrupt:[^?]*\\? ?\\|\\`\\s *")
					;This search has to succeed
    (goto-char (match-end 0)) 
    ;;  (sit-for 1)
    (let ((bpt (point))
	  ept
	  (query (looking-at "\\s *\\?.*\n"))
	  )
      (if query ; Queries are always one-liners
	  (goto-char (match-end 0))
	(if (re-search-forward "^\\s *$\\|^Out\\[[0-9]+\\][^=\n]*=\\|^In\\[[0-9]+\\]:=" nil 1)
	    ;; If it matches, we have found the beginning of a line
	    ;;  following the cell.  Back up one character.  
	    ;; If it doesn't match we are at eob and end of cell.
	    (goto-char (max (- (match-beginning 0) 1) bpt))))
      (setq ept (point))
      ;;    (sit-for 1)
      ;;      (message "%d %d" bpt ept)
      (list bpt ept query))))



(defun get-math-completion (prefix)
  ;; Returns string to insert to complete a Mathematica symbol
  ;; Designed to be called as in (insert (get-math-completion word))
  (let ((cbuf (current-buffer)))
    (unwind-protect
	(progn
	  (set-buffer " Mathwork")
	  (goto-char (point-min))
	  (let (alist)
	    (while (looking-at "\\S +")
	      (setq alist (cons (list (buffer-substring (match-beginning 0) (match-end 0))) alist))
	      (forward-line 1))
	    (set-buffer cbuf)
	    (let ((t-c-result  (and alist (try-completion prefix alist))))
	      ; try-completion barfs on a nil alist, so we help it out
	      (cond ((eq t-c-result t) 
		     (message "%s is complete" prefix)
		     "")
		    ((eq t-c-result nil)
		     (message "No match found")
		     "")
		    ((not (string= prefix t-c-result))
		     (substring t-c-result (length prefix)))
		    (t (with-output-to-temp-buffer "*Help*"
			 (display-completion-list 
			  (all-completions prefix alist))
			 (print-help-return-message))
		       ""))))))))

(defun kill-math-process ()
  "Kills the process in the current buffer"
  (interactive)
  (kill-process (get-buffer-process (current-buffer))))

(defun metered-process-send-string (process string)
  "The same semantics as process-send-string, except the
string is broken into small enough chunks to not mess up emacs"
  (let ((p 0)
	(len (length string)))
    (while (< p len)
      (process-send-string process
			   (substring string p (setq p (min len (+ p 80))))))))



(defun skip-over-white-lines ()
  (while (and 
	  (not (eobp))
	  (looking-at "^\\s *$") ; blank line
	  (zerop (forward-line)))))

(defun goto-matherr-line (argline)
  "Goes to the line intended by Mathematica error messages"
  (interactive "ngoto Mathematica line number: ")
  (let ((lineno 1)
	(comment-depth 0)
	instring)
    (goto-char (point-min))
    (if (looking-at "^\s *$")
	(progn
	  (setq lineno 2)
	  (skip-over-white-lines)))
    (while (and (not (eobp))
		(< lineno argline))
      (cond ((> comment-depth 0)
	     (re-search-forward "\\((\\*\\)\\|\\(\\*)\\)\\|\\(\n\\)" nil 1)
					; (* or *) or newline
	     (cond ((match-beginning 1)
		    (setq comment-depth (1+ comment-depth)))
		   ((match-beginning 2)
		    (setq comment-depth (1- comment-depth)))
		   ((match-beginning 3)
		    (setq lineno (1+ lineno)))))
	    (instring
	     (re-search-forward 
	      "\\(\\\\\\\\\\)\\|\\(\\\\\042\\)\\|\\(\042\\)\\|\\(\\\\\n\\)\\|\\(\n\\)" nil 1)
			; \\ or \quote or quote or \newline or newline
	     (cond ((match-beginning 3)
		    (setq instring nil))
		   ((match-beginning 4)
		    (setq lineno (1+ lineno)))
		   ((match-beginning 5)
		    (setq lineno (+ 2 lineno)))))
	    (t
	     (re-search-forward "\\(\050\\*\\)\\|\\(\042\\)\\|\\(\n\\)" nil 1)
					; left paren* or quote or newline
	     (cond ((match-beginning 1)
		    (setq comment-depth 1))
		   ((match-beginning 2)
		    (setq instring t))
		   ((match-beginning 3)
		    (setq lineno (1+ lineno))
		    (skip-over-white-lines))))))))

(defun find-math-error ()
  "Searches for the last \"syntax error in\" message, then goes
to the file and line indicated, where lines are counted as by Mathematica.
It uses the symbol Mathematica-search-path rather than going to all the work
to discover the real real search path."
  (interactive)
  (let (filename
	linenumber
	raw-filename
	(math-search-path Mathematica-search-path))
    (save-excursion
      (re-search-backward "syntax error in")
      (forward-line 0)
      (if (not (looking-at "\\([^:]+\\): *\\([0-9]+\\):"))
	  (error "Cannot parse error line"))
      (setq raw-filename (buffer-substring (match-beginning 1) (match-end 1)))
      (setq linenumber (string-to-int 
			(buffer-substring (match-beginning 2) (match-end 2)))))
    (while (not filename)
      (setq filename (expand-file-name raw-filename (car math-search-path)))
      (if (not (file-readable-p filename))
	  (progn (setq filename nil)
		 (setq math-search-path (cdr math-search-path))
		 (if (null math-search-path)
		     (error "File %s not found" raw-file-name)))))
    (find-file-other-window filename)
    (goto-matherr-line linenumber)))

From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Mar 29 17:53:24 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03573; Thu, 29 Mar 90 17:53:23 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA13958; Thu, 29 Mar 90 17:49:01 CST
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03505; Thu, 29 Mar 90 15:40:02 -0600
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03501; Thu, 29 Mar 90 15:40:01 -0600
Message-Id: <9003292140.AA03501@yoda.ncsa.uiuc.edu>
Date: Mon, 26 Mar 90 13:03:08 CST
From: keiper@wri.UUCP (Jerry Keiper)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: precision and accuracy
Status: RO


uunet!renoir.Berkeley.EDU!fateman (Richard Fateman) writes:

	The notions of precision and accuracy as used in Mathematica
	are, in my view, wrong.  I have argued at some length (and
	apparently with no effect) for a model in which a floating-point
	number's precision can be extended by adding 0's to its
	internal representation, if you wish.  The mathematica model
	is (somewhat crudely) that if you write 0.5  you do not mean
	0.500000...  but any number between 0.450 and 0.5499.. . 

	While this latter model may be reminiscent of a physics-lab
	approach of carrying significant figures in your measurements,
	it is not useful in computation. Numerical analysis texts
	talk about relative and absolute error, not precision and accuracy.

I presume he is unhappy with Mathematica's use of significance arithmetic
as opposed to fixed, but arbitrary precision arithmetic.  These two models
of arithmetic are indeed very different and they both have their advantages
and disadvantages, but I have seen no convincing evidence that one is
better than the other.  Certainly significance arithmetic is very difficult
to implement correctly and Mathematica has not yet achieved perfection in
this matter, but the fact that most elementary numerical texts only discuss
fixed precision arithmetic (note that they don't discuss arbitrary precision
arithmetic either) is not a reason to reject significance arithmetic.

As to increasing the precision of a number, Mathematica allows this to be
done very simply using SetPrecision[] (likewise the accuracy can be
increased with SetAccuracy[].)  y = SetPrecision[x, prec] gives y a value
such that y == x is True and such that the precision of y is prec.  If the
precision of y is greater than the precision of x the "missing" digits of x
are filled in for y with 0's in binary.  This does not mean that they will
appear as 0's in decimal however.  e.g. the decimal number 1.2 has a
nonterminating binary expansion 1.0011001100110011001100...  Clearly if
we start with a finite approximation to this and attach 0's in binary
we will not get the decimal expansion for 1.200000000...  Since it is not
possible to know what number a user has in mind when he wants to increase
its precision it is not possible to give a better approximation; all that
Mathematica can do is give another number with more digits in it.

As to relative and absolute error vs. precision and accuracy, precision
is a nonnegative integer and accuracy is an integer.  Relative and absolute
error are small numbers, sometimes complex, but they are never known
exactly (if they were the approximate answer could be corrected.)  I
find it more convenient to deal with an accuracy of 27 rather than an
absolute error of 0.000000000000000000000000001, but perhaps not everyone
does.


From @uxc.cso.uiuc.edu:keiper@wri.UUCP Mon Apr  2 18:07:13 1990
Received: from uxc.cso.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA01977; Mon, 2 Apr 90 18:07:12 -0500
Received: from wri.UUCP by uxc.cso.uiuc.edu with UUCP
	(5.61+/IDA-1.2.8) id AA08846; Mon, 2 Apr 90 17:26:17 -0500
Received: by WRI.com (3.2/SMI-3.0DEV3)
	id AA17550; Mon, 2 Apr 90 17:24:41 CDT
Date: Mon, 2 Apr 90 17:24:41 CDT
From: keiper@wri.UUCP (Jerry Keiper)
Message-Id: <9004022224.AA17550@WRI.com>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: SetPrecision[]
Status: RO


Jeffrey P. Golden <uiucuxc!ALLEGHENY.SCRC.Symbolics.COM!jpg> writes:
   >If the user types SetPrecision[1.2,30], I think it is pretty clear
   >that most users mean the same number that SetPrecision[12/10,30]
   >would mean, i.e. fill in with decimal 0's, which is not what
   >Mathematica does.

Since that sort of functionality is in general impossible, I presume that
the suggestion is only intended to make it more convenient to enter
numbers precisely.  But the 1.2 will have been converted to 1.001100110011...
long before SetPrecision[] ever even gets to look at it.  If the above
functionality is desired one can do something like

	HighPrecision[x_, n_] := SetPrecision[Rationalize[x], n]

then
In[9]:= HighPrecision[1.2,40]

Out[9]= 1.2
 
In[10]:= SetPrecision[%, 60]

Out[10]= 1.19999999999999999999999999999999999999999999999917892668106

But this will only work for numbers that are essentially rational numbers
with relatively small denominators with a small rounding error thrown in
to allow it to be represented in binary.

I do not think that overloading SetPrecision[] to have this functionality
is appropriate.

Jerry Keiper
keiper@wri.com
Wolfram Research Inc.

From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Apr  2 22:35:13 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02069; Mon, 2 Apr 90 22:35:12 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA28148; Mon, 2 Apr 90 22:30:08 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02054; Mon, 2 Apr 90 21:49:45 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02050; Mon, 2 Apr 90 21:49:43 -0500
Message-Id: <9004030249.AA02050@yoda.ncsa.uiuc.edu>
Date: Mon, 2 Apr 90 17:24:41 CDT
From: keiper@wri.UUCP (Jerry Keiper)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: SetPrecision[]
Status: RO


Jeffrey P. Golden <uiucuxc!ALLEGHENY.SCRC.Symbolics.COM!jpg> writes:
   >If the user types SetPrecision[1.2,30], I think it is pretty clear
   >that most users mean the same number that SetPrecision[12/10,30]
   >would mean, i.e. fill in with decimal 0's, which is not what
   >Mathematica does.

Since that sort of functionality is in general impossible, I presume that
the suggestion is only intended to make it more convenient to enter
numbers precisely.  But the 1.2 will have been converted to 1.001100110011...
long before SetPrecision[] ever even gets to look at it.  If the above
functionality is desired one can do something like

	HighPrecision[x_, n_] := SetPrecision[Rationalize[x], n]

then
In[9]:= HighPrecision[1.2,40]

Out[9]= 1.2
 
In[10]:= SetPrecision[%, 60]

Out[10]= 1.19999999999999999999999999999999999999999999999917892668106

But this will only work for numbers that are essentially rational numbers
with relatively small denominators with a small rounding error thrown in
to allow it to be represented in binary.

I do not think that overloading SetPrecision[] to have this functionality
is appropriate.

Jerry Keiper
keiper@wri.com
Wolfram Research Inc.


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Apr  2 23:38:07 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02106; Mon, 2 Apr 90 23:38:06 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA28299; Mon, 2 Apr 90 23:32:58 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02048; Mon, 2 Apr 90 21:49:01 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02044; Mon, 2 Apr 90 21:49:00 -0500
Message-Id: <9004030249.AA02044@yoda.ncsa.uiuc.edu>
Date: Mon, 2 Apr 90 16:18 EDT
From: Jeffrey P. Golden <jpg@ALLEGHENY.SCRC.Symbolics.COM>
Subject: precision and accuracy
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

    Date: Mon, 26 Mar 90 13:03:08 CST
    From: wri!keiper@yoda.ncsa.uiuc.edu (Jerry Keiper)
    
[...]
    
    As to increasing the precision of a number, Mathematica allows this to be
    done very simply using SetPrecision[] (likewise the accuracy can be
    increased with SetAccuracy[].)  y = SetPrecision[x, prec] gives y a value
    such that y == x is True and such that the precision of y is prec.  If the
    precision of y is greater than the precision of x the "missing" digits of x
    are filled in for y with 0's in binary.  This does not mean that they will
    appear as 0's in decimal however.  e.g. the decimal number 1.2 has a
    nonterminating binary expansion 1.0011001100110011001100...  Clearly if
    we start with a finite approximation to this and attach 0's in binary
    we will not get the decimal expansion for 1.200000000...  Since it is not
    possible to know what number a user has in mind when he wants to increase
    its precision it is not possible to give a better approximation; all that
    Mathematica can do is give another number with more digits in it.

If the user types SetPrecision[1.2,30], I think it is pretty clear that most
users mean the same number that SetPrecision[12/10,30] would mean, i.e. fill 
in with decimal 0's, which is not what Mathematica does.  
    
    As to relative and absolute error vs. precision and accuracy, precision
    is a nonnegative integer and accuracy is an integer.  Relative and absolute
    error are small numbers, sometimes complex, but they are never known exactly 
    (if they were the approximate answer could be corrected.)  I find it more 
    convenient to deal with an accuracy of 27 rather than an absolute error of 
    0.000000000000000000000000001, but perhaps not everyone does.

I think no one finds it convenient to deal with 0.000000000000000000000000001 .
That's why notations such as 1.0 10^-27 (or even 1.0e-27) were invented.  
(I can't tell whether you're trying to bias the situation or just so used to 
typing numbers such as 1.20000000000000000000000000000 to Mathematica to get 
the precision you need!-)


From shore@KRAMDEN.ACF.NYU.EDU Tue Apr  3 00:26:48 1990
Received: from KRAMDEN.ACF.NYU.EDU by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02830; Tue, 3 Apr 90 00:26:11 -0500
Received: by KRAMDEN.ACF.NYU.EDU (5.61/1.34)
	id AA29088; Tue, 3 Apr 90 01:26:28 -0400
Date: Tue, 3 Apr 90 01:26:28 -0400
From: shore@KRAMDEN.ACF.NYU.EDU (John Shore)
Message-Id: <9004030526.AA29088@KRAMDEN.ACF.NYU.EDU>
To: mathgroup-request@yoda.ncsa.uiuc.edu
Subject: please add me to your list
Status: RO


please add shore@kramden.acf.nyu.edu to your mailing list.
Thanks.

John Shore
New York University
CIMS Academic Computing Facility

From fateman@renoir.Berkeley.EDU Tue Apr  3 10:00:21 1990
Received: from renoir.Berkeley.EDU by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03009; Tue, 3 Apr 90 10:00:13 -0500
Received: by renoir.Berkeley.EDU (5.61/1.29)
	id AA01543; Tue, 3 Apr 90 07:59:17 -0700
Date: Tue, 3 Apr 90 07:59:17 -0700
From: fateman@renoir.Berkeley.EDU (Richard Fateman)
Message-Id: <9004031459.AA01543@renoir.Berkeley.EDU>
To: mathgroup@yoda.ncsa.uiuc.edu, keiper@wri.UUCP
Subject: Re: SetPrecision[]
Status: RO

Actually, SetPrecision[1.2,30] --> 1.2000000 <30 digits> IS possible,
and here's how.  Treat 1.2 as an input form, like  RealNumber[1,2].
Don't convert it to machine precision until you do arithmetic on
it.

This is a total hack, and only serves to maintain the mistaken illusion
that Mathematica does decimal arithmetic, and perpetuates the myth that
there is something inherently correct about decimal input or output
.... but, for example, I could easily put the hack above into my own
Mathematica-like parser written in Common Lisp.
 -- Richard Fateman

From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Apr  3 12:34:20 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03107; Tue, 3 Apr 90 12:34:19 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA09972; Tue, 3 Apr 90 12:29:09 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03073; Tue, 3 Apr 90 11:28:53 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03069; Tue, 3 Apr 90 11:28:51 -0500
Message-Id: <9004031628.AA03069@yoda.ncsa.uiuc.edu>
Date: Tue, 3 Apr 90 07:59:17 -0700
From: fateman@renoir.Berkeley.EDU (Richard Fateman)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: SetPrecision[]
Status: RO

Actually, SetPrecision[1.2,30] --> 1.2000000 <30 digits> IS possible,
and here's how.  Treat 1.2 as an input form, like  RealNumber[1,2].
Don't convert it to machine precision until you do arithmetic on
it.

This is a total hack, and only serves to maintain the mistaken illusion
that Mathematica does decimal arithmetic, and perpetuates the myth that
there is something inherently correct about decimal input or output
.... but, for example, I could easily put the hack above into my own
Mathematica-like parser written in Common Lisp.
 -- Richard Fateman


From jpg@ALLEGHENY.SCRC.Symbolics.COM Wed Apr  4 14:10:12 1990
Received: from [128.81.41.45] by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA04719; Wed, 4 Apr 90 14:10:08 -0500
Received: from SKUA.SCRC.Symbolics.COM by ALLEGHENY.SCRC.Symbolics.COM via CHAOS with CHAOS-MAIL id 180944; 4 Apr 90 15:08:42 EDT
Date: Wed, 4 Apr 90 15:08 EDT
From: Jeffrey P. Golden <jpg@ALLEGHENY.SCRC.Symbolics.COM>
Subject: Re: SetPrecision[]
To: fateman@renoir.Berkeley.EDU
Cc: mathgroup@yoda.ncsa.uiuc.edu
In-Reply-To: <9004031628.AA03069@yoda.ncsa.uiuc.edu>
Message-Id: <19900404190827.8.JPG@SKUA.SCRC.Symbolics.COM>
Status: RO

    Date: Tue, 3 Apr 90 07:59:17 -0700
    From: fateman@renoir.Berkeley.EDU (Richard Fateman)

    Actually, SetPrecision[1.2,30] --> 1.2000000 <30 digits> IS possible,
    and here's how.  Treat 1.2 as an input form, like  RealNumber[1,2].
    Don't convert it to machine precision until you do arithmetic on it.

    This is a total hack, and only serves to maintain the mistaken illusion
    that Mathematica does decimal arithmetic, and perpetuates the myth that
    there is something inherently correct about decimal input or output

There's no myth here.  There -is- something inherently correct (whatever 
that means) about decimal input or output - that's what most humans use 
most of the time.  We build mathematical systems not only so that Apples 
and Suns can exchange bytes, but so that humans can feel comfortable 
using them.  That SetPrecision[1.2,30] does not match most users' 
expectations for what should be in those 30 (decimal!) digits (decimal!) 
is just one example.  There are many such examples in all our computer 
mathematical systems.  That Mathematica converts 1.2 to a machine number 
too early to be useful for the job at hand may be an unfortunate fact of 
life for this undocumented (by the Mathematica book) function.

    .... but, for example, I could easily put the hack above into my own
    Mathematica-like parser written in Common Lisp.

From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Apr  7 02:08:29 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA01200; Sat, 7 Apr 90 02:08:28 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA21621; Sat, 7 Apr 90 02:03:54 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01173; Sat, 7 Apr 90 01:04:14 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01169; Sat, 7 Apr 90 01:04:12 -0500
Message-Id: <9004070604.AA01169@yoda.ncsa.uiuc.edu>
Date: Fri, 6 Apr 90 16:16:49 EDT
From: km@mathcs.emory.edu (Ken Mandelberg)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica Frontends
Status: RO


The promo on the Mathematica Journal says that frontends for versions
besides Mac and NeXT will be coming in the "near future".  Anyone know
what this refers to? A Sun fontend using X is on my wishlist!

km@mathcs.emory.edu (Ken Mandelberg)

From mcdonald@quark.UMD.EDU Tue Apr 10 11:12:47 1990
Received: from quark.umd.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA05399; Tue, 10 Apr 90 11:12:44 -0500
Received: by quark.UMD.EDU (5.57/Ultrix3.0-C)
	id AA06082; Tue, 10 Apr 90 12:14:05 EDT
Date: Tue, 10 Apr 90 12:14:05 EDT
From: mcdonald@quark.umd.edu (Bill MacDonald)
Message-Id: <9004101614.AA06082@quark.UMD.EDU>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Format of Real Numbers in Mathematica
Status: RO

Apropos Richard Fateman's complaint that Mathematica interprets 5.0 as being
uncertain to the range 4.5 to 5.4, I note that NumberForm[] insists in
printing an exact 0.5 in a table of the sine function as 0.5, dropping all
trailing zeroes, even when asked to output all numbers in the table to, say
5 decimal places.  This is very annoying when I want to produce a good looking
table, but it also is inconsistent with the assumption on INPUT that 0.5 has
one significant decimal figure.  I will also throw in my complaint that
Mathematica labels the tics on graph figures in a nonuniform way, for example,
as 1.5,2.,2.5,3. etc. when publication quality graphs require 1.5,2.0,2.5,3.0,
etc.  In short, Mathematica seems to be inconsistent in the way it relates
trailing zeros to precision, or accuracy, or whatever.

From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Apr 16 02:54:17 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA11135; Mon, 16 Apr 90 02:54:16 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA22199; Mon, 16 Apr 90 02:49:54 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10391; Sun, 15 Apr 90 22:54:18 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10387; Sun, 15 Apr 90 22:54:16 -0500
Message-Id: <9004160354.AA10387@yoda.ncsa.uiuc.edu>
Date: Fri, 13 Apr 90 16:05:23 PDT
From: lacomb@sierra.Stanford.EDU (Lloyd J. Lacomb)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica and printing on the PC
Status: RO

I not a member of this newsgroup so pardon my ignorance if this has
already be hashed out many times before.  I have Mathematica running on
an IBM PC-AT clone.  The only printers I have available are an HP
Laserjet and an HP Deskjet neither of which are able to print
the postscript file output by Mathematica.  Is there a piece of
software out there somewhere that will transcribe postscript files
to TIFF compatible files.  The program can be freeware, shareware,
commerical whatever.  Is some way to have Mathematica output something
other than postscript.  I can't imagine that I'm the only person
using an IBM so I'm hoping someone else has solved this problem.

I don't subscribe to the newsgroup so please respond to me at
lacomb@sierra.stanford.edu  (internet or bitnet)

Thanks in advance.

Lloyd
lacomb@sierra.stanford.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Apr 16 04:24:31 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA11209; Mon, 16 Apr 90 04:24:30 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA23533; Mon, 16 Apr 90 04:20:05 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10385; Sun, 15 Apr 90 22:53:49 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10381; Sun, 15 Apr 90 22:53:48 -0500
Message-Id: <9004160353.AA10381@yoda.ncsa.uiuc.edu>
Date: Fri, 13 Apr 90 18:01:33 EDT
From: Jack <jack@sun.udel.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Transformation Rules via AlgebraicRules
Status: RO


Can someone explain the following result.  I thought I would get the same 
result using rule1 and rule2 below.

     rule1 = x->t^(3/2)
     rule2 = AlgebraicRules[x==t^(3/2),{x,t}]

     exp = x^(5/4) + x + x^2 + x^3 + x^4

(1)     exp/.rule1
(2)     exp/.rule2



   (1) gives the desired result....

           3    15         9
           -    --         -
           2    8     3    2    6
Out[184]= t  + t   + t  + t  + t

while (2) gives


                                                    1
                                                    -
                    2    3    4                     4 5
General::newv: x + x  + x  + x  + `private`$AuxVar[x ]
        involves variables not among {x, `private`$AuxVar[Sqrt[t]], t}.

                             3
                             -
                             2
Replace::rep: {t -> t, x -> t } encountered where lhs->rhs expected.

etc.,etc.   





From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Apr 16 05:25:41 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA11258; Mon, 16 Apr 90 05:25:39 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA24308; Mon, 16 Apr 90 05:21:12 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10379; Sun, 15 Apr 90 22:53:16 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10375; Sun, 15 Apr 90 22:53:14 -0500
Message-Id: <9004160353.AA10375@yoda.ncsa.uiuc.edu>
Date: Fri, 13 Apr 90 21:08:59 JST
From: cai@icluna.kobe-u.ac.jp (Dong Sheng Cai)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: mathink. in NeXT
Status: RO


I have problem to use mathlink in NeXT (version 1.0). 
I want to link  my own C program to Mathematica and evaluate 
my program as if it were a build-in function.   
However, it is almost impossible for me to use mathlink in NeXT system and 
link my C program to Mathematica. 
I am using mathlink.c and mathlink.h which are 
stored in the Sources subdirectory 
of the main Mathematica directory, and my program is named sample.c.

Following  is what is happening in my NeXT.......


  |NeXT> math

  |Mathematica 1.2 (August 30, 1989) [With pre-loaded data]
  |by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
  |   S. Omohundro, D. Ballman and J. Keiper
  |with I. Rivin and D. Withoff
  |Copyright 1988,1989 Wolfram Research Inc.
  |
  |CallProcess::cppdied: Process sample has died.
  |
  |In[1]:= Quit
  |NeXT>

I also varied the Linking-options ( -l sys_s or -l NeXT_s ), 
but I cannot get expected result.  
My  Makefile for mathlink.c and sample.c are as follows:

  |CPATH=-c -bsd
  |LPATH= -lNeXT_s  # or -l sys_s
  |
  |sample: sample.o mathlink.o
  |	cc $(LPATH) -o sample sample.o mathlink.o
  |
  |sample.o: sample.c mathlink.h Makefile
  |	cc $(CPATH) sample.c
  |
  |mathlink.o: mathlink.c Makefile
  |	cc $(CPATH) mathlink.c

I also obtained  warning messages which I don't understand as follows: 


  |NeXT> make

  |cc -c -bsd sample.c
  |cc -c -bsd mathlink.c
  |mathlink.c: In function typelookup:
  |mathlink.c:166: warning: `typelookup' was declared implicitly `extern' 
  |and later `static'
  |mathlink.c: In function service_loop:
  |mathlink.c:178: warning: `service_loop' was declared implicitly `extern' and later
  | `static'
  |mathlink.c: In function rcvpkt:
  |mathlink.c:205: warning: `rcvpkt' was declared implicitly `extern' and later 
  |`static'
  |mathlink.c: In function sendbuf:
  |mathlink.c:215: warning: `sendbuf' was declared 
  |implicitly `extern' and later `static'
  |mathlink.c: In function sendpkt:
  |mathlink.c:235: warning: `sendpkt' was declared 
  |implicitly `extern' and later `static'
  |mathlink.c: In function docall:
  |mathlink.c:247: warning: `docall' was declared implicitly `extern' 
  |and later `static'   
  |mathlink.c: In function outtypename:
  |mathlink.c:533: warning: `outtypename' 
  |was declared implicitly `extern' and later `static'
  |cc -lsys_s -o sample sample.o mathlink.o
  |NeXT> 


   I also tried the same sample program appeared in the manual of the mathlink 
which I found in NeXT and I foundthat  the same error is happening. 
   Does anyone know how to use mathlink in NeXT?

                             D. Cai 


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Apr 16 05:25:41 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA11258; Mon, 16 Apr 90 05:25:39 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA24308; Mon, 16 Apr 90 05:21:12 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10379; Sun, 15 Apr 90 22:53:16 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA10375; Sun, 15 Apr 90 22:53:14 -0500
Message-Id: <9004160353.AA10375@yoda.ncsa.uiuc.edu>
Date: Fri, 13 Apr 90 21:08:59 JST
From: cai@icluna.kobe-u.ac.jp (Dong Sheng Cai)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: mathink. in NeXT
Status: RO


I have problem to use mathlink in NeXT (version 1.0). 
I want to link  my own C program to Mathematica and evaluate 
my program as if it were a build-in function.   
However, it is almost impossible for me to use mathlink in NeXT system and 
link my C program to Mathematica. 
I am using mathlink.c and mathlink.h which are 
stored in the Sources subdirectory 
of the main Mathematica directory, and my program is named sample.c.

Following  is what is happening in my NeXT.......


  |NeXT> math

  |Mathematica 1.2 (August 30, 1989) [With pre-loaded data]
  |by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
  |   S. Omohundro, D. Ballman and J. Keiper
  |with I. Rivin and D. Withoff
  |Copyright 1988,1989 Wolfram Research Inc.
  |
  |CallProcess::cppdied: Process sample has died.
  |
  |In[1]:= Quit
  |NeXT>

I also varied the Linking-options ( -l sys_s or -l NeXT_s ), 
but I cannot get expected result.  
My  Makefile for mathlink.c and sample.c are as follows:

  |CPATH=-c -bsd
  |LPATH= -lNeXT_s  # or -l sys_s
  |
  |sample: sample.o mathlink.o
  |	cc $(LPATH) -o sample sample.o mathlink.o
  |
  |sample.o: sample.c mathlink.h Makefile
  |	cc $(CPATH) sample.c
  |
  |mathlink.o: mathlink.c Makefile
  |	cc $(CPATH) mathlink.c

I also obtained  warning messages which I don't understand as follows: 


  |NeXT> make

  |cc -c -bsd sample.c
  |cc -c -bsd mathlink.c
  |mathlink.c: In function typelookup:
  |mathlink.c:166: warning: `typelookup' was declared implicitly `extern' 
  |and later `static'
  |mathlink.c: In function service_loop:
  |mathlink.c:178: warning: `service_loop' was declared implicitly `extern' and later
  | `static'
  |mathlink.c: In function rcvpkt:
  |mathlink.c:205: warning: `rcvpkt' was declared implicitly `extern' and later 
  |`static'
  |mathlink.c: In function sendbuf:
  |mathlink.c:215: warning: `sendbuf' was declared 
  |implicitly `extern' and later `static'
  |mathlink.c: In function sendpkt:
  |mathlink.c:235: warning: `sendpkt' was declared 
  |implicitly `extern' and later `static'
  |mathlink.c: In function docall:
  |mathlink.c:247: warning: `docall' was declared implicitly `extern' 
  |and later `static'   
  |mathlink.c: In function outtypename:
  |mathlink.c:533: warning: `outtypename' 
  |was declared implicitly `extern' and later `static'
  |cc -lsys_s -o sample sample.o mathlink.o
  |NeXT> 


   I also tried the same sample program appeared in the manual of the mathlink 
which I found in NeXT and I foundthat  the same error is happening. 
   Does anyone know how to use mathlink in NeXT?

                             D. Cai 


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Apr 17 14:13:48 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA12808; Tue, 17 Apr 90 14:13:47 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA08641; Tue, 17 Apr 90 14:08:57 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA12753; Tue, 17 Apr 90 13:03:05 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA12749; Tue, 17 Apr 90 13:03:03 -0500
Message-Id: <9004171803.AA12749@yoda.ncsa.uiuc.edu>
Subject: Trigonometry expansions
To: mathgroup@yoda.ncsa.uiuc.edu
Date: Tue, 17 Apr 90 7:38:24 PDT
From: Steven Warwick <sdw@hpsadsdw.hp.com>
Status: RO

Has anyone taken the time to define  trigonometric simplifications
of the form:

        Sin[ArcSin[x]]  -> x
        Sin[ArcTan[x/y]] ->  y/Sqrt[x^2+y^2]

               etc.

that can be added to the Algebra/trigonometry package???



--
Steven Warwick

Hewlett-Packard
sdw@hpsad


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Apr 17 15:18:49 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA12840; Tue, 17 Apr 90 15:18:46 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA10431; Tue, 17 Apr 90 15:13:40 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA12759; Tue, 17 Apr 90 13:03:39 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA12755; Tue, 17 Apr 90 13:03:36 -0500
Message-Id: <9004171803.AA12755@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Math mode for GNU Emacs
Date: Tue, 17 Apr 90 10:59:20 PDT
From: jacobson@cello.hpl.hp.com
Status: RO

Here is a GNU Emacs package for use with Mathematica.  
Its main features are:  

  * Editing of multi-line "cells" before submission.
  * Limited error checking before submission
  * Copying of earlier cells by name or by pointing.
  * Go to the point of an error in a .m file.
  * On-line help
  * Symbol completion
  * Interrupts

Installation: Copy the stuff below the ======== line below to math.el
in whatever directory you put emacs-lisp stuff in.  (If you don't
know, type go to the *scratch* buffer, type load-path C-u C-x C-e.  If
none of those directories are writable by you, ask an emacs expert to
make you directory for your own private emacs stuff.)  

Check the $Path variable of your version of Mathematica.  Edit the
Mathematica-search-path variable, which is set in the 3rd line beyond
the legalese (or just make make sure it is set before loading this) to
match.  Use nil for the current working directory.  Also make sure
that the emacs variable math-process-string (just below
Mathematica-search-path) reflects the location of Mathematica on your
system.  

When you want to use math-mode, first type M-x load-library RET math RET

After loading, type M-x math to start a copy of Mathematica.  Edit an
input cell using normal editing commands, the submit with ESC-RET.

If Mathematica detects a syntax error, it will be indicated with
"^--error".  Fix the error, cut out the "^--error", and resubmit.  

You can complete Mathematica symbols, in both the working buffer and
in other math-mode buffers,  with ESC-TAB.  Do not try this when Mathematica 
is busy or chaos will result.

You can get help on Mathematica symbols, in both the working buffer
and in other math-mode buffers, with C-h e or C-h E (the latter is
more verbose).  Again, don't try this when Mathematica is busy.  HP
users, please note that C-h and DEL are usually reversed in most GNU
Emacs installations.

You can copy cells to the end of the buffer with C-c C-y.  It will ask
for what cell you want in the minibuffer.

  <nn> 		copies cell number <nn>
  <empty> 	copies the previous In cell if the cursor is after the
		last In[..], otherwise copies the cell the cursor is in.
		This latter case will copy an In cell, an Out cell containing
		no blank lines (especially useful with InputForm), or 
		just any block of text.  This also works from any math-mode 
		buffer, but copies to the math process buffer (one
		with an active Mathematica process--normally *math*, but 
		it be changed with set-math-process-buffer).

With a prefix arg, the <nn> option will back over incarnation
boundaries of Mathematica.  See the on-line help for math-copy-cell
for more info.

C-c C-c interrupts Mathematica (as well is it can be interrupted).
When it gives you the prompt, type your response followed by ESC-RET.

C-c 9 is equivalent to kill -9 <Mathematica process number>.

If you have read in a .m file with "<<", and have gotten 
a response of the form

	"<filename>: <lineno>: syntax error in ..."

you can go directly to the point of the error by typing C-c C-e.
This is very useful because the line numbers are almost always wrong.
This function counts lines the way Mathematica does.  (There are reports
of this not working with older versions of Emacs.)

C-h e, C-h E, (help commands), and ESC-TAB (math-complete-symbol)
depend on a running Mathematica process.  C-c C-y affects a buffer
expected to have a running Mathematica process.  These commands can
all be used from a buffer that does not have a running Mathematica
process, in which case they affect a buffer that does.  The default is
*math*, the buffer created by the math command, but the buffer can be
changed with M-x set-math-process-buffer.  Different buffers can have
different associated math process buffers.

Bugs/limitations: 
If the input is does not form a complete statement, Mathematica
may hang waiting for more input.  If this happens, type a RET to add a
blank line, then ESC-RET to send an empty cell, which will clear
Mathematica's input buffer.  Cut away the new prompt, fix the cell and
resubmit.  Do not just fix the input and hit ESC-RET, as Mathematica
will get the concatenation of both the first submission and the second.  
(You can demonstrate incomplete statements on the input "5+".)

If you change Mathematica's $Path variable, C-c C-e may be unable to
find the file (or may find the wrong file).  A solution short of
changing the Mathematica-search-path variable (using M-x set-variable)
is to visit the file, then use M-x goto-matherr-line.

The code that locates errors after typing ESC-RET depends on certain
output being delevered from the process in complete chunks.  Emacs
documentation explicitly forbids relying on this property.  Therefore
this feature may be unreliable or non-portable.

Fancy installation:

You can avoid having to explicitly load the math package by putting
the following lines in your .emacs file

(autoload 'math "math" "Starts Mathematica in a separate buffer" t)
(autoload 'math-mode  "math" "A mode for running Mathematica or
editing Mathematica source files." t)
(autoload 'start-math "math" "Starts Mathematica in the current
buffer" t)
(setq auto-mode-alist (cons '("\\.m$" . math-mode) auto-mode-alist))

Math-mode will run faster if you "byte-compile" it.  Type M-x
byte-compile-file math.el (make sure the directory is right).  

Enjoy,
  -- David Jacobson
================================
;; math.el, a mode package for Mathematica.  
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Copyright (c) 1990 Hewlett-Packard Company, all rights reserved.
;; 
;;                             LEGAL NOTICE
;; 
;; This math-mode package is experimental and HP shall have no obligation to
;; maintain or support it.  HP makes no express or implied warranty of any
;; kind with respect to this software, and HP shall not be liable for any
;; direct, indirect, special, incidental or consequential damages (whether
;; based on contract, tort or any other legal theory) arising in any way from
;; use of the software.
;; 
;; Everyone is granted permission to copy, modify and redistribute this
;; math-mode package, provided:
;;  1.  All copies contain this copyright notice.
;;  2.  All modified copies shall carry a prominant notice stating who
;;      made the last modification and the date of such modification.
;;  3.  No charge is made for this software or works derived from it.  
;;      This clause shall not be construed as constraining other software
;;      distributed on the same medium as this software, nor is a
;;      distribution fee considered a charge.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Portions of this package were adapted from GNU Emacs.
;;
;; Copyright (C) 1985, 1986, 1987, 1988 Free Software Foundation, Inc. 
;; 
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY.  No author or distributor
;; accepts responsibility to anyone for the consequences of using it
;; or for whether it serves any particular purpose or works at all,
;; unless he says so in writing.  Refer to the GNU Emacs General Public
;; License for full details.

;; Everyone is granted permission to copy, modify and redistribute
;; GNU Emacs, but only under the conditions described in the
;; GNU Emacs General Public License.   A copy of this license is
;; supposed to have been given to you along with GNU Emacs so you
;; can know your rights and responsibilities.  It should be in a
;; file named COPYING.  Among other things, the copyright notice
;; and this notice must be preserved on all copies.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;	Author: David Jacobson, jacobson@hplabs.hp.com
;;      Experimental version of April 10, 1990
;;      Assumes GNU Emacs version 18.54
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(require 'shell)

(defvar Mathematica-search-path 
  (list nil (getenv "HOME") "/usr/local/math/Init" "/usr/local/math/Packages")
  "*A list of directories in which to look for files.  
Use nil for the current directory.")

(defconst math-process-string "/usr/local/bin/math"
  "A string to pass to the unix exec function to start Mathematica")

(defvar math-process-buffer 
  "*math*"
  "The buffer normally running Mathematica.  Certain commands
(e.g. math-complete-symbol) will go to this buffer to find a Mathematica 
process.  This can be locally set with set-math-process-buffer.")

(defconst math-header-re (concat "^" (regexp-quote "by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,"))
  "A regexp that will match somewhere in the Mathematica preamble")
						   

(defvar math-mode-map nil) 

;;; deep-copy-keymap was written by Daniel LaLiberte.
;;; Some GNU Emacs systems already have this installed.  If so
;;; comment out this function definition.

(defun deep-copy-keymap (keymap)
  "Return a deep copy of KEYMAP.  That is, all levels are copied,
not just the top level."
  (if (not (keymapp keymap))
      keymap
    (cond

     ((listp keymap)
      (let ((new-keymap (copy-alist keymap)))
	(setq keymap (cdr new-keymap))
	(while keymap
	  (let ((binding (car keymap)))
	    (if (keymapp (cdr binding))
		(setcdr binding (deep-copy-keymap (cdr binding))))
	    )
	  (setq keymap (cdr keymap))
	  )
	new-keymap
	))

      ((vectorp keymap)
       (let ((i 0)
	     (n (length keymap))
	     (new-keymap (copy-sequence keymap)))
	 (while (< i n)
	   (if (keymapp (aref keymap i))
	       (aset new-keymap i (deep-copy-keymap (aref keymap i))))
	   (setq i (1+ i)))
	 new-keymap
	 )))))


(if math-mode-map
    nil
  (setq math-mode-map (deep-copy-keymap shell-mode-map))
  (define-key math-mode-map "\C-m" 'newline) ; the global keymap maps to newline
  (define-key math-mode-map "\e\C-m" 'math-send-input)
  ;; \C-c\C-c is set to interrupt-shell-subjob in the shell-mode-mode
  ;; The name is deceptive; it sends a SIGINT signal (control C) to 
  ;; whatever process is running in the current buffer
  (define-key math-mode-map "\C-c9" 'kill-9-process)
  (define-key math-mode-map "\C-c\C-h"   'math-help); buffer specific C-h
  (define-key math-mode-map "\C-he" 'math-help) ; e-xpression in help menu
  (define-key math-mode-map "\C-hE" 'math-extra-help) ; E-xpression in help menu
  (define-key math-mode-map "\e\t"   'math-complete-symbol)
  (define-key math-mode-map "\C-c\C-y" 'math-copy-cell)
  (define-key math-mode-map "\C-c\C-e" 'find-math-error)
  (define-key math-mode-map "\C-c\C-r" 'math-isearch-backward))

(defvar math-mode-syntax-table nil
  "Syntax table used while in math mode.")

(if math-mode-syntax-table
    ()
  (setq math-mode-syntax-table (make-syntax-table))
  (modify-syntax-entry ?% "." math-mode-syntax-table)
  (modify-syntax-entry ?& "." math-mode-syntax-table)
  (modify-syntax-entry ?* ". 23" math-mode-syntax-table) ;allow for (* comment *)
  (modify-syntax-entry ?+ "." math-mode-syntax-table)
  (modify-syntax-entry ?- "." math-mode-syntax-table)
  (modify-syntax-entry ?/ "." math-mode-syntax-table)
  (modify-syntax-entry ?< "." math-mode-syntax-table)
  (modify-syntax-entry ?= "." math-mode-syntax-table)
  (modify-syntax-entry ?> "." math-mode-syntax-table)
  (modify-syntax-entry ?_ "." math-mode-syntax-table)
  (modify-syntax-entry ?\| "." math-mode-syntax-table)
  (modify-syntax-entry ?\` "_" math-mode-syntax-table) ; Mathematica context symbol
  (modify-syntax-entry ?\( "()1" math-mode-syntax-table) ;allow for (* comment *)
  (modify-syntax-entry ?\) ")(4" math-mode-syntax-table)) ;allow for (* comment *)

;;; math-send-input sends a chunk of text to Mathematica.  It
;;; interacts tightly with math-send-filter using the buffer-specific
;;; variable math-send-state and synchronizes though sending output
;;; and the accept-process-output (but see below) command.  

;;; The Emacs documentation
;;; claims that one cannot be sure how much output will be delivered
;;; in a chunk to the output filter.  However we depend on chunks of
;;; up to one line after which Mathematica immediately does a read,
;;; arriving in a single chunk.  A slightly more robust technique than
;;; doing string-match on the input string would be to put the input 
;;; into the buffer and match there.  

;;; If the Mathematica process does not send a prompt at all, the
;;; accept-process-output hangs and the only solution is to kill the
;;; mathexe process or Emacs.  This can happen if you use an Input[""]
;;; (a rather perverse thing to do).  An alternative is to replace
;;; (accept-process-output process) with (sleep-for 10).  It appears that
;;; arrival of any output causes Emacs to pop immediately out of a
;;; sleep-for.  But this could mess up if you have more than one active
;;; process running at a time or if you strke a key.  
;;; Of course, we could use a while loop and have the filter set 
;;; math-send-state to another value when it has actually gotten 
;;; something.  I tried this but ran into unknown trouble and have 
;;; not followed up on it.

;;; The variable math-send-state has the following interpretatons:
;;; non-last-line             We are in the middle of sending a
;;;                           multi-line input.  Watch for
;;;                           errors and output other than indent
;;;                           cookies.
;;;
;;; last-line                 The last line has been sent, still watch
;;;                           for syntax error messages.  Also insert
;;;                           a blank like (and warn about it) if the
;;;                           output contained any non-whitespace
;;;                           characters before a newline.
;;;               
;;; throw-away-prompt         A syntax error has been detected and a 
;;;                           newline sent to Mathematica to flush its
;;;                           input buffer.  Normally it will come
;;;                           back with a new prompt.  If the next
;;;                           input looks like a prompt, throw it
;;;                           away and give a syntax error message.
;;;                           Otherwise display that discarded
;;;                           material as a warning.
;;;
;;; normal                    Just post the output.  Actually I think
;;;                           everything that sets the mode to normal
;;;                           also sets the filter to nil, so this is
;;;                           hardly used.  (But see the exit clause of 
;;;                           the unwind-protect.)


(defun math-send-input ()
  "Send input to Mathematica.
At end of buffer, sends last \"cell\" to Mathematica.  When not at end, 
copies current \"cell\" to the end of the buffer and sends it.  Also
sends input for interrupt and Input[].  Warning: A multi-line input
to Input[\"\"] will cause deadlock."
  (interactive "*")
  (let ((process (or (get-buffer-process (current-buffer))
		     (error "Current buffer has no process")))
	bpt2
	ept2
	begpkt
	endpkt
	copy
	)
    ;; Find beginning of "cell"
    (let* ((cellinfo (math-identify-cell (point) (process-mark process)))
	   (bpt (car cellinfo))
	   (ept (nth 1 cellinfo))
	   )
      (check-math-syntax bpt ept)
      (goto-char ept)
      ;; Move to line beyond cell, adding newline if necessary.
      (forward-line 1)
      (if (or (not (bolp)) 
	      (= (point) bpt)) ; make null cells contain a newline
	  (newline))
      (setq copy (buffer-substring bpt (point)))
      ;; If we are \"near\" the end of the buffer, we don't copy the data down
      ;; there, but we kill excess white space.  Otherwise, we go there and 
      ;; copy the data.
      (if (looking-at "\\s *\\'")
	  (progn
	    (replace-match "")
	    (setq bpt2 bpt)
	    (setq ept2 (point)))
	(goto-char (point-max))
	(forward-line 0)
	(if (or (eolp) (looking-at "^In\\[[0-9]+\\]:=\\s *$"))
	    (end-of-line)
	  (end-of-line)
	  (newline))
	(setq bpt2 (point))
	(insert copy)
	(setq ept2 (point)))
      (goto-char bpt2)
      ;; indentstring is a global variable
      ;; indentstring is a the string Mathematica would have indented
      ;; the user's start point by if we were talking to it directly.
      (setq math-indent-string "")
      (set-process-filter process 'math-send-filter)
      ;; math-send-state is a global variable
      (setq math-send-state 'non-last-line)
      (setq begpkt bpt2) ; point
      (message "*")
      (unwind-protect
	  (while (eq math-send-state 'non-last-line)
	    (goto-char begpkt)
	    (forward-line 1)
	    (setq endpkt (point))
	    (if (= endpkt ept2) (setq math-send-state 'last-line))
	    (metered-process-send-string 
	     process (buffer-substring begpkt endpkt))
	    (if (eq math-send-state 'non-last-line)
		;; See discussion above.  
		(accept-process-output process)
		;;(sleep-for 10)
	      )
	    (cond ((eq math-send-state 'premature-output)
		   (setq math-send-state 'normal) ; for sake of unwind protect
		   (set-process-filter process nil)
		   (error "Unexpected output; part of cell discarded"))
		  )
	    (setq begpkt endpkt) ; advance to next line
	    ) ; end while
	;; unwind protect tail
	(if (memq math-send-state '(last-line normal))
	    ()
	  (set-process-filter process nil))))))

      

(defun math-send-filter (proc string)
  (let ((cbuf (current-buffer))
	(save-match-data (match-data)))
    (unwind-protect
	(progn
	  (set-buffer (process-buffer proc))
	  (cond 
	   ;; a <retype-line error>
	   ((and
	     (memq math-send-state '(non-last-line last-line))
	     (string-match "\\`\\([ \t]*\\)\\^ <retype line>" string))
	    (let ((tpt (point))
		  error-column
		  indent-column
		  (tail-string (substring string (match-end 0))))
	      (goto-char tpt)
	      (insert (substring string 0 (match-end 1)))
	      (setq error-column (current-column))
	      (delete-region tpt (point))
	      (insert math-indent-string)
	      (setq indent-column (current-column))
	      (delete-region tpt (point))
	      (indent-to-column (- error-column indent-column))
	      (insert "^--error\n")
	      (backward-char 9)
	      (previous-line 1)
	      ;; Display any unexpected output.  I don't know how to 
	      ;; test this code.
	      (if (string-match "\\S " tail-string)
		  (save-excursion
		    (goto-char (point-max))
		    (insert tail-string))))  ; end of let
	    (setq math-send-state 'throw-away-prompt)
	    (message "Syntax error") ; live dangerously here, but sometimes we 
					; don't get a prompt back from 
					; Mathematica
	    (process-send-string proc "\n"))
	   ;; snarf up indent strings
	   ((and
	     (eq math-send-state 'non-last-line)
	     (string-match "\\`[ \t]+\\'" string))
	    (setq math-indent-string string))
	   ;; unexpected output
	   ((eq math-send-state 'non-last-line)
	    (insert 
"-------- Unexpected output appeared here; rest of cell not sent --------\n"
)
	    (goto-char (point-max))
	    (insert string)
	    (set-marker (process-mark proc) (point))
	    (setq math-send-state 'premature-output)
	    (message ""))
	   ;; throw away unwanted prompt
	   ((eq math-send-state 'throw-away-prompt)
	     (setq math-send-state 'normal)
	     (set-process-filter proc nil)
	     (if (string-match "\\`In\\[[0-9]+\\]:= \\'" string)
		 (message "Syntax error")
	       (message "Syntax error, discarding prompt(?): %s" string)))
	   ((eq math-send-state 'last-line)
	    (goto-char (point-max))
	    (cond ((and (string-match "\\`[ \t]*\\S " string)
			(not (string-match "\\`In\\[[0-9]+\\]:=" string)))
		   (newline)
		   (insert string)
		   (set-marker (process-mark proc) (point))
		   (setq math-send-state 'normal)
		   (message "newline inserted by Emacs' math-mode"))
		  ((string-match "\\`[ \t]*\n" string)
		   (setq math-send-state 'normal)
		   (insert string)
		   (set-marker (process-mark proc) (point))
		   (message ""))
		  ((string-match "\\S " string)
		   (insert string)
		   (set-marker (process-mark proc) (point))
		   (message ""))
		  (t ; just white space
		   (insert string)
		   (message 
		    "Incomplete cell?  (Clear with RET ESC RET)"))))
	   (t
	    (setq math-send-state 'normal)
	    (goto-char (point-max))
	    (insert string)
	    (set-marker (process-mark proc) (point))) 
	
	   ))  ; finishes up cond and progn
      ;; safely exit the filter
      (set-buffer cbuf)
      (store-match-data save-match-data))))

(defun math-mode ()
  "Major mode for interacting with Mathematica and editing .m files.
\\[math] starts Mathematica.

\\[math-send-input] tries to identify stuff following last \"In[...]:=
\" or blank line or the last output and sends it.  To clear out
Mathmatica after an error occurs, move point two lines below last
printing character and type \\[math-send-input].  Warning: do not
use Input[\"\"], and type in a mult-line reply; deadlock results.

\\[math-help] gives help on a Mathematica symbol.  
\\[math-extra-help] or C-u \\[math-help] gives more verbose help.

\\[math-complete-symbol] will complete the symbol near point.

\\[math-copy-cell] will copy a previous cell to the end of the buffer.
See its description for details.

\\[math-isearch-backward] does a backward regexp i-search, 
initialized to find In[...].

\\[find-math-error] when typed after <<filename has returned a
syntax error will goto the error.  (Depends on Mathematica-search-path.)

\\[goto-matherr-line] will go to the specificied line, with lines
counted as Mathematica does.  For use in .m files.

\\[interrupt-shell-subjob] interrupts Mathematica.
\\[kill-9-process] kills (-9) the Mathematica process.

\\[start-math] starts a Mathematica process in the current buffer.

Most entries from the Emacs' shell mode are available as well.

If you are not in a buffer running Mathematica, \\[math-help], \\[math-extra-help], 
\\[math-complete-symbol], and \\[math-copy-cell] use or copy to the 
buffer *math*.  \\[math-help], \\[math-extra-help], and \\[math-complete-symbol]
all send input to Mathematica: chaos may ensue if you do this while Mathmatica
is busy with other work---no check is made.  You can change the buffer/process
these commands use with \\[set-math-process-buffer].

Entry to this mode calls the value of math-mode-hook with no args,
if that value is non-nil."


  (interactive)
  (kill-all-local-variables)
  (setq major-mode 'math-mode)
  (setq mode-name "Mathematica")
  (setq mode-line-process '(": %s"))
  (use-local-map math-mode-map)
  (set-syntax-table math-mode-syntax-table)
  (make-local-variable 'parse-sexp-ignore-comment)
  (setq parse-sexp-ignore-comment t)
  (make-local-variable 'math-indent-string)
  (make-local-variable 'math-send-state)
  (setq math-send-state 'normal)
  (make-local-variable 'doing-math-complete-symbol)
  (setq doing-math-complete-symbol nil)
  (run-hooks 'math-mode-hook))


(defun math ()
  "Run Mathematica, input and output via buffer *math*."
  (interactive)
  (pop-to-buffer (start-buffer-process
		  "*math*" "math" math-process-string
		  nil))
  (math-mode)
  ;; We don't make this one local.  That way if the
  ;; user changes the name of the buffer, say by writing
  ;; it to a file, math-process-buffer still points
  ;; to the right place.
  (setq math-process-buffer (current-buffer)))

(defun start-math ()
  "Starts a Mathematica process in the current buffer."
  (interactive "*")
  (start-buffer-process (current-buffer) "math" math-process-string
			nil)
  (math-mode)
  (make-local-variable 'math-process-buffer)
  (setq math-process-buffer (current-buffer)))


(defun math-complete-symbol ()
  "Complete the symbol preceeding point."
  (interactive "*")
  (let ((process (get-buffer-process math-process-buffer))
	sent-successfully)
    (if	(not (and process (memq (process-status process) '(run stop))))
	(error "No math process running in buffer %s" math-process-buffer))
    (setq math-completion-symbol (math-symbol-around-point))
    (unwind-protect
	(let ((cbuf (current-buffer)))
	  (set-buffer (get-buffer-create " Mathwork"))
	  (erase-buffer)
	  (set-buffer cbuf)
	  (setq doing-math-complete-symbol t)
	  (set-process-filter process 'math-help-filter)
	  (process-send-string process (concat 
"Scan[Print,Names[\"" math-completion-symbol "**\"]];Out[--$Line];\n"))
	  (setq sent-successfully t))
      (if (not sent-successfully)
	  (progn
	    (setq doing-math-complete-symbol nil)
	    (set-process-filter process nil))))))
	   
		      
(defun math-symbol-around-point ()
 "Return the symbol around the point as a string."
 (save-excursion
   (let (beg)
     (if (not (eobp)) (forward-char 1))
     (re-search-backward "\\w\\|\\s_")
     (forward-char 1)
     (backward-sexp)
     (setq beg (point))
     (forward-sexp)
     (buffer-substring beg (point)))))

(defun math-extra-help () 
  "Like math-help with a prefix arg"
  (interactive)
  (let ((current-prefix-arg (list 1))
	(prefix-arg (list 1)))          ; I'm hacking.  
					; current-prefix-arg makes M-X ... work
                                        ; prefix-arg makes it work when bound to a key
					; I'm sure RMS had something else in mind.
    (call-interactively 'math-help)))

(defun math-help (symbol arg)
  "Display what Mathematica knows about SYMBOL.  
With prefix arg (2nd arg when called from a program) it gives more info."
  (interactive  ; read a word, using the word around point as the default
   (let ((enable-recursive-minibuffers t)
	 (try-word (math-symbol-around-point))
	 val)
     (if (string-equal try-word "")
	 (setq val (read-string "Mathematica symbol: "))
       (setq val (read-string (format "Mathematica symbol (default %s): "
				      try-word)))
       (if (string-equal val "")
	   (setq val try-word)))
     (if (string-equal val "")
	 (error "No symbol read"))
     (list val current-prefix-arg)))
  (let ((process (get-buffer-process math-process-buffer))
	sent-successfully)
    (if	(not (and process (memq (process-status process) '(run stop))))
      (error "No math process running in buffer %s" math-process-buffer))
    (unwind-protect
	(progn
	  (with-output-to-temp-buffer "*Help*"
	    (print-help-return-message))
	  (set-process-filter process 'math-help-filter)
	  (process-send-string process (concat (if arg "??" "?") symbol "\n"))
	  (setq sent-successfully t))
      (if (not sent-successfully) (set-process-filter process nil)))))


(defun math-help-filter (proc string)
  (let ((cbuf (current-buffer))
	(save-match-data (match-data))
	(local-doing-math-complete-symbol doing-math-complete-symbol))
    ;; doing-math-complete-symbol is buffer-local and we are going
    ;; to switch buffers.
    (unwind-protect
	(progn
	  (if local-doing-math-complete-symbol
	      (set-buffer " Mathwork")
	    (set-buffer "*Help*"))
	  (goto-char (point-max))
	  (insert string)
	  (beginning-of-line)
	  (if (looking-at "^In\\[[0-9]+\\]:=")
	      (progn
		(delete-region (point) (point-max))
		(bury-buffer (current-buffer))
		(set-process-filter proc nil)
		(if local-doing-math-complete-symbol
		    (progn
		      (set-buffer cbuf)
		      ;; we are back to the original buffer, so this is ok
		      (setq doing-math-complete-symbol nil)
		      (insert (get-math-completion math-completion-symbol)))
		  (goto-char (point-min))))))
      (set-buffer cbuf)
      (store-match-data save-match-data))))

(defun check-math-syntax (pmin pmax)
  "Checks for balanced parens and lack of valid prefix.
Mathematica will misbehave if there exists a prefix of a cell such that
the prefix ends in a newline and forms a valid mathematica expresssion.
This function causes an error if that is the case.  If that is ok it checks 
that the whole expression has balanced parens, comments and quotes.  It is
not perfect at these checks since GNU Emacs does not understand nested
comments.  Also it only checks that the nesting level of all paren constructs
is zero at the end, not that they really match."
  (interactive "r")
  (let ((pt (point))
	possibleerr)
    (save-restriction
      (narrow-to-region pmin pmax)
      (goto-char pmin)
      (while (and (not possibleerr)
		  (not (eobp)))
	(end-of-line)
	(let ((parsestate (parse-partial-sexp (point-min) (point))))
	  (if (not (looking-at "\\s *\\'")) ; not just all white space to eob
	      (progn      ; make sure this could NOT end a valid expression
		(if (and
		     (= (nth 0 parsestate) 0) ; zero paren depth
		     (not (nth 3 parsestate)) ; not in a string
		     (not (nth 4 parsestate)) ; not in a comment
		     (progn
		       (forward-line 0)
		       (looking-at  ; last symbol could be end of number or symbol or
					; right delim or postfix op
			".*\\([])}\"A-Za-z0-9!_'.]\\|\\+\\+\\|--\\|[^/];\\|\\.\\.\\)[ \t]*$")))
		    ;; might confuse mathematics
		    (progn
		      (setq possibleerr 
			    "Possible complete statement before end, submit anyway? ")
		      (end-of-line))))
	    ;; we are at the end of the statement
	    (cond ((nth 3 parsestate)
		   (setq possibleerr
			 "Apparently unterminated string, submit anyway? "))
		  ((nth 4 parsestate)
		   (setq possibleerr 
			 "Apparently unclosed comment, submit anyway? "))
		  ((not (zerop (nth 0 parsestate)))
		   (setq possibleerr
			 "Apparently mismatched parens, submit anyway? "))))
	  (if (not possibleerr) (forward-line 1)))))
    (if (and possibleerr (not (y-or-n-p possibleerr)))
	(error "Cancelled")
      (goto-char pt))))


(defun start-buffer-process (bufferid procname program &optional startfile &rest switches)
  ;; A munged version of make-shell
  ;; bufferid can be a buffer or the name of a buffer
  (let ((buffer (get-buffer-create bufferid))
	proc status size)
    (setq proc (get-buffer-process buffer))
    (if proc (setq status (process-status proc)))
    (save-excursion
      (set-buffer buffer)
      ;;    (setq size (buffer-size))
      (if (memq status '(run stop))
	  nil
	(if proc (delete-process proc))
	(message "Starting Mathematica...")
	(setq proc (apply 'start-process procname buffer
			  (concat exec-directory "env")
			  (format "TERMCAP=emacs:co#%d:tc=unknown:"
				  (screen-width))
			  "TERM=emacs"
			  "EMACS=t"
			  "-"
			  (or program explicit-shell-file-name
			      (getenv "ESHELL")
			      (getenv "SHELL")
			      "/bin/sh")
			  switches))
	(cond (startfile
	       ;;This is guaranteed to wait long enough
	       ;;but has bad results if the shell does not prompt at all
	       ;;	     (while (= size (buffer-size))
	       ;;	       (sleep-for 1))
	       ;;I hope 1 second is enough!
	       (sleep-for 1)
	       (goto-char (point-max))
	       (insert-file-contents startfile)
	       (setq startfile (buffer-substring (point) (point-max)))
	       (delete-region (point) (point-max))
	       (process-send-string proc startfile)))
	(setq procname (process-name proc)))  ; what in the world is this for?
      (goto-char (point-max))
      (set-marker (process-mark proc) (point))
      (shell-mode))
    buffer))

(defun backward-incarnations (inc)
  "Moves back ARG incarnations of Mathematica, as recognized
by math-header-re."
  (if inc
      (let ((count (cond ((numberp inc) inc)
			 ((equal inc '(4)) 1)
			 ((equal inc '(16)) 2)
			 ((equal inc '(64)) 3)
			 ((equal inc '(256)) 4)
			 ((equal inc '(1024)) 5)
			 (t (error "I'm too lazy to count that many prefix keys")))))
		(re-search-backward math-header-re nil nil count))))

(defun math-copy-cell (numberstring incarnations pt)
  "Copies the cell beginning In[<CELLNUMBER>] to the end of the buffer.  
With CELLNUMBER of empty string and point at or after last In[...]:= 
copies previous In cell to end of buffer.  With point before last In[...]:= 
copies cell near point (In, Out, or just a block of text) to end of buffer.  
With an explicit CELLNUMBER, a prefix arg will skip back prefix arg 
incarnations before searching for In[<CELLNUMBER>].  C-u's count in unary.  
When called from a program, CELLNUMBER must be a string, second arg is 
INCARNATIONS back and third is POINT to begin search at."
  (interactive "*sCell number (default is cell near point):  \nP\nd")
  (cond  ((zerop (length numberstring))
	  (goto-char (point-max))
	  (if (and
	       (re-search-backward "^In\\[[0-9]+\\]:=" nil t)
	       (>= pt (point)))
	      (progn
		(re-search-backward "^In\\[[0-9]+\\]:=") ; back up to previous one
		(while (and (not (bobp))
			      (or (looking-at ; reject ones without any useful text 
				   "^In\\[[0-9]+\\]:=\\s *\\(\\'\\|\n\\s *$\\)")))
		  (re-search-backward "^In\\[[0-9]+\\]:=")))
	    (goto-char pt))) ; do current cell
	 (t
	  (goto-char (point-max))
	  (backward-incarnations incarnations)
	  (re-search-backward (concat "^In\\[" numberstring "\\]:="))))
  (if (interactive-p) (push-mark))
  (let* ((cellinfo (math-identify-cell (point) nil t))
	 (copy (buffer-substring (car cellinfo) (nth 1 cellinfo))))
    (if (not (equal (get-buffer math-process-buffer)
		    (current-buffer)))
	(pop-to-buffer math-process-buffer))
    (goto-char (point-max))
    (re-search-backward "\\S ")
    (forward-line 0)
    (if (looking-at "^In\\[[0-9]+\\]:=\\s *$")
	(end-of-line)
      (goto-char (point-max)))
    (insert copy)))

(defun math-isearch-backward ()
  "Does a backward regexp i-search, initialized to find In[...]:="
  (interactive)
  (setq search-last-regexp "^In\\[[0-9]+\\]:=\\s *")
  (setq unread-command-char search-reverse-char)
  (isearch-backward-regexp))

(defun math-identify-cell (pt &optional procmark out-ok)
  "Finds cell around POS. 
Optional second arg PROCMARK (normally the process-mark) will bound the 
search if the boundary otherwise would be a blank line (or the 
beginning of the buffer) and POS >= PROCMARK. Optional 3rd arg OUT-OK
will allow acceptance of Out cells as well as In cells. Returns a list of
the buffer position of the beginning and end of the cell."
  (save-excursion
    (goto-char pt)
    ;; back up at most one blank line looking for input
    (end-of-line)
    (re-search-backward  
     (if out-ok
	 "\\(^In\\[[0-9]+\\]:= ?\\)\\|\\(^\\s *\n\\)\\|\\(^Out\\[[0-9]+\\]\\(//[^=]*\\)?= ?\\)"
       "\\(^In\\[[0-9]+\\]:= ?\\)\\|\\(^\\s *\n\\)") nil 1)
    (goto-char (cond ((match-end 1))
		     ((and out-ok (match-end 3)))
		     ((and procmark (>= pt procmark))
		      (max procmark 
			   (or (match-end 2) 
			       (point-min) )))
		     ((match-end 2))
		     ((point-min))))
    (let ((bpt (point))
	  ept
	  )
      (if (re-search-forward "^\\s *$\\|^Out\\[[0-9]+\\][^=\n]*=\\|^In\\[[0-9]+\\]:=" nil 1)
	  ;; If it matches, we have found the beginning of a line
	  ;;  following the cell.  Back up one character.  
	  ;; If it doesn't match we are at eob and end of cell.
	  (goto-char (max (- (match-beginning 0) 1) bpt)))
      (setq ept (point))
      (list bpt ept))))



(defun get-math-completion (prefix)
  "Returns string to insert to complete a Mathematica symbol
  Designed to be called as in (insert (get-math-completion word))"
  (let ((cbuf (current-buffer)))
    (unwind-protect
	(progn
	  (set-buffer " Mathwork")
	  (goto-char (point-min))
	  (let (alist)
	    (while (looking-at "\\S +")
	      (setq alist (cons (list (buffer-substring (match-beginning 0) (match-end 0))) alist))
	      (forward-line 1))
	    (set-buffer cbuf)
	    (let ((t-c-result  (and alist (try-completion prefix alist))))
	      ; try-completion barfs on a nil alist, so we help it out
	      (cond ((eq t-c-result t) 
		     (message "%s is complete" prefix)
		     "")
		    ((eq t-c-result nil)
		     (message "No match found")
		     "")
		    ((not (string= prefix t-c-result))
		     (substring t-c-result (length prefix)))
		    (t (with-output-to-temp-buffer "*Help*"
			 (display-completion-list 
			  (all-completions prefix alist))
			 (print-help-return-message))
		       ""))))))))

(defun kill-9-process ()
  "Kills the process in the current buffer as in kill -9."
  (interactive)
  (kill-process (get-buffer-process (current-buffer))))

(defun metered-process-send-string (process string)
  "The same semantics as process-send-string, except the
string is broken into small enough chunks to not mess up emacs."
  (let ((p 0)
	(len (length string)))
    (while (< p len)
      (process-send-string process
			   (substring string p (setq p (min len (+ p 80))))))))



(defun skip-over-white-lines ()
  ;; it might be possible to do this with 
  ;; (re-search-forward "\\(^\\s *\n\\)*")
  ;; but this works.
  (while (and 
	  (not (eobp))
	  (looking-at "^\\s *$") ; blank line
	  (zerop (forward-line)))))

;;; Mathematica counts lines wrong.  The following is what really happens.
;;; Blank lines, other than the first line are not counted (unless inside 
;;; quotes or comments).  Unescaped newlines inside strings count double.

(defun goto-matherr-line (argline)
  "Goes to the line intended by Mathematica error messages"
  (interactive "ngoto Mathematica line number: ")
  (let ((lineno 1)
	(comment-depth 0)
	instring)
    (goto-char (point-min))
    (if (looking-at "^\s *$")
	(progn
	  (setq lineno 2)
	  (skip-over-white-lines)))
    (while (and (not (eobp))
		(< lineno argline))
      (cond ((> comment-depth 0)
	     (re-search-forward "\\((\\*\\)\\|\\(\\*)\\)\\|\\(\n\\)" nil 1)
					; (* or *) or newline
	     (cond ((match-beginning 1)
		    (setq comment-depth (1+ comment-depth)))
		   ((match-beginning 2)
		    (setq comment-depth (1- comment-depth)))
		   ((match-beginning 3)
		    (setq lineno (1+ lineno)))))
	    (instring
	     (re-search-forward 
"\\(\\\\\\\\\\)\\|\\(\\\\\042\\)\\|\\(\042\\)\\|\\(\\\\\n\\)\\|\\(\n\\)" nil 1)
	     ;; \\ or \quote or quote or \newline or newline
	     ;;  \042 is a double quote.  
	     ;; Using the octal form keeps Emacs from getting lost.
	     (cond ((match-beginning 3)
		    (setq instring nil))
		   ((match-beginning 4)
		    (setq lineno (1+ lineno)))
		   ((match-beginning 5)
		    (setq lineno (+ 2 lineno)))))
	    (t
	     (re-search-forward "\\(\050\\*\\)\\|\\(\042\\)\\|\\(\n\\)" nil 1)
					; left paren* or quote or newline
	     (cond ((match-beginning 1)
		    (setq comment-depth 1))
		   ((match-beginning 2)
		    (setq instring t))
		   ((match-beginning 3)
		    (setq lineno (1+ lineno))
		    (skip-over-white-lines))))))))

(defun find-math-error ()
  "Searches for the last \"syntax error in\" message; goes to indicated line
in the indicated file.  It uses the symbol Mathematica-search-path rather 
than going to all the work to discover the real real search path."
  (interactive)
  (let (filename
	linenumber
	raw-filename
	(math-search-path Mathematica-search-path))
    (save-excursion
      (re-search-backward "syntax error in")
      (forward-line 0)
      (if (not (looking-at "\\([^:]+\\): *\\([0-9]+\\):"))
	  (error "Cannot parse error line"))
      (setq raw-filename (buffer-substring (match-beginning 1) (match-end 1)))
      (setq linenumber (string-to-int 
			(buffer-substring (match-beginning 2) (match-end 2)))))
    (while (not filename)
      (setq filename (expand-file-name raw-filename (car math-search-path)))
      (if (not (file-readable-p filename))
	  (progn (setq filename nil)
		 (setq math-search-path (cdr math-search-path))
		 (if (null math-search-path)
		     (error "File %s not found" raw-filename)))))
    (find-file-other-window filename)
    (goto-matherr-line linenumber)))


(defun set-math-process-buffer (buffer)
  "Sets the buffer in/to which to evaluate/copy Mathematica
code.  (You only need to use this function if you want a buffer 
other than *math*.)"
  (interactive "bMathematica buffer: ")
  (make-local-variable 'math-process-buffer)
  ;; The following trick will use the buffer itself if
  ;; it is defined.  That way if the user eventually 
  ;; changes the name, say by writing it out, this local
  ;; math-process-buffer will still point to the right place.  
  ;; But if the buffer does not yet exist, it will still work.
  (setq math-process-buffer (or (get-buffer buffer) buffer)))



From kmorriso@data.acs.calpoly.edu Wed Apr 18 18:04:04 1990
Received: from data.ACS.CalPoly.EDU by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA14542; Wed, 18 Apr 90 18:04:00 -0500
Received: from  worf.acs.calpoly.edu  (worf) by  data.acs.calpoly.edu  (NeXT-1.0 (From Sendmail 5.52)/NeXT-1.0)
	id AA15341; Wed, 18 Apr 90 16:02:37 GMT-0800
Message-Id: <9004190002.AA15341@ data.acs.calpoly.edu >
Received: by  worf.acs.calpoly.edu  (NeXT-1.0 (From Sendmail 5.52)/NeXT-1.0)
	id AA00641; Wed, 18 Apr 90 16:04:27 GMT-0800
Date: Wed, 18 Apr 90 16:04:27 GMT-0800
From: kmorriso@data.acs.calpoly.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Different NeXT versions?
Cc: jdelany@data.acs.calpoly.edu
Status: RO

We have version 1.2 (Aug. 1989) running on NeXTs.  At the Redwood City
conference in January 1990 there were some things working differently
on the NeXT, but it was still version 1.2.  Two examples:  Integrate
and NIntegrate were listable in Redwood City so that one could
integrate vector valued functions without extra effort.  In the Aug.
1989 version that does not work.  Second, an integrand such as 
Sqrt[x^2 +y^2] leads to messages about insufficient accuracy after
seven recursive subdivisions, using NIntegrate.  But in Redwood City
the computations proceeded without a hitch.

Are we running the same version?

Are there files or packages that need loading?

From shdavis@marsh.rice.edu Wed Apr 18 18:06:51 1990
Received: from marsh.rice.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA14551; Wed, 18 Apr 90 18:06:48 -0500
Received: from piranha.rice.edu by marsh.rice.edu (AA25510); Wed, 18 Apr 90 18:05:38 CDT
Received: by piranha.rice.edu (AA01852); Wed, 18 Apr 90 18:05:46 CDT
Date: Wed, 18 Apr 90 18:05:46 CDT
From: Sam H. Davis <shdavis@marsh.rice.edu>
Message-Id: <9004182305.AA01852@piranha.rice.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica Simplify problem
Status: RO

In trying to demonstrate how to find a conjugate harmonic
function, I ran into a problem with Simplify:
In[1]:= u=Exp[x^2-y^2] Cos[2 x y]

          2    2
         x  - y
Out[1]= E        Cos[2 x y]

In[2]:= ux=D[u,x]

            2    2                    2    2
           x  - y                    x  - y
Out[2]= 2 E        x Cos[2 x y] - 2 E        y Sin[2 x y]

In[3]:= v=Integrate[ux,y]

             -I             I
             --             -
             2              2
Out[3]= ------------ + -----------
                   2             2
         (-I x + y)     (I x + y)
        E              E

In[4]:= Simplify[v]

                     2
         -2 I x y - y           4 I x y
        E              (I + -I E       )
Out[4]= --------------------------------
                       2
Somehow Exp(x^2) got lost in this last step.
Is there a way around this?
Sam Davis
shdavis@rice.edu 

From phil@einstein.tamu.edu Thu Apr 19 14:55:39 1990
Received: from TAMU.EDU by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA15471; Thu, 19 Apr 90 14:55:24 -0500
Received: from einstein.tamu.edu by TAMU.EDU (AA06574); Thu, 19 Apr 90 14:54:20 CDT
Received: by einstein.tamu.edu (4.0/SMI-4.0)
	id AA21783; Thu, 19 Apr 90 14:52:47 CDT
Date: Thu, 19 Apr 90 14:52:47 CDT
From: phil@einstein.tamu.edu (Philip B. Yasskin)
Message-Id: <9004191952.AA21783@einstein.tamu.edu>
To: rsarava@splash.princeton.edu
Subject: Re:  supressing argument evaluation by function Part
Cc: mathgroup@yoda.ncsa.uiuc.edu, phil@einstein.tamu.edu
Status: RO

The reason you get error messages from

  lhs = { { -(k^2 + lamsq[[n]]), lamsq[[n]] },
	  { lamsq[[n]], -(k^2 + lamsq[[n]]) } }

  rhs = { { -(k^2 + lamsq[[n]]) u1[[n]], lamsq[[n]] u1[[n]] },
	  { lamsq[[n]] u2[[n]], -(k^2 + lamsq[[n]]) u2[[n]] } }

  cmatrix[k_,n_] = Inverse[lhs] . rhs

is that n is not defined as a number when you define lhs and rhs.  The
errors should dissappear if you insert the expressions for lhs and rhs
into the formula for cmatrix.  However, the following should be much
faster since you don't have to recompute the n-th component
repeatedly:

In[1]:= cmatrix[k_,n_] :=
  Block[{lamsqn=lamsq[[n]], u1n=u1[[n]], u2n=u2[[n]]},
	lhs = { { -(k^2 + lamsqn), lamsqn },
	  { lamsqn, -(k^2 + lamsqn) } };
	rhs = { { -(k^2 + lamsqn) u1n, lamsqn u1n },
	  { lamsqn u2n, -(k^2 + lamsqn) u2n } };
	Inverse[lhs] . rhs
  ]

In[2]:= lamsq = {1,2,3,4}

Out[2]= {1, 2, 3, 4}

In[3]:= u1 = {2,4,6,8}

Out[3]= {2, 4, 6, 8}

In[4]:= u2 = {1,3,5,7}

Out[4]= {1, 3, 5, 7}

In[5]:= cmatrix[1,2]

	  24    6     6  11
Out[5]= {{--, -(-)}, {-, --}}
	  5     5     5  5

Phil Yasskin     phil@einstein.tamu.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Apr 21 01:26:39 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA17705; Sat, 21 Apr 90 01:26:38 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA21342; Sat, 21 Apr 90 01:21:33 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA16996; Fri, 20 Apr 90 22:17:54 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA16992; Fri, 20 Apr 90 22:17:52 -0500
Message-Id: <9004210317.AA16992@yoda.ncsa.uiuc.edu>
Date: Thu, 19 Apr 90 14:52:47 CDT
From: phil@einstein.tamu.edu (Philip B. Yasskin)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  supressing argument evaluation by function Part
Status: RO

The reason you get error messages from

  lhs = { { -(k^2 + lamsq[[n]]), lamsq[[n]] },
	  { lamsq[[n]], -(k^2 + lamsq[[n]]) } }

  rhs = { { -(k^2 + lamsq[[n]]) u1[[n]], lamsq[[n]] u1[[n]] },
	  { lamsq[[n]] u2[[n]], -(k^2 + lamsq[[n]]) u2[[n]] } }

  cmatrix[k_,n_] = Inverse[lhs] . rhs

is that n is not defined as a number when you define lhs and rhs.  The
errors should dissappear if you insert the expressions for lhs and rhs
into the formula for cmatrix.  However, the following should be much
faster since you don't have to recompute the n-th component
repeatedly:

In[1]:= cmatrix[k_,n_] :=
  Block[{lamsqn=lamsq[[n]], u1n=u1[[n]], u2n=u2[[n]]},
	lhs = { { -(k^2 + lamsqn), lamsqn },
	  { lamsqn, -(k^2 + lamsqn) } };
	rhs = { { -(k^2 + lamsqn) u1n, lamsqn u1n },
	  { lamsqn u2n, -(k^2 + lamsqn) u2n } };
	Inverse[lhs] . rhs
  ]

In[2]:= lamsq = {1,2,3,4}

Out[2]= {1, 2, 3, 4}

In[3]:= u1 = {2,4,6,8}

Out[3]= {2, 4, 6, 8}

In[4]:= u2 = {1,3,5,7}

Out[4]= {1, 3, 5, 7}

In[5]:= cmatrix[1,2]

	  24    6     6  11
Out[5]= {{--, -(-)}, {-, --}}
	  5     5     5  5

Phil Yasskin     phil@einstein.tamu.edu



From jpg@ALLEGHENY.SCRC.Symbolics.COM Mon Apr  2 16:01:13 1990
Received: from [128.81.41.45] by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA01874; Mon, 2 Apr 90 16:01:06 -0500
Received: from SKUA.SCRC.Symbolics.COM by ALLEGHENY.SCRC.Symbolics.COM via CHAOS with CHAOS-MAIL id 180586; 2 Apr 90 16:18:53 EDT
Date: Mon, 2 Apr 90 16:18 EDT
From: Jeffrey P. Golden <jpg@ALLEGHENY.SCRC.Symbolics.COM>
Subject: precision and accuracy
To: keiper@wri.UUCP
Cc: mathgroup@yoda.ncsa.uiuc.edu, jpg@ALLEGHENY.SCRC.Symbolics.COM
In-Reply-To: <9003292140.AA03501@yoda.ncsa.uiuc.edu>
Message-Id: <19900402201819.8.JPG@SKUA.SCRC.Symbolics.COM>
Status: RO

    Date: Mon, 26 Mar 90 13:03:08 CST
    From: wri!keiper@yoda.ncsa.uiuc.edu (Jerry Keiper)
    
[...]
    
    As to increasing the precision of a number, Mathematica allows this to be
    done very simply using SetPrecision[] (likewise the accuracy can be
    increased with SetAccuracy[].)  y = SetPrecision[x, prec] gives y a value
    such that y == x is True and such that the precision of y is prec.  If the
    precision of y is greater than the precision of x the "missing" digits of x
    are filled in for y with 0's in binary.  This does not mean that they will
    appear as 0's in decimal however.  e.g. the decimal number 1.2 has a
    nonterminating binary expansion 1.0011001100110011001100...  Clearly if
    we start with a finite approximation to this and attach 0's in binary
    we will not get the decimal expansion for 1.200000000...  Since it is not
    possible to know what number a user has in mind when he wants to increase
    its precision it is not possible to give a better approximation; all that
    Mathematica can do is give another number with more digits in it.

If the user types SetPrecision[1.2,30], I think it is pretty clear that most
users mean the same number that SetPrecision[12/10,30] would mean, i.e. fill 
in with decimal 0's, which is not what Mathematica does.  
    
    As to relative and absolute error vs. precision and accuracy, precision
    is a nonnegative integer and accuracy is an integer.  Relative and absolute
    error are small numbers, sometimes complex, but they are never known exactly 
    (if they were the approximate answer could be corrected.)  I find it more 
    convenient to deal with an accuracy of 27 rather than an absolute error of 
    0.000000000000000000000000001, but perhaps not everyone does.

I think no one finds it convenient to deal with 0.000000000000000000000000001 .
That's why notations such as 1.0 10^-27 (or even 1.0e-27) were invented.  
(I can't tell whether you're trying to bias the situation or just so used to 
typing numbers such as 1.20000000000000000000000000000 to Mathematica to get 
the precision you need!-)

From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Apr 24 12:19:17 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA21230; Tue, 24 Apr 90 12:19:16 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA01547; Tue, 24 Apr 90 12:14:12 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA21033; Tue, 24 Apr 90 11:16:25 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA21029; Tue, 24 Apr 90 11:16:24 -0500
Message-Id: <9004241616.AA21029@yoda.ncsa.uiuc.edu>
Date: Mon, 23 Apr 90 14:05:54 EDT
From: Jim_Wendel@ub.cc.umich.edu
To: mathgroup-adm@yoda.ncsa.uiuc.edu
Subject: Re: Transformation Rules via Algebraic Rules
Status: RO

This is in reply to "Transformation Rules via Algebraic Rules" posted 4/13
by ???.  It doesn't completely solve the problem, however.
Type rule1, you'll see x->t^(3/2).  Type rule2, you'll see {x->t^(3/2)},
apparently just rule1 surrounded by braces.  Define rule3={x->t^(3/2)}.
Type rule3, see apparently same as rule2 gave.  But if you request
InputForm of these rules you will see that they are very different; 1 & 3
are just the actual inputs, but rule2 is a complicated thing that makes
reference to an undocumented function AlgebraicRulesData, known to users
only as Protected.

Jim_Wendel@ub.cc.umich.edu.


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Apr 27 11:53:43 1990
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: deferred evaluation question
Status: RO

There are functions in Mma that do not defer evaluation when their
arguments are undefined symbols, for example N and Mod:

In[1]:= N[x]

Out[1]= x

In[2]:= Mod[m, 7]

Out[2]= m

Question:  is it possible, through rule definition or some other clever
artifice, to make functions N and Mod defer evaluation with the input
above, i.e., evaluate to N[x] and Mod[m, 7]?  Constraints:  the artifice
should have no disastrous side effects on the normal operation of N and 
Mod or on evaluation generally, and it should be substantially less 
complex than rebuilding Mathematica in Mathematica.

  - Bill MacGregor


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Apr 27 12:53:44 1990
Subject:      NumberQ
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

I am trying to define some numeric functions. If I make definitions
like
    myfun[x_Real] := thing1
    myfun[x_Integer] := thing2
    myfun[x_Number] := thing3
    myfun[x_Rational] := thing4
my function does not get evaluated for myfun[Sqrt[3]]. What type is
Sqrt[3]? I note that NumberQ[Sqrt[3]] returns False.

                               E. Neely Atkinson
                               AN123651 at UTHVM1.BITNET
                               neely@mdaali.cancer.utexas.edu


From lsf@astrosun.TN.CORNELL.EDU Fri Apr 27 13:17:41 1990
To: stevec@yoda.ncsa.uiuc.edu
Subject: Re:  NumberQ
Status: RO

Steve:
Do you think that you could fix the mathgroup mailheader so that the From:
line indicates either the true originator of the message or mathgroup? Right
now, they all come from you.

Thanks,


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Apr 27 13:36:26 1990
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: High precision floating point considered hazardous
Status: RO

Suppose that I double a floating point number then subtract off the
original number.  I ought to get the original number back, with maybe
the LSB being trashed.  If I do this N times, the introduced error
should be at most N times the weight of the LSB.  Well, Mathematica's
high precision floating point numbers don't work that way!  In fact,
the way they work is downright hazardous, as I found out.

In[1]:= a=1.1111111111111111

Out[1]= 1.1111111111111111

In[2]:= Do[a=2a-a,{55}]

In[3]:= a

Out[3]= 0.

Wow, just 55 iterations got a zero, not a 1.111... with some error.
Furthermore that zero is a black hole:

In[4]:= a+1

Out[4]= 0.

Everything works fine if we use a machine float instead of a big float:

In[5]:= b=1.111111111

Out[5]= 1.111111111

In[6]:= Do[b=2b-b,{1000}]

In[7]:= b

Out[7]= 1.11111

In[8]:= b-%5

Out[8]= 0.

The problem is that each iteration ratchets down the precision by one
until it eventually gets to zero.

Although it is less serious, there are also constructs that ratchet up
the precision, which, by the way, indicates that the precision
calculation cannot be quite correct.

In[35]:= p=N[Pi,20]

Out[35]= 3.1415926535897932385

In[36]:= Do[p=(p+p)/2,{100}]

In[37]:= p

Out[37]= 3.1415926535897932384626445913472373472822072149898

In[39]:= Precision[p]

Out[39]= 50

In[40]:= N[Pi,50]

Out[40]= 3.1415926535897932384626433832795028841971693993751

You might think that you never use big floats, so you don't have to
worry.  That's what I thought, too.  Unfortunately, the function Fit
sometimes outputs a function with coefficients that are big floats,
even when only passed machine floats in the input:

In[24]:= Fit[{0., 0.00694444, 0.0165094, 0.0278869},{x^3,
x^2,x,1},x]

                                                                   2
Out[24]= -0.00351594 + 0.0015323633333333 x + 0.00211823999999999 x  - 
 
                          3
>    0.00013466333333333 x


(Those are the actual numbers that caused the problem that I ran into.)

The ratcheting up of precision may be a performance problem, but the
ratcheting down of precision is downright disastrous.  I can suggest
two approaches: either take care to avoid big floats altogether in
calculations where each iteration uses the results of the previous
iteration, or if you really need higher precision, figure out in
advance what precision you want, then restore the precision of every
variable at the end of each iteration with something like 
x = SetPrecision[x,desiredPrecision]

The immediate problem arises from the way Mathematica computes the
precision/accuracy of the result of an addition: it seems to make the
accuracy of the result be the accuracy of the least accurate addend.

Now for some opinions:

There are at least 3 different notions of precision.

1.  A bound on the error introduced in each computation (including
conversion to floating point) leading up to the present value.  Thus a
precision of 16 digits (53 bits) means the result is as
accurate/precise as could have been expected if 53 bit mantissas had
been used in all calculations leading to the number.  This says
nothing about how close the number represented is to the ideal number
that would have occurred if all arithmetic in an entire computation
were exact; rather, it says that in each individual computation at
most so much error is introduced by the arithmetic and by forcing
results back into variables of this much "precision".

2.  An upper bound on the relative difference between the number
actually represented and that which would have occurred if each
computation were exact.  Thus 1.6453 with a precision of 4 means that,
had all arithmetic been exact, the result would have been in the range
1.6453 +/- .00016453.  

3.  An estimate of the uncertainty of the output of a calculation
based on the uncertainty of measured values.  This is commonly used in
physics labs.  (The mumblefoo distance was 76.2 +/- .1 cm.)  Thus if
from an experiment computing the acceleration of gravity, the
calculation yields 9.81 with a precision of 3, the true acceleration
of gravity lies in the range 9.815 +/- .009815, assuming there are no
systematic errors in the experiment.

Mathematica seems to be trying for meaning two.  (Although the policy of
making the precision of a literal be the number of digits typed in
shows vestiges of meaning 3.)  As evidence for this claim note that the
precision of a result of a subtraction is less than either argument:

In[41]:= q = 1.11111111111111111111111111111

Out[41]= 1.11111111111111111111111111111

In[42]:= 1025 q - 1024 q

Out[42]= 1.11111111111111111111111111

Also N[] reduces but never increases precision, presumably based on
the idea that it shouldn't give the illusion of precision that isn't
already there.

Now the question is, what ought Mathematica to provide?  (Disclaimer,
I'm no expert in this stuff.  Other people have undoubtedly written
entire dissertations on the topic.)  It ought to be useful, free of
ratcheting, either up or down, and reasonable to implement.  It also
ought to have an appealingly simple definition, and handle exact
numbers (numbers with a precision of Infinity) without any ugly
special cases that break the spirit of the definition.

I'll dispose of definition 3 (propagation of input uncertainty to
output) right off: it should be done by the user, possibly with the
help of a Mathematica package.  

I believe that correctly implementing a system based on definition 2
is virtually impossible.  While it is can be done locally for each
operation, the composite precision for an entire computation fails to
give the right answer.  To see this, suppose that x is some variable,
and in the early stages an error of epsilon was introduced, so we have
x = x' + epsilon, where x' is the ideal value.  Then we compute y=x,
then eventually y-x.  We ought to get a true zero.  But since the
system does not know that the error in x is always the same as the
error in y, it must assume the worst case, namely that they could be
of opposite sign, and indicate the result to be 0 +/- 2 epsilon.  As
the example involving Pi indicates, Mathematica doesn't even always get
the calculated precision right.  (I also conjecture that even getting it
locally right requires that the accuracy be carried to several
significant bits, but I'll skip that discussion.)

What the user really wants is to ensure that his/her calculations are
done with enough precision (definition 1 sense) that errors introduced
by arithmetic and by forcing numbers into some representation are
negligible for his/her application.  But since Mathematica is not a
compiled language with declarations for every variable (and since in
any case there are still intermediate results that need to be
represented), we want a reasonable precision to be automatically
generated for every operation.


I suggest that a good definition of "precision" is roughly definition
1.  (Admittedly, its not really a property of a number, but of a
computation.  Perhaps we need a different word.)  Intuitively a number
has a certain precision, P, if it is as accurate/precise as one could
have expected had P bits of mantissa been used in all
computations/conversions leading up to it.  (It may be convenient to
display/accept precision in decimal digits, but in this discussion we
are using bits.)  We need rules for the precision of the results of
the various operations.  I suggest the following.  When converting to
a float, the precision is the number of bits the mantissa is truncated
to.  The precision of the output of the basic arithmetic opertions is
the minimum of the precision of the operands.

The basic defintion is obviously satisfied, since the reported
precision is the minimum of all the precisions involved in the entire
calculation.  

What properties does this have?

1.  Operations on a pair of numbers of the same precision leaves the
precision unchanged.

2.  The precision can never ratchet up or down.

3.  There is no special case for exact numbers.  The can be converted
to the precision of the other operand and the operation can proceed.

4.  If input is always converted to at least the precision of machine
floats, then machine floats are in no way a special case.  If some big
float or exact number is to be combined with a machine float, just
convert it to a machine float and proceed with the two machine floats.


  -- David Jacobson


Postscript: I spent many hours working on an alternate set of rules
for addition and subtraction.  This set of rules would have allowed an
addition as shown in the example below to keep the precision of the
large, high precision number.  (The picture shows the addition of the
mantissas after shifting. A "d" indicates a bit actually available in
the data.)

1ddddddddddddddddddddd
                  1dddddddd

Unfortunately, proving that it satisfied the basic definition required
that doing a calculation to N digits, then truncating down to a
smaller M, be considered equivalent to having done the calculation in
M digits all along---something I know is false.  If there is any
interest in this topic, someone just send mail directly to me and I'll
post the idea.



From @vmd.cso.uiuc.edu:USERCLEL@UALTAMTS.BITNET Fri Apr 27 14:38:12 1990
Subject:  your equations in Mathematica
To: stevec@YODA.NCSA.UIUC.EDU
Status: RO

Thank you for your message. It nust have contained a number of symbols that
cannot be printed on the screen or on our printer. They are replaced by
interrogation points. The message is therefore not quite readable.
Could you send it, please, by mail?

My address is:
      Clement Leibovitz
      University Computing Systems
      GBS 372
      University of Alberta
      Edmonton, Alberta, Canada.
      T6G 2E1
               With thanks. Clement

From testgroup-adm@yoda.ncsa.uiuc.edu Fri Apr 27 14:25:15 1990
To: stevec@yoda.ncsa.uiuc.edu
Subject: Re:  NumberQ
Status: RO

try this

myfun[x_Sqrt] := thing5

ie. the tag after the underscore can be any expression "head".
Mathematica does have numeric types: Real, Integer etc.
But, symbolic results such as Sqrt[3] can either be considered
to belong to the general expression type which will match:
myfun[x_] := thing
or specifically matched by the name of the outermost function.

check out page 228 in Wolframs text

Dave
skankman@ux1.lbl.gov


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Apr 28 14:55:05 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA00236; Sat, 28 Apr 90 14:55:04 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA29164; Sat, 28 Apr 90 14:50:33 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01372; Fri, 27 Apr 90 15:29:18 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01368; Fri, 27 Apr 90 15:29:16 -0500
Date: Fri, 27 Apr 90 15:29:16 -0500
Message-Id: <9004272029.AA01368@yoda.ncsa.uiuc.edu>
From: skankman@ux1.lbl.gov.Fri.Apr.27.14:02:16.1990
To: stevec@yoda.ncsa.uiuc.edu
Subject: Re:  NumberQ
Status: RO

try this

myfun[x_Sqrt] := thing5

ie. the tag after the underscore can be any expression "head".
Mathematica does have numeric types: Real, Integer etc.
But, symbolic results such as Sqrt[3] can either be considered
to belong to the general expression type which will match:
myfun[x_] := thing
or specifically matched by the name of the outermost function.

check out page 228 in Wolframs text

Dave
skankman@ux1.lbl.gov


From jacobson@cello.hpl.hp.com Sat Apr 28 14:59:16 1990
Received: from bardeen.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA00308; Sat, 28 Apr 90 14:59:04 -0500
Received: from newton.ncsa.uiuc.edu by bardeen.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA18143; Fri, 27 Apr 90 19:21:48 CDT
Return-Path: <jacobson@cello.hpl.hp.com>
Received: from hplms2.hpl.hp.com ([15.255.176.66]) by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA11247; Fri, 27 Apr 90 19:21:46 CDT
Received: from cello.hpl.hp.com by hplms2.hpl.hp.com with SMTP
	(15.11.1.3/15.5+IOS 3.20) id AA25884; Fri, 27 Apr 90 17:20:19 pdt
Received: from localhost by cello.HPL.HP.COM; Fri, 27 Apr 90 17:20:14 pdt
To: mathgroup@yoda.ncsa.uiuc.edu
Cc: neely@mdaali.cancer.utexas.edu
Subject: Re: NumberQ 
In-Reply-To: Your message of "Fri, 27 Apr 90 09:27:16 CDT."
             <9004271602.AA00467@yoda.ncsa.uiuc.edu> 
Date: Fri, 27 Apr 90 17:20:11 PDT
Message-Id: <443.641262011@cello>
From: jacobson@cello.hpl.hp.com
Status: RO

> I am trying to define some numeric functions. If I make definitions
> like
>     myfun[x_Real] := thing1
>     myfun[x_Integer] := thing2
>     myfun[x_Number] := thing3
>     myfun[x_Rational] := thing4
> my function does not get evaluated for myfun[Sqrt[3]]. What type is
> Sqrt[3]? I note that NumberQ[Sqrt[3]] returns False.

The simplest approach if real, integer, rational, and number are all
the other cases is to just use

	myfun[x_] := thing5

If you want to recognize all things that are non-simple goodies, this
will work:

	myfun[x_?(!AtomQ[#]&)] := thing5a

To recognize all non-numbers

	myfun[x_?(!NumberQ[#]&)] := thing5b

To recognize symbols
	
	myfun[x_Symbol] := thing6

To recognize specific constructs, e.g. to differentiate between 
Sqrt and Log

	myfun[x:Sqrt[_]] := thing7

	myfun[x:Log[_]] := thing8

  -- David Jacobson

From @uunet.UU.NET:paul@wri.UUCP Sat Apr 28 14:57:40 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA00268; Sat, 28 Apr 90 14:57:38 -0500
Return-Path: <wri!paul@uunet.UU.NET>
Received: from uunet.uu.net by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA10025; Fri, 27 Apr 90 17:56:53 CDT
Received: from wri.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA06275; Fri, 27 Apr 90 18:56:47 -0400
Received: by WRI.com (3.2/SMI-3.0DEV3)
	id AA02561; Fri, 27 Apr 90 13:27:04 CDT
Date: Fri, 27 Apr 90 13:27:04 CDT
From: paul@wri.UUCP (Paul Abbott)
Message-Id: <9004271827.AA02561@WRI.com>
To: wester@ghostwheel.unm.edu
Subject: Determinant and Eigenvalue routines in Mathematica
Cc: rivin@uunet.UU.NET, stevec@ncsa.uiuc.edu
Status: RO

Dear Michael:

Hope that the following answers some of your questions:

Eigenvalues and Eigenvectors:

	same as EISPAK; see numerous references for the latter for details. 
	
	For the symbolic (and exact) cases, we do it the hard way by 
	solving the characteristic polynomial, etc. 

Determinants: 

	Symbolic: Expansion by minors

	Exact Integers: Modular reduction followed by Gauss Elimination.

	Floats: LU decomposition.

From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Apr 30 14:06:50 1990
To: mathgroup-adm@yoda.ncsa.uiuc.edu
Subject: Re: NumberQ
Status: RO

Try myfun[Sqrt[3.0]].
jim_wendel@ub.cc.umich.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Apr 30 14:45:36 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03075; Mon, 30 Apr 90 14:45:34 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA25809; Mon, 30 Apr 90 14:40:49 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02594; Mon, 30 Apr 90 12:18:45 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02590; Mon, 30 Apr 90 12:18:43 -0500
Date: Mon, 30 Apr 90 12:18:43 -0500
Message-Id: <9004301718.AA02590@yoda.ncsa.uiuc.edu>
From: jack@sun.udel.edu.Mon.Apr.30.11:15:11.1990
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: High precision floating point considered hazardous
Status: RO


I tried this problem....

        a = 1.1111111111111111
        Do[a=2a-a,{55}]

on versions 1.1 and 1.2.  I did obtain 0 on version 1.2, but there was no
error on 1.1..i.e., I did not obtain 0!  Seems like a bug in version 1.2.




From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May  1 16:46:30 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA04699; Tue, 1 May 90 16:46:28 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15025; Tue, 1 May 90 16:41:52 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04622; Tue, 1 May 90 16:05:00 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04618; Tue, 1 May 90 16:04:59 -0500
Date: Tue, 1 May 90 16:04:59 -0500
Message-Id: <9005012104.AA04618@yoda.ncsa.uiuc.edu>
From: knutj@idt.unit.no.Tue.May.1.07:04:07.1990
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Plots and scientific notation
Status: RO

I have a (simple ?) question :

Is it possible to tell Mathematica to _automatically_ format real numbers 
using scientific notation ?   Or more specific, to use scientific notation
on all or one of the axes on 2-D and 3-D plots ?

In my case I will be very happy if it is possible to use scientific notation 
on the z-axis of 3-D plots.  It looks rather ugly with 0.0000002, 0.0000004, 
etc.  And even worse when Mathematica (must) use a variable number of digits, 
e.g. 0.000015, 0.00002, 0.000025.

I could use other tools but Mathematica is the only one available that let
me specify a function as a numerical integral.  

Any suggestions ? 

Knut Johannessen
Dept. Computer Science and Telematics
Norwegian Institute of Technology
N-7034 Trondheim, Norway

email: knutj@idt.unit.no  

     




From jacobson@hplred.hpl.hp.com Tue May  1 18:26:20 1990
Received: from hplms2.hpl.hp.com by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA04826; Tue, 1 May 90 18:26:17 -0500
Received: from hplred.hpl.hp.com by hplms2.hpl.hp.com with SMTP
	(15.11.1.3/15.5+IOS 3.20) id AA21804; Tue, 1 May 90 16:25:23 pdt
Received: by hplred.HPL.HP.COM; Tue, 1 May 90 16:24:59 pdt
Date: Tue, 1 May 90 16:24:59 pdt
From: David M. Jacobson <jacobson@hplred.hpl.hp.com>
Message-Id: <9005012324.AA17394@hplred.HPL.HP.COM>
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Here is *starter*.  When I did this, the labels on the ticks of a plot came
out looking like scientific notation, but the graph was tiny on my screen.  It
obviously messes something else up.  Also, you'll need to do something about
zeros, as this will take the Log of zero.


In[14]:= Unprotect[Real]

In[15]:= Format[x_Real] := Block[{exp=Floor[Log[10,x]],mant},
	mant=Round[x/10^(exp-3)];
	StringJoin[ToString[Floor[mant/1000]],".",ToString[Mod[mant,1000]],
	 " 10^",ToString[exp]]]

In[16]:= Protect[Real]

There's got to be a better solution.

  -- David Jacobson

From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May  1 20:13:48 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA04908; Tue, 1 May 90 20:13:47 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA18424; Tue, 1 May 90 20:09:14 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04850; Tue, 1 May 90 18:29:37 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04846; Tue, 1 May 90 18:29:36 -0500
Message-Id: <9005012329.AA04846@yoda.ncsa.uiuc.edu>
Date: Tue, 1 May 90 16:24:59 pdt
From: David M. Jacobson <jacobson@hplred.hpl.hp.com>
Subject: Re: Plots and scientific notation
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Here is *starter*.  When I did this, the labels on the ticks of a plot came
out looking like scientific notation, but the graph was tiny on my screen.  It
obviously messes something else up.  Also, you'll need to do something about
zeros, as this will take the Log of zero.


In[14]:= Unprotect[Real]

In[15]:= Format[x_Real] := Block[{exp=Floor[Log[10,x]],mant},
	mant=Round[x/10^(exp-3)];
	StringJoin[ToString[Floor[mant/1000]],".",ToString[Mod[mant,1000]],
	 " 10^",ToString[exp]]]

In[16]:= Protect[Real]

There's got to be a better solution.

  -- David Jacobson


From nb@Sunburn.Stanford.EDU Fri May  4 19:25:03 1990
Received: from Sunburn.Stanford.EDU by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09012; Fri, 4 May 90 19:25:01 -0500
Received:  by Sunburn.Stanford.EDU with SMTP (5.61+IDA/25-eef) id AA12403; Fri, 4 May 90 17:24:05 -0700
Message-Id: <9005050024.AA12403@Sunburn.Stanford.EDU>
To: stevec@yoda.ncsa.uiuc.edu
Subject: An improved posting
Date: Fri, 04 May 90 17:24:05 PDT
From: nb@Sunburn.Stanford.EDU
Status: RO

Steve,

If you have not already posted the message I sent you earlier today,
I would appreciate you posting this note instead.

Thank,

Nancy

-----------------------------------------------------------------------------
Variable Symbols, Inc. offers training, consulting, and reference materials
for people who use or plan to use Mathematica.

PRODUCTS
Variable Symbols, Inc. has developed two help facilities:  Mathematica 
Reference Cards and a Mathematica Help Stack based on HyperCard.

THE MATHEMATICA HELP STACK makes it simple to find information about
functions, and commands in Mathematica.  It categorizes each of them
and offers a visual representation for some.   Demonstrations copies 
of this stack are available.

THE MATHEMATICA REFERENCE CARDS provide a summary of the functions in
Mathematica.  One laminated four-card set describes Mathematica's built-in
objects and lists all functions, options, variables, aliases, and
special forms available in Version 1.2.  The second set, made up of
five double-sided pages, lists all objects defined in the packages 
distributed with Mathematica and includes a cross reference. If you know 
the name of a function, you can lookup the name of the folder/directory 
in which it is contained.

Nancy Blachman  Tel. 415 486-8073   AppleLink: VSI   Email:  nb@cs.stanford.edu 
Variable Symbols, Inc. * P.O. Box 9013 * Berkeley, CA 94709-0013 * 415 486 8073

Order form follows.

_______________________________________________________________________________

                    Variable Symbols, Inc. Order Form

Name___________________________________________________________________________

Job title or occupation________________________________________________________

Organization____________________________________________________________________

Street address_________________________________________________________________

City, state zip (postal) code, country_________________________________________

Electronic mail address__________________________________  Fax ________________

Telephone______________________________________________________________________

	ORDER INFORMATION
Description                     Price            Quantity        Total

Laminated Reference Cards
Mathematica Built-in Objects    $9.95            ________     $________

California residents include 7.25% sales tax                  $________

Postage and handling            $2.00                         $________
($4 for foreign orders)
                                                   Total      $________
Make your check payable to Variable Symbols, Inc. 

__ Send me a reference card for the packages distributed with Mathematica.

We are developing a Mathematica Help HyperCard stack. 
__ Send me a demonstration copy of the Mathematica Help Stack.
__ Contacted when the full release of the Mathematica Help Stack is available.

We are developing additional Mathematica reference material.  
Are you interested in? 
__ Reference cards containing examples
__ Other reference material, please specify___________________________________

Would you be interested in? 
__ On-site training   __ Video tapes  __ Notification of Workshops in your area
__ Off-site training  __ On-line tutorials  
__ Consulting         __ WYSIWYG Front End to Mathematica

What level of training courses would be of interest to you? 
__ Introductory       __ Intermediate     __ Advanced

On which computer systems do you use Mathematica? _____________________________

Do you use Mathematica as part of your job? __ Yes    __ No

How many people in your department or organization use Mathematica?
__ 1   __ 2-5   __ 6-10   __ 11-20   __ Over 20

Where did you hear about Variable Symbols, Inc.? ______________________________

_______________________________________________________________________________
Variable Symbols, Inc. * P.O. Box 9013 * Berkeley, CA 94709-0013 * 415 486 8073
Nancy Blachman  Tel. 415 486-8073   AppleLink: VSI   Email:  nb@cs.stanford.edu

From myers@helios.TN.CORNELL.EDU Sat May  5 11:58:46 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09857; Sat, 5 May 90 11:58:45 -0500
Return-Path: <myers@helios.TN.CORNELL.EDU>
Received: from devvax.TN.CORNELL.EDU by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA28636; Sat, 5 May 90 11:57:54 CDT
Received: from ARTEMIS.TN.CORNELL.EDU by devvax.TN.CORNELL.EDU (5.59-1.12/1.3-Cornell-Theory-Center)
	id AA22768; Sat, 5 May 90 12:57:43 EDT
Received: from localhost by artemis.TN.CORNELL.EDU (3.2/1.1nn-Cornell-LASSP)
	id AA01418; Sat, 5 May 90 12:57:42 EDT
Message-Id: <9005051657.AA01418@artemis.TN.CORNELL.EDU>
To: steve@ncsa.uiuc.edu
Subject: Passing variables to FindMinimum[]
Date: Sat, 05 May 90 12:57:41 -0400
From: myers@helios.TN.CORNELL.EDU
Status: RO

I have a Mathematica question regarding the use of FindMinimum[].  If there
is more than one variational parameter, the correct syntax is

FindMinimum[f, {x[1], x0[1]}, {x[2], x0[2]}, ..., {x[n], x0[n]}], 

where f is the function to be minimized, x[i] are the variational parameters 
and the x0[i] are starting guesses for the x[i].  I am trying to construct 
a routine that will minimize with respect to a variable number (n) of 
variational parameters, as suggested by my example above.  The first 
approach that came to mind was something of the form 

FindMinimum[f, Table[{x[i], x0[i]}, {i,1,n}]],

but the problem with this is that Table[] produces an extra set of {},
resulting in

FindMinimum[f, {{x[1], x0[1]}, {x[2], x0[2]}, ..., {x[n], x0[n]}}].

Somehow the outer set of brackets needs to be stripped, but trying to use
Apply[] in a roundabout way to put FindMinimum at the head of the list has
not been fruitful.  Any ideas, comments, or suggestions would be appreciated.

					Chris Myers
					myers@helios.tn.cornell.edu

From mathgroup-adm@yoda.ncsa.uiuc.edu Sat May  5 15:28:45 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA10085; Sat, 5 May 90 15:28:44 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA01663; Sat, 5 May 90 15:24:16 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09917; Sat, 5 May 90 13:41:32 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09913; Sat, 5 May 90 13:41:31 -0500
Message-Id: <9005051841.AA09913@yoda.ncsa.uiuc.edu>
To: steve@ncsa.uiuc.edu
Subject: Passing variables to FindMinimum[]
Date: Sat, 05 May 90 12:57:41 -0400
From: myers@helios.TN.CORNELL.EDU
Status: RO

I have a Mathematica question regarding the use of FindMinimum[].  If there
is more than one variational parameter, the correct syntax is

FindMinimum[f, {x[1], x0[1]}, {x[2], x0[2]}, ..., {x[n], x0[n]}], 

where f is the function to be minimized, x[i] are the variational parameters 
and the x0[i] are starting guesses for the x[i].  I am trying to construct 
a routine that will minimize with respect to a variable number (n) of 
variational parameters, as suggested by my example above.  The first 
approach that came to mind was something of the form 

FindMinimum[f, Table[{x[i], x0[i]}, {i,1,n}]],

but the problem with this is that Table[] produces an extra set of {},
resulting in

FindMinimum[f, {{x[1], x0[1]}, {x[2], x0[2]}, ..., {x[n], x0[n]}}].

Somehow the outer set of brackets needs to be stripped, but trying to use
Apply[] in a roundabout way to put FindMinimum at the head of the list has
not been fruitful.  Any ideas, comments, or suggestions would be appreciated.

					Chris Myers
					myers@helios.tn.cornell.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat May  5 17:33:13 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA10251; Sat, 5 May 90 17:33:12 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA03360; Sat, 5 May 90 17:28:42 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09904; Sat, 5 May 90 13:34:57 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09900; Sat, 5 May 90 13:34:55 -0500
Message-Id: <9005051834.AA09900@yoda.ncsa.uiuc.edu>
To: stevec@yoda.ncsa.uiuc.edu
Subject: An improved posting
Date: Fri, 04 May 90 17:24:05 PDT
From: nb@Sunburn.Stanford.EDU
Status: RO

-----------------------------------------------------------------------------
Variable Symbols, Inc. offers training, consulting, and reference materials
for people who use or plan to use Mathematica.

PRODUCTS
Variable Symbols, Inc. has developed two help facilities:  Mathematica 
Reference Cards and a Mathematica Help Stack based on HyperCard.

THE MATHEMATICA HELP STACK makes it simple to find information about
functions, and commands in Mathematica.  It categorizes each of them
and offers a visual representation for some.   Demonstrations copies 
of this stack are available.

THE MATHEMATICA REFERENCE CARDS provide a summary of the functions in
Mathematica.  One laminated four-card set describes Mathematica's built-in
objects and lists all functions, options, variables, aliases, and
special forms available in Version 1.2.  The second set, made up of
five double-sided pages, lists all objects defined in the packages 
distributed with Mathematica and includes a cross reference. If you know 
the name of a function, you can lookup the name of the folder/directory 
in which it is contained.

Nancy Blachman  Tel. 415 486-8073   AppleLink: VSI   Email:  nb@cs.stanford.edu 
Variable Symbols, Inc. * P.O. Box 9013 * Berkeley, CA 94709-0013 * 415 486 8073

Order form follows.

_______________________________________________________________________________

                    Variable Symbols, Inc. Order Form

Name___________________________________________________________________________

Job title or occupation________________________________________________________

Organization____________________________________________________________________

Street address_________________________________________________________________

City, state zip (postal) code, country_________________________________________

Electronic mail address__________________________________  Fax ________________

Telephone______________________________________________________________________

	ORDER INFORMATION
Description                     Price            Quantity        Total

Laminated Reference Cards
Mathematica Built-in Objects    $9.95            ________     $________

California residents include 7.25% sales tax                  $________

Postage and handling            $2.00                         $________
($4 for foreign orders)
                                                   Total      $________
Make your check payable to Variable Symbols, Inc. 

__ Send me a reference card for the packages distributed with Mathematica.

We are developing a Mathematica Help HyperCard stack. 
__ Send me a demonstration copy of the Mathematica Help Stack.
__ Contacted when the full release of the Mathematica Help Stack is available.

We are developing additional Mathematica reference material.  
Are you interested in? 
__ Reference cards containing examples
__ Other reference material, please specify___________________________________

Would you be interested in? 
__ On-site training   __ Video tapes  __ Notification of Workshops in your area
__ Off-site training  __ On-line tutorials  
__ Consulting         __ WYSIWYG Front End to Mathematica

What level of training courses would be of interest to you? 
__ Introductory       __ Intermediate     __ Advanced

On which computer systems do you use Mathematica? _____________________________

Do you use Mathematica as part of your job? __ Yes    __ No

How many people in your department or organization use Mathematica?
__ 1   __ 2-5   __ 6-10   __ 11-20   __ Over 20

Where did you hear about Variable Symbols, Inc.? ______________________________

_______________________________________________________________________________
Variable Symbols, Inc. * P.O. Box 9013 * Berkeley, CA 94709-0013 * 415 486 8073
Nancy Blachman  Tel. 415 486-8073   AppleLink: VSI   Email:  nb@cs.stanford.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat May  5 16:30:11 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA10166; Sat, 5 May 90 16:30:09 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA02520; Sat, 5 May 90 16:25:42 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09923; Sat, 5 May 90 13:42:11 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09919; Sat, 5 May 90 13:42:10 -0500
Message-Id: <9005051842.AA09919@yoda.ncsa.uiuc.edu>
Date: Sat, 5 May 90 10:18:55 -0700
From: stewart@sdsu.edu (Kris Stewart)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Differential Equation Solutions
Status: RO

I'm a new Mathematica user.  I was hoping for a strong differential
equation solving facility in Mathematica.  I don't know whether I'm
not using it correctly yet, or what.  I started with a simple 
initial value problem, y''= -y, y(0)=0, y'(0)=1, and I expected the
solution, y(x)=sin(x).  Instead the solution was in the equivalent,
but complicated, complex exponential form still.  Is there a easy
to simplification package that I haven't found out about?  I would
like to attempt more elaborate DEs, but would solutions returned in
as straight forward a form as possible.  Please advise.  (Note, I
ran this example with Maple and got precisely the results I expected.
Did I purchase the wrong symbolic package?)

In[3]:= DSolve[{y'[x]==w[x],w'[x]==-y[x],y[0]==0,w[0]==1},{y[x],w[x]},x]

                   -I x          2 I x            -I x       2 I x
                  E     (-I + I E     )          E     (1 + E     )
Out[3]= {{y[x] -> ---------------------, w[x] -> ------------------}}
                            2                            2

Thanks, in advance, for any community help I receive.
Kris Stewart   stewart@cs.sdsu.edu



From testgroup-adm@yoda.ncsa.uiuc.edu Mon May  7 10:22:16 1990
To: Steve Christensen <stevec@yoda.ncsa.uiuc.edu>
Subject: Reference Material for Mathematica Users 
Status: RO

-----------------------------------------------------------------------------
To: MathGroup
Subject: Reference Material for Mathematica Users 


Variable Symbols, Inc. offers training, consulting, and reference materials
for people who use or plan to use Mathematica.

PRODUCTS
Variable Symbols, Inc. has developed two help facilities:  Mathematica 
Reference Cards and a Mathematica Help Stack based on HyperCard.

THE MATHEMATICA HELP STACK makes it simple to find information about
functions, and commands in Mathematica.  It categorizes each of them
and offers a visual representation for some.   Demonstrations copies 
of this stack are available.

THE MATHEMATICA REFERENCE CARDS provide a summary of the functions in
Mathematica.  One laminated four-card set describes Mathematica's built-in
objects and lists all functions, options, variables, aliases, and
special forms available in Version 1.2.  The second set, made up of
five double-sided pages, lists all objects defined in the packages 
distributed with Mathematica and includes a cross reference. If you know 
the name of a function, you can lookup the name of the folder/directory 
in which it is contained.

Nancy Blachman  Tel. 415 486-8073   AppleLink: VSI   Email:  nb@cs.stanford.edu 
Variable Symbols, Inc. * P.O. Box 9013 * Berkeley, CA 94709-0013 * 415 486 8073

Order form follows.

_______________________________________________________________________________

                    Variable Symbols, Inc. Order Form

Name___________________________________________________________________________

Job title or occupation________________________________________________________

Organization___________________________________________________________________

Street address_________________________________________________________________

City, state zip (postal) code, country_________________________________________

Electronic mail address__________________________________  Fax ________________

Telephone______________________________________________________________________

	ORDER INFORMATION
Description                     Price            Quantity        Total

Laminated Reference Cards
Mathematica Built-in Objects    $9.95            ________     $________

California residents include 7.25% sales tax                  $________

Postage and handling            $2.00                         $________
($4 for foreign orders)
                                                   Total      $________
Make your check payable to Variable Symbols, Inc. 

__ Send me a reference card for the packages distributed with Mathematica.

We are developing a Mathematica Help HyperCard stack. 
__ Send me a demonstration copy of the Mathematica Help Stack.
__ Contacted when the full release of the Mathematica Help Stack is available.

We are developing additional Mathematica reference material.  
Are you interested in? 
__ Reference cards containing examples
__ Other reference material, please specify___________________________________

Would you be interested in? 
__ On-site training   __ Video tapes  __ Notification of Workshops in your area
__ Off-site training  __ On-line tutorials  
__ Consulting         __ WYSIWYG Front End to Mathematica

What level of training courses would be of interest to you? 
__ Introductory       __ Intermediate     __ Advanced

On which computer systems do you use Mathematica? _____________________________

Do you use Mathematica as part of your job? __ Yes    __ No

How many people in your department or organization use Mathematica?
__ 1   __ 2-5   __ 6-10   __ 11-20   __ Over 20

Where did you hear about Variable Symbols, Inc.? ______________________________

_______________________________________________________________________________
Variable Symbols, Inc. * P.O. Box 9013 * Berkeley, CA 94709-0013 * 415 486 8073
Nancy Blachman  Tel. 415 486-8073   AppleLink: VSI   Email:  nb@cs.stanford.edu


From jacobson@cello.hpl.hp.com Mon May  7 11:05:00 1990
To: myers@helios.TN.CORNELL.EDU, mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Passing variables to FindMinimum[] 
In-Reply-To: Your message of "Sat, 05 May 90 12:57:41 EDT."
             <9005051841.AA09913@yoda.ncsa.uiuc.edu> 
Status: RO

Chris Myers writes:

> I have a Mathematica question regarding the use of FindMinimum[].  If there
> is more than one variational parameter, the correct syntax is
> 
> FindMinimum[f, {x[1], x0[1]}, {x[2], x0[2]}, ..., {x[n], x0[n]}], 
> 
> where f is the function to be minimized, x[i] are the variational parameters 
> and the x0[i] are starting guesses for the x[i].  I am trying to construct 
> a routine that will minimize with respect to a variable number (n) of 
> variational parameters, as suggested by my example above. ...

Here is a construct that I think will do what you want.

Apply[FindMinimum,Prepend[Table[{x[i], x0[i]}, {i,1,n}],f]]

  -- David Jacobson

From @vmd.cso.uiuc.edu:AN123651@UTHVM1.BITNET Mon May  7 11:52:05 1990
Received: from vmd.cso.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA13179; Mon, 7 May 90 11:52:04 -0500
Message-Id: <9005071652.AA13179@yoda.ncsa.uiuc.edu>
Received: from UTHVM1.BITNET by VMD.CSO.UIUC.EDU (IBM VM SMTP R1.2) with BSMTP id 7778; Mon, 07 May 90 11:51:26 CDT
Received: from UTHVM1 (AN123651) by UTHVM1.BITNET (Mailer R2.05) with BSMTP id
 3120; Mon, 07 May 90 11:50:09 CST
Date:         Mon, 07 May 90 11:47:53 CST
From: "E. Neely Atkinson" <AN123651@uthvm1.bitnet>
Subject:      Simplification of powers
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Is there a way to get Mathematica to simplify

              4^(1/3) / (2 2^(1/3))

to 2^(-2/3) or is this actually a hard problem?

                               E. Neely Atkinson
                               AN123651 at UTHVM1.BITNET
                               neely@mdaali.cancer.utexas.edu

From mathgroup-adm@yoda.ncsa.uiuc.edu Mon May  7 13:58:27 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA13479; Mon, 7 May 90 13:58:26 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA17573; Mon, 7 May 90 13:53:56 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA13160; Mon, 7 May 90 11:32:13 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA13156; Mon, 7 May 90 11:32:12 -0500
Message-Id: <9005071632.AA13156@yoda.ncsa.uiuc.edu>
From: jacobson@cello.hpl.hp.com
Date: Mon May  7 11:05:00 1990
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Passing variables to FindMinimum[] 
Status: RO

Chris Myers writes:

> I have a Mathematica question regarding the use of FindMinimum[].  If there
> is more than one variational parameter, the correct syntax is
> 
> FindMinimum[f, {x[1], x0[1]}, {x[2], x0[2]}, ..., {x[n], x0[n]}], 
> 
> where f is the function to be minimized, x[i] are the variational parameters 
> and the x0[i] are starting guesses for the x[i].  I am trying to construct 
> a routine that will minimize with respect to a variable number (n) of 
> variational parameters, as suggested by my example above. ...

Here is a construct that I think will do what you want.

Apply[FindMinimum,Prepend[Table[{x[i], x0[i]}, {i,1,n}],f]]

  -- David Jacobson


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon May  7 14:43:09 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA13632; Mon, 7 May 90 14:43:08 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA18760; Mon, 7 May 90 14:38:35 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA13154; Mon, 7 May 90 11:31:30 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA13150; Mon, 7 May 90 11:31:28 -0500
Message-Id: <9005071631.AA13150@yoda.ncsa.uiuc.edu>
From: nb@Sunburn.Stanford.EDU
Date: Mon May  7 03:06:52 1990
To: Steve Christensen <stevec@yoda.ncsa.uiuc.edu>
Subject: Reference Material for Mathematica Users 
Status: RO

-----------------------------------------------------------------------------
To: MathGroup
Subject: Reference Material for Mathematica Users 


Variable Symbols, Inc. offers training, consulting, and reference materials
for people who use or plan to use Mathematica.

PRODUCTS
Variable Symbols, Inc. has developed two help facilities:  Mathematica 
Reference Cards and a Mathematica Help Stack based on HyperCard.

THE MATHEMATICA HELP STACK makes it simple to find information about
functions, and commands in Mathematica.  It categorizes each of them
and offers a visual representation for some.   Demonstrations copies 
of this stack are available.

THE MATHEMATICA REFERENCE CARDS provide a summary of the functions in
Mathematica.  One laminated four-card set describes Mathematica's built-in
objects and lists all functions, options, variables, aliases, and
special forms available in Version 1.2.  The second set, made up of
five double-sided pages, lists all objects defined in the packages 
distributed with Mathematica and includes a cross reference. If you know 
the name of a function, you can lookup the name of the folder/directory 
in which it is contained.

Nancy Blachman  Tel. 415 486-8073   AppleLink: VSI   Email:  nb@cs.stanford.edu 
Variable Symbols, Inc. * P.O. Box 9013 * Berkeley, CA 94709-0013 * 415 486 8073

Order form follows.

_______________________________________________________________________________

                    Variable Symbols, Inc. Order Form

Name___________________________________________________________________________

Job title or occupation________________________________________________________

Organization___________________________________________________________________

Street address_________________________________________________________________

City, state zip (postal) code, country_________________________________________

Electronic mail address__________________________________  Fax ________________

Telephone______________________________________________________________________

	ORDER INFORMATION
Description                     Price            Quantity        Total

Laminated Reference Cards
Mathematica Built-in Objects    $9.95            ________     $________

California residents include 7.25% sales tax                  $________

Postage and handling            $2.00                         $________
($4 for foreign orders)
                                                   Total      $________
Make your check payable to Variable Symbols, Inc. 

__ Send me a reference card for the packages distributed with Mathematica.

We are developing a Mathematica Help HyperCard stack. 
__ Send me a demonstration copy of the Mathematica Help Stack.
__ Contacted when the full release of the Mathematica Help Stack is available.

We are developing additional Mathematica reference material.  
Are you interested in? 
__ Reference cards containing examples
__ Other reference material, please specify___________________________________

Would you be interested in? 
__ On-site training   __ Video tapes  __ Notification of Workshops in your area
__ Off-site training  __ On-line tutorials  
__ Consulting         __ WYSIWYG Front End to Mathematica

What level of training courses would be of interest to you? 
__ Introductory       __ Intermediate     __ Advanced

On which computer systems do you use Mathematica? _____________________________

Do you use Mathematica as part of your job? __ Yes    __ No

How many people in your department or organization use Mathematica?
__ 1   __ 2-5   __ 6-10   __ 11-20   __ Over 20

Where did you hear about Variable Symbols, Inc.? ______________________________

_______________________________________________________________________________
Variable Symbols, Inc. * P.O. Box 9013 * Berkeley, CA 94709-0013 * 415 486 8073
Nancy Blachman  Tel. 415 486-8073   AppleLink: VSI   Email:  nb@cs.stanford.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon May  7 15:39:41 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA13788; Mon, 7 May 90 15:39:40 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA20113; Mon, 7 May 90 15:35:09 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA13231; Mon, 7 May 90 12:38:42 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA13227; Mon, 7 May 90 12:38:41 -0500
Message-Id: <9005071738.AA13227@yoda.ncsa.uiuc.edu>
Date:         Mon, 07 May 90 11:47:53 CST
From: "E. Neely Atkinson" <AN123651@uthvm1.bitnet>
Subject:      Simplification of powers
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Is there a way to get Mathematica to simplify

              4^(1/3) / (2 2^(1/3))

to 2^(-2/3) or is this actually a hard problem?

                               E. Neely Atkinson
                               AN123651 at UTHVM1.BITNET
                               neely@mdaali.cancer.utexas.edu


From myers@helios.TN.CORNELL.EDU Tue May  8 16:40:08 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA15654; Tue, 8 May 90 16:40:07 -0500
Return-Path: <myers@helios.TN.CORNELL.EDU>
Received: from devvax.TN.CORNELL.EDU by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA22750; Tue, 8 May 90 16:39:19 CDT
Received: from artemis.tn.cornell.edu by devvax.TN.CORNELL.EDU (5.59-1.12/1.3-Cornell-Theory-Center)
	id AA00335; Mon, 7 May 90 19:49:06 EDT
Received: from localhost by artemis.TN.CORNELL.EDU (3.2/1.1nn-Cornell-LASSP)
	id AA04558; Mon, 7 May 90 19:49:04 EDT
Message-Id: <9005072349.AA04558@artemis.TN.CORNELL.EDU>
To: steve@ncsa.uiuc.edu
Subject: Re: Passing variables to FindMinimum[]
Date: Mon, 07 May 90 19:49:02 -0400
From: myers@helios.TN.CORNELL.EDU
Status: RO

To the mathgroup --

I received many responses to my query regarding how to pass an undetermined
number of variables to FindMinimum[].  I thank everyone who took the time to
share their tricks.  For those who didn't know how to answer my question,
I'll pass along some of the more popular responses.

The first involves constructing a secondary list which folds together
the function to be minimized and the set of variational parameters.

   Apply [FindMinimum, Prepend[Table[{x[i],x0[i]},{i,1,2}],f]]

The second takes advantage of the apparently undocumented command Sequence
to strip the outer brackets of the nested list.

   FindMinimum[ f, Sequence @@ Table[...]]

The third, and to me the most appealing, is to apply FindMinimum[f] to the
list of variables.  I had tried this approach, but with only a single #
instead of the required ##; using a single # results in an application to
only the first element of the Table, whereas ## applies to all arguments.

 ((FindMinimum[f, ##])&) @@ Table[{x[i], x0[i]}, {i,1,n}]

	Once again, thanks for the help.

						Chris Myers
						myers@helios.tn.cornell.edu


From sdw@hpsadsdw.hp.com Tue May  8 18:04:52 1990
Received: from hp-sde.sde.hp.com by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA15737; Tue, 8 May 90 18:04:50 -0500
Received: from hpcea.ce.hp.com by hp-sde.sde.hp.com with SMTP
	(16.2A/15.5+IOS 3.13) id AA23062; Tue, 8 May 90 16:03:55 -0700
Received: from hpsadsdw.HP.COM by hpcea ; Tue, 8 May 90 16:03:22 pdt
Received: by hpsadsdw.HP.COM; Tue, 8 May 90 16:02:02 pdt
Message-Id: <9005082302.AA06926@hpsadsdw.HP.COM>
Subject: log plots
To: mathgroup@yoda.ncsa.uiuc.edu (mathgroup for mathematica)
Date: Tue, 8 May 90 16:01:59 PDT
From: Steven Warwick <sdw@hpsadsdw.hp.com>
Organization: Hewlett-Packard
Phone: 1-794-3198
Address: 1212 Valley House Drive, Rohnert Park, Ca 94928-4999
Mailer: Elm [revision: 64.9]
Status: RO

OK friends, how about a method of making plots where instead of tic
marks, we get a full grid, like on log-log and log-lin paper! perhaps
even thinner lines for the grid than the actual data...




--
Steven Warwick

Hewlett-Packard
sdw@hpsad

From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May  8 19:51:34 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA16067; Tue, 8 May 90 19:51:33 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA25629; Tue, 8 May 90 19:47:10 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA15767; Tue, 8 May 90 18:16:47 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA15763; Tue, 8 May 90 18:16:46 -0500
Message-Id: <9005082316.AA15763@yoda.ncsa.uiuc.edu>
Subject: log plots
To: mathgroup@yoda.ncsa.uiuc.edu (mathgroup for mathematica)
Date: Tue, 8 May 90 16:01:59 PDT
From: sdw@hpsadsdw.hp.com
Status: RO

OK friends, how about a method of making plots where instead of tic
marks, we get a full grid, like on log-log and log-lin paper! perhaps
even thinner lines for the grid than the actual data...




--
Steven Warwick

Hewlett-Packard
sdw@hpsad


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May  8 20:51:18 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA16217; Tue, 8 May 90 20:51:17 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA26504; Tue, 8 May 90 20:46:54 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA15754; Tue, 8 May 90 18:15:21 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA15750; Tue, 8 May 90 18:15:20 -0500
Message-Id: <9005082315.AA15750@yoda.ncsa.uiuc.edu>
To: steve@ncsa.uiuc.edu
Subject: Re: Passing variables to FindMinimum[]
Date: Mon, 07 May 90 19:49:02 -0400
From: myers@helios.TN.CORNELL.EDU
Status: RO

To the mathgroup --

I received many responses to my query regarding how to pass an undetermined
number of variables to FindMinimum[].  I thank everyone who took the time to
share their tricks.  For those who didn't know how to answer my question,
I'll pass along some of the more popular responses.

The first involves constructing a secondary list which folds together
the function to be minimized and the set of variational parameters.

   Apply [FindMinimum, Prepend[Table[{x[i],x0[i]},{i,1,2}],f]]

The second takes advantage of the apparently undocumented command Sequence
to strip the outer brackets of the nested list.

   FindMinimum[ f, Sequence @@ Table[...]]

The third, and to me the most appealing, is to apply FindMinimum[f] to the
list of variables.  I had tried this approach, but with only a single #
instead of the required ##; using a single # results in an application to
only the first element of the Table, whereas ## applies to all arguments.

 ((FindMinimum[f, ##])&) @@ Table[{x[i], x0[i]}, {i,1,n}]

	Once again, thanks for the help.

						Chris Myers
						myers@helios.tn.cornell.edu



From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May  8 22:50:30 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA16364; Tue, 8 May 90 22:50:29 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA28155; Tue, 8 May 90 22:46:04 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA16287; Tue, 8 May 90 21:25:19 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA16283; Tue, 8 May 90 21:25:17 -0500
Message-Id: <9005090225.AA16283@yoda.ncsa.uiuc.edu>
To: steve@ncsa.uiuc.edu
Subject: Re: Passing variables to FindMinimum[]
Date: Mon, 07 May 90 19:49:02 -0400
From: myers@helios.TN.CORNELL.EDU
Status: RO

To the mathgroup --

I received many responses to my query regarding how to pass an undetermined
number of variables to FindMinimum[].  I thank everyone who took the time to
share their tricks.  For those who didn't know how to answer my question,
I'll pass along some of the more popular responses.

The first involves constructing a secondary list which folds together
the function to be minimized and the set of variational parameters.

   Apply [FindMinimum, Prepend[Table[{x[i],x0[i]},{i,1,2}],f]]

The second takes advantage of the apparently undocumented command Sequence
to strip the outer brackets of the nested list.

   FindMinimum[ f, Sequence @@ Table[...]]

The third, and to me the most appealing, is to apply FindMinimum[f] to the
list of variables.  I had tried this approach, but with only a single #
instead of the required ##; using a single # results in an application to
only the first element of the Table, whereas ## applies to all arguments.

 ((FindMinimum[f, ##])&) @@ Table[{x[i], x0[i]}, {i,1,n}]

	Once again, thanks for the help.

						Chris Myers
						myers@helios.tn.cornell.edu




From mathgroup-adm@yoda.ncsa.uiuc.edu Wed May  9 03:38:58 1990
Received: from lth.se by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA17150; Wed, 9 May 90 03:38:39 -0500
Received: from Valhall.dna.lth.se by lth.se (5.61-bind 1.5+ida/LTH-4-NS); Wed, 9 May 90 10:03:24 +0200 (MET)
Received: from sunic.sunet.se by DNA.LTH.Se (5.61-bind 1.4+ida/DNA 4-Dan); Wed, 9 May 90 10:05:10 +0200 (MET)
Received: from mcsun.eu.net by sunic.sunet.se (5.61+IDA/KTH/LTH/1.135)
	id AAsunic14231; Wed, 9 May 90 10:04:53 +0200
Received: by mcsun.EU.net via EUnet; Wed, 9 May 90 02:54:44 +0200 (MET)
Received: from uiucuxc.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA10895; Tue, 8 May 90 20:49:43 -0400
Received: from yoda.ncsa.uiuc.edu by uxc.cso.uiuc.edu with SMTP
	(5.62+/IDA-1.2.8) id AA10174; Tue, 8 May 90 19:33:24 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA15767; Tue, 8 May 90 18:16:47 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA15763; Tue, 8 May 90 18:16:46 -0500
Message-Id: <9005082316.AA15763@yoda.ncsa.uiuc.edu>
Subject: log plots
To: mathgroup@yoda.ncsa.uiuc.edu (mathgroup for mathematica)
Date: Tue, 8 May 90 16:01:59 PDT
From: sdw@hpsadsdw.hp.com
Status: RO

OK friends, how about a method of making plots where instead of tic
marks, we get a full grid, like on log-log and log-lin paper! perhaps
even thinner lines for the grid than the actual data...




--
Steven Warwick

Hewlett-Packard
sdw@hpsad


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri May 11 00:32:43 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02213; Fri, 11 May 90 00:32:42 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA10012; Fri, 11 May 90 00:28:34 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01467; Thu, 10 May 90 23:11:27 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01463; Thu, 10 May 90 23:11:25 -0500
Message-Id: <9005110411.AA01463@yoda.ncsa.uiuc.edu>
Date: Thu, 10 May 90 23:09:09 -0500
From: Steve Christensen <stevec@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Combinatorica (Discrete Mathematics Package)
Status: RO


I have just placed the new Mathematica package Combinatorica.m
in the Symbolic/Mathematica/Packages/SKIENA directory
on the NCSA anonymous ftp server (128.174.20.50).  Here are two
files from that directory and a contact address for
Steve Skiena, the author.  This is a Beta release.

Steve Christensen

======================================================================

(*

        Implementing Discrete Mathematics: Combinatorics and Graph Theory
                                with Mathematica

                Version 0.5   5/8/90   Beta Release

                Copyright (c) 1990 by Steven S. Skiena

This package contains all the programs from the book, "Implementing
Discrete Mathematics: Combinatorics and Graph Theory with Mathematica"
by Steven S. Skiena, Addison-Wesley Publishing Co., Advanced Book Program,
350 Bridge Parkway, Redwood City CA 94065.  ISBN 0-201-50943-1.
For ordering information, call 1-800-447-2226.

This package is copyright 1990 by Steven S. Skiena.  It may be copied
in its entirety for nonprofit purposes only.  Sale, other than for the
direct cost of the media, is prohibited.  This copyright notice must
accompany all copies.

These programs can be obtained on Macintosh and MS-DOS disks by sending
$15.00 to Discrete Mathematics Disk, Wolfram Research Inc.,
PO Box 6059, Champaign, IL 61826-9905. (217)-398-0700.

The author, Wolfram research, and Addison-Wesley Publishing Company,
Inc. make no representations, express or implied, with respond to this
documentation, of the software it describes and contains, including
without limitations, any implied warranties of mechantability or fitness
for a particular purpose, all of which are expressly disclaimed.  The
author, Wolfram Research, or Addison-Wesley, their licensees,
distributors and dealers shall in no event be liable for any indirect,
incidental, or consequential damages.

This beta release is designed to run under Version 1.2 of Mathematica.
Any comments, bug reports, or requests to get on the Combinatorica
mailing list should be forwarded to:

        Steven Skiena
        Department of Computer Science
        State University of New York
        Stony Brook, NY 11794

        skiena@sbcs.sunysb.edu

        (516)-632-9026 / 8470

*)

=======================================================================

The Combinatorial Mathematica package contains all the programs from
the book, "Implementing Discrete Mathematics: Combinatorics and Graph
Theory with Mathematica" by Steven S. Skiena, Addison-Wesley Publishing
Co., Advanced Book Program, 350 Bridge Parkway, Redwood City CA 94065.
ISBN 0-201-50943-1.  For ordering information, call 1-800-447-2226.

Combinatorial Mathematica currently consists of one file, Combinatorica.m.
It is a 100K ASCII file, and so should be easy to ftp.  Since some mailers
choke on files this large, we have also prepared a distribution of three
smaller files, Part01, Part02, and Part03.

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

(0) A General Public License for Combinatorial Mathematica is in the file
    COPYING.

(1) To execute Combinatorial Mathematica, enter Mathematica and load the
    package (<<Combinatorica.m}

(2) Documentation strings for all important functions are included with
    the package.

(3) By sending your address to skiena@sbcs.sunysb.edu, you will be placed
    on a Combinatorial Mathematica mailing list and informed about
    new releases.

(4) Part01, Part02, and Part03 are shar files.  Running each through unshar
    or /bin/sh unpacks the files.  The main package is broken into three
    files: part1, part2, and part3.  To reconstruct the package, the three
    parts must be concatenated into the file Combinatorica.m.  The script
    makepackage does this automatically.
---


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri May 11 18:04:55 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03160; Fri, 11 May 90 18:04:54 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA04871; Fri, 11 May 90 18:00:23 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03133; Fri, 11 May 90 17:09:10 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03129; Fri, 11 May 90 17:09:08 -0500
Date: Fri, 11 May 90 17:09:08 -0500
Message-Id: <9005112209.AA03129@yoda.ncsa.uiuc.edu>
From: GALANG@bcvms.bitnet
Subject:  Mathematica and the vax
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Hi there,

I was told that someone there would be able to tell me of user/s that are
using Mathematica on a Apple Mac/VAX setup with either VMS or Ultrix running.

I am very interested in knowing how well it works and the ease of
implementation.

If someone could help me out I would be very greatful.


Roy D. Galang
Boston College
Galang@BCVAX2



From macg@SLCS.SLB.COM Tue May 15 09:05:37 1990
Received: from SLCS.SLB.COM by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA07325; Tue, 15 May 90 09:05:35 -0500
Received: from frank.SLCS.SLB.COM
	by SLCS.SLB.COM (4.1/SLCS Mailhost 3.2)
	id AA18545; Tue, 15 May 90 09:05:56 CDT
From: macg@SLCS.SLB.COM (Bill Macgregor)
Received: by frank.SLCS.SLB.COM (4.1/SLCS Subsidiary 1.6)
	id AA03074; Tue, 15 May 90 09:05:52 CDT
Date: Tue, 15 May 90 09:05:52 CDT
Message-Id: <9005151405.AA03074.macg@frank.SLCS.SLB.COM>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica 2.0?
Status: RO

WRI discussed plans for Mma 2.0 at the Mathematica conference
in January.  Several possible additions to Mma are very 
desirable--a pseudocode compiler for numerical functions, 
alternation in pattern matching, expression typesetting (maybe
by way of a TeXForm interpreter?), and numerical functions
defined by interpolation on discrete sample sets, for example.

Can anyone provide us with an update/progress report on Mma 2.0?
Does it still look like release in 1990?  Any major additions/
deletions for the planned enhancements?  If someone can speak
with authority, a quick review of the entire plan (e.g., new
Packages?) would be appreciated by the mailing list.

Thanks for any help in advance,

  - Bill MacGregor


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May 15 11:00:01 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA07459; Tue, 15 May 90 11:00:00 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA04467; Tue, 15 May 90 10:55:28 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA07365; Tue, 15 May 90 10:24:28 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA07361; Tue, 15 May 90 10:24:27 -0500
Message-Id: <9005151524.AA07361@yoda.ncsa.uiuc.edu>
From: macg@SLCS.SLB.COM (Bill Macgregor)
Date: Tue, 15 May 90 09:05:52 CDT
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica 2.0?
Status: RO

WRI discussed plans for Mma 2.0 at the Mathematica conference
in January.  Several possible additions to Mma are very 
desirable--a pseudocode compiler for numerical functions, 
alternation in pattern matching, expression typesetting (maybe
by way of a TeXForm interpreter?), and numerical functions
defined by interpolation on discrete sample sets, for example.

Can anyone provide us with an update/progress report on Mma 2.0?
Does it still look like release in 1990?  Any major additions/
deletions for the planned enhancements?  If someone can speak
with authority, a quick review of the entire plan (e.g., new
Packages?) would be appreciated by the mailing list.

Thanks for any help in advance,

  - Bill MacGregor



From @uunet.UU.NET:ebneter@wri.UUCP Wed May 16 14:31:00 1990
Received: from uunet.UU.NET by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA08838; Wed, 16 May 90 14:30:58 -0500
Received: from wri.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA10711; Wed, 16 May 90 15:30:53 -0400
Received: by WRI.com (3.2/SMI-3.0DEV3)
	id AA02106; Wed, 16 May 90 14:24:26 CDT
Date: Wed, 16 May 90 14:24:26 CDT
From: ebneter@wri.UUCP (Kate Ebneter)
Message-Id: <9005161924.AA02106@WRI.com>
To: stevec@yoda.ncsa.uiuc.edu
Status: RO

Steve,

Attached below is a reply to Stefan Mueller's article roasting us over the
Together bug.  It states our policy fairly well, I hope, as well as pointing
out that we *did* send out upgrades to fix the bug.  (I don't know how we
missed him...I sure wish we hadn't!)  Could you send this out?  If there
are any problems with it, please let me know, and we'll fix 'em.

Thanks!

(And thanks for alerting us to this ... he posted it to info-mac also, from
where it went out worldwide over usenet.  Yikes!)

Kate Ebneter

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

A recent posting to the mathgroup by Dr. Stefan Mueller raises some valid
questions about bugs in Mathematica.  As the manager of the Software Quality
Assurance Department at Wolfram Research, I would like to address these issues.

There was indeed a bug, as described by Dr. Mueller, in early versions of
Mathematica 1.2 on all platforms.  The bug was actually in the Together
function, and was due to a fairly subtle logic error.  This bug caused 
Together to give incorrect answers for expressions involving both integer 
and rational powers of the same subexpression.  A very simple example of 
this problem:

In[2]:= Together[(a + b x)/(1 + Sqrt[a + b x])]

          Sqrt[a + b x]
Out[2]= -----------------
        1 + Sqrt[a + b x]

... which of course should give:

             a + b x
Out[2]= -----------------
        1 + Sqrt[a + b x]


... which is what the current versions of Mathematica do indeed give.  Because
Simplify calls Together (as do many other functions in our algebraic simplifi-
cation system), this bug was manifested in Simplify as well, as shown by Dr.
Mueller's example.

As soon as this bug was discovered, a fix was made and a free upgrade was sent
to all of our registered users.  We sent out several thousand "fix" disks to 
our Macintosh customers.  This was the first time in the history of Mathematica
that Wolfram Research has had to send out upgrades of this kind, as this was
the first time that a bug of this severity was uncovered in a released version
of the program.  Unfortunately, as Dr. Mueller's case demonstrates, some of our
users did not receive their upgrade disks.  We are currently investigating how 
and why this happened, and are taking steps to ensure that it does not happen 
again should such an occasion arise in the future.

The policy of Wolfram Research is that if a bug is found that causes a
function to give incorrect answers, and it is in a function used by most or
all of our users, we will send out free upgrades to all of our registered 
users. If the bug is in a more specialized function, which does not
affect other functions, free upgrades will be sent to registered users who 
request it.  The letters accompanying any future such upgrades will explicitly 
state which functions are affected by the upgrade.  Note, however, the 
importance of registering your copy of Mathematica:  We cannot notify you of
upgrades or send you bug fixes if your copy is not registered.

More importantly, we are taking significant steps to ensure that such bugs
do not appear in released versions of Mathematica.  We have a very ambitious 
program for testing Mathematica, and we are always interested in hearing 
suggestions for further tests.  For example, in recent months we have been 
comparing the output of Mathematica's special functions with the tables in 
Abramowitz and Stegun.  (We found a couple of typographical errors in 
Abramowitz and Stegun; we didn't find any new bugs in Mathematica.  I won't 
say anything about old bugs! ;-) )  We have a very intensive testing effort 
scheduled for this summer; the SQA department has hired seven additional summer
interns to test various aspects of the program.

Of course, testing can only find bugs; it cannot prove that there are no bugs.
Although we try to keep the program bug-free, in a system of the size and
complexity of Mathematica, some errors are inevitable.  If you do find
a bug in Mathematica, please send us a bug report by email to bugs@wri.com,
by fax at (217) 398-0747 (to the attention of the SQA Department), or by
snail mail to Software Quality Assurance, Wolfram Research, Inc., P.O. Box
6059, Champaign, IL 61826-6059.  We can't fix them if we don't know
about them!  Your bug report will be acknowledged and you will be given a
bug-tracking number which you may use if you wish to inquire about the status
of the bug.

If you have any general concerns or comments about the quality of Mathematica,
please contact me by email at sqa@wri.com, or by fax or mail as above.


Kate Ebneter
Software Quality Assurance Manager
Wolfram Research, Inc.


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed May 16 21:02:05 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09345; Wed, 16 May 90 21:02:04 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA16665; Wed, 16 May 90 20:58:24 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09028; Wed, 16 May 90 18:42:38 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09024; Wed, 16 May 90 18:42:37 -0500
Message-Id: <9005162342.AA09024@yoda.ncsa.uiuc.edu>
Date: Wed, 16 May 90 14:24:26 CDT
From: ebneter@wri.UUCP (Kate Ebneter)
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

[This is the response by Wolfram Research to the two previous
messages. -- Steve Christensen.]

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

A recent posting to the mathgroup by Dr. Stefan Mueller raises some valid
questions about bugs in Mathematica.  As the manager of the Software Quality
Assurance Department at Wolfram Research, I would like to address these issues.

There was indeed a bug, as described by Dr. Mueller, in early versions of
Mathematica 1.2 on all platforms.  The bug was actually in the Together
function, and was due to a fairly subtle logic error.  This bug caused 
Together to give incorrect answers for expressions involving both integer 
and rational powers of the same subexpression.  A very simple example of 
this problem:

In[2]:= Together[(a + b x)/(1 + Sqrt[a + b x])]

          Sqrt[a + b x]
Out[2]= -----------------
        1 + Sqrt[a + b x]

... which of course should give:

             a + b x
Out[2]= -----------------
        1 + Sqrt[a + b x]


... which is what the current versions of Mathematica do indeed give.  Because
Simplify calls Together (as do many other functions in our algebraic simplifi-
cation system), this bug was manifested in Simplify as well, as shown by Dr.
Mueller's example.

As soon as this bug was discovered, a fix was made and a free upgrade was sent
to all of our registered users.  We sent out several thousand "fix" disks to 
our Macintosh customers.  This was the first time in the history of Mathematica
that Wolfram Research has had to send out upgrades of this kind, as this was
the first time that a bug of this severity was uncovered in a released version
of the program.  Unfortunately, as Dr. Mueller's case demonstrates, some of our
users did not receive their upgrade disks.  We are currently investigating how 
and why this happened, and are taking steps to ensure that it does not happen 
again should such an occasion arise in the future.

The policy of Wolfram Research is that if a bug is found that causes a
function to give incorrect answers, and it is in a function used by most or
all of our users, we will send out free upgrades to all of our registered 
users. If the bug is in a more specialized function, which does not
affect other functions, free upgrades will be sent to registered users who 
request it.  The letters accompanying any future such upgrades will explicitly 
state which functions are affected by the upgrade.  Note, however, the 
importance of registering your copy of Mathematica:  We cannot notify you of
upgrades or send you bug fixes if your copy is not registered.

More importantly, we are taking significant steps to ensure that such bugs
do not appear in released versions of Mathematica.  We have a very ambitious 
program for testing Mathematica, and we are always interested in hearing 
suggestions for further tests.  For example, in recent months we have been 
comparing the output of Mathematica's special functions with the tables in 
Abramowitz and Stegun.  (We found a couple of typographical errors in 
Abramowitz and Stegun; we didn't find any new bugs in Mathematica.  I won't 
say anything about old bugs! ;-) )  We have a very intensive testing effort 
scheduled for this summer; the SQA department has hired seven additional summer
interns to test various aspects of the program.

Of course, testing can only find bugs; it cannot prove that there are no bugs.
Although we try to keep the program bug-free, in a system of the size and
complexity of Mathematica, some errors are inevitable.  If you do find
a bug in Mathematica, please send us a bug report by email to bugs@wri.com,
by fax at (217) 398-0747 (to the attention of the SQA Department), or by
snail mail to Software Quality Assurance, Wolfram Research, Inc., P.O. Box
6059, Champaign, IL 61826-6059.  We can't fix them if we don't know
about them!  Your bug report will be acknowledged and you will be given a
bug-tracking number which you may use if you wish to inquire about the status
of the bug.

If you have any general concerns or comments about the quality of Mathematica,
please contact me by email at sqa@wri.com, or by fax or mail as above.


Kate Ebneter
Software Quality Assurance Manager
Wolfram Research, Inc.



From mathgroup-adm@yoda.ncsa.uiuc.edu Wed May 16 20:17:16 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09098; Wed, 16 May 90 20:17:14 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15425; Wed, 16 May 90 20:13:32 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09014; Wed, 16 May 90 18:40:41 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09010; Wed, 16 May 90 18:40:39 -0500
Date: Wed, 16 May 90 18:40:39 -0500
Message-Id: <9005162340.AA09010@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
From: ONM010@de0hrz1a.bitnet
Subject: Bug in Mathematica 1.2 for the Macintosh and for the SUN 4
Status: RO

[Note:  This note and the next one were sent to me for 
posting to the MathGroup mailing list.  After checking with 
the author I decided to ask Wolfram Research to prepare 
a response.  The third mailing is from WRI.  -- Steve Christensen]


Re.: Bug in Mathematica 1.2 for the Macintosh and for the SUN 4

There is a serious bug in the original version 1.2 of Mathematica for
the Macintosh and the SUN 4: In certain situations the results of
calculations may be wrong when symbolic expressions are simplified
using the "Simplify" command. I discovered this when a calculation,
which had a reasonable result before, gave a (physically unrealizable)
negative answer after symbolic simplification of the expression. I was
able to isolate the following example from the more complicated
original term:

   Simplify[ (r^2 + z^2)^(1/2)*(2 + (r^2 + z^2)^(1/2))*Log[2] ]

gives:

             3*(r^2 + z^2)^(1/2)*Log[2]

This (wrong) simplification does not occur when the factor of Log[2]
is taken out of the above expression. This very worrisome behavior of
Mathematica 1.2 could be observed on a Macintosh SE/30 (enhanced
version of Mathematica) and on a SUN 4 workstation. Therefore, I
strongly encourage users of Mathematica 1.2 on Macintosh and SUN
systems to carefully check their results when "Simplify" is invoked in
the course of a calculation.

There is a free upgrade of Mathematica for the Macintosh (version
1.2.1), which was mailed to me by Wolfram Research after I notified
them about this bug a few days ago. This new version gives a correct
result for the above example. The modification date  in all files of
version 1.2.1 is December 21, 1989, therefore, Wolfram Research must
have been aware of this problem for about 6 month. Nevertheless, they
did not notify their registered Macintosh customers about this serious
problem. The release notes for version 1.2.1 explicitly describe a
number of other bug fixes but they obviously put the above problem in
the category of "A variety of other minor and cosmetic bugs have been
fixed"! As far as I know, at least a few users of the SUN 4 version of
Mathematica 1.2 were informed only a few days ago that a free upgrade
which "fixes a minor but annoying problem with the simplification
system" is available.

For me, bugs which lead to incorrect results are the most serious
problem mathematical software can have. I am appalled that Wolfram
Research is playing this down to a mere nuisance instead of warning
the registered customers immediately and sending them the improved
version as soon as it becomes available. I believe that this policy of
Wolfram Research endangers the reputation of Mathematica as a reliable
tool. We should demand a notification system which ensures timely
warning about all bugs which lead to erroneous results.

	Stefan

=================================================================
  Dr. Stefan P. Mueller, Nuklearmedizin, Universitaetsklinikum,
  Hufelandstr. 55, D-4300 Essen 1, Federal Republic of Germany,
   e-mail: ONM010@DE0HRZ1A on BITNET, FAX +49/ (201) 723-4694,
         phone:  +49/ (201) 723-2080 or 2081 or 2032
=================================================================


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed May 16 22:11:25 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA09795; Wed, 16 May 90 22:11:24 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA18521; Wed, 16 May 90 22:07:40 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09022; Wed, 16 May 90 18:42:01 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA09018; Wed, 16 May 90 18:41:59 -0500
Message-Id: <9005162341.AA09018@yoda.ncsa.uiuc.edu>
Date: Sun, 13 May 90 15:21:02 MEZ
To: stevec@ncsa.uiuc.edu
From: ONM010@de0hrz1a.bitnet
Subject: Mathematica bug
Status: RO

[Note:  This note and the previous one were sent to me for
posting to the MathGroup mailing list.  After checking with
the author I decided to ask Wolfram Research to prepare
a response.  The third mailing is from WRI.  -- Steve Christensen]

Dear Steven,
	thank you for including mye subscription to your mailing list.
You probably noticed that I am on a BITNET node, is there a
possibility to access the files through BITNET (or INTERNET)? It is
practically impossible to logon via modem over the bad international
(and our institutional) phone lines. Please also let me know whether
you prefer being contacted via INTERNET or BITNET.

	Thank you for also contacting Wolfram. My intention in
publicizing this problem is not vindictive. I believe that software
like Mathematica has to be extremely reliable. It will be used mainly
where calculations are too complex to be done by hand, therefore,
errors in the symbolic calculations - unlike bugs in the layout or
printing modules - are not always easily recognizable. Of course, bugs
will occur in the developement of any software product of this
complexity (just as e.g. occasional mistakes will happen in medical
practice or pharmaceuticals will exhibit serious side effects after
their approval). It is of utmost importance, however, that such errors
not are covered up to avoid further damage. I believe that this is the
only way to ensure trust in the results of Mathematica, just as it has
been successful in the other ares mentioned above. It is up to us to
influence the way problems like this will be handled in the future. I
would be happy about your support in this cause.
	To give you some more information about my "case" I am
including the cover letter which came with the software upgrade and my
letter to Wolfram Research (sent by air mail).

	Stefan
=================================================================
  Dr. Stefan P. Mueller, Nuklearmedizin, Universitaetsklinikum,
  Hufelandstr. 55, D-4300 Essen 1, Federal Republic of Germany,
   e-mail: ONM010@DE0HRZ1A on BITNET, FAX +49/ (201) 723-4694,
         phone:  +49/ (201) 723-2080 or 2081 or 2032
=================================================================

enclosures:
*************************************************************************
Letter from Wolfram's technical support:

April 27, 1990

Dear Dr. Mueller:
	We received notice from you on 26th April that your version of
Mathematica was simplifying expressions improperly. The upgrade to the
fixed version is of course free of charge, and I have gone ahead and
ordered the upgrade for you immediately. It will be sent under
separate cover early next week. I hope that you receive it in time for
your presentation. I apologize for any inconvenience this bug in the
software may have caused you. Thank you for your interest in
Mathematica.
		Sincerely yours,

		Paul Katula
		Technical Support
*************************************************************************
My letter to Wolfram:

May 11, 1990

Re.:	Erroneous results with Simplify in Mathematica 1.2
	(my FAX from April 26, 1990)

Dear Madam or Sir,
	yesterday I received the Mathematica upgrade version 1.2.1 for
the Macintosh; I really appreciate that you ordered itright after my
bug report. It was a very sobering moment, however, when I looked at
the file modification dates of the new version and read the release
notes.
	The fact that the improved version - which fixes the reported
bug in the Simplify module - was last modified in December 1989
implies that Wolfram Research must have been aware of the problem in
Simplify for at least half a year, however, other registered users of
Mathematica for the Macintosh or myself were never informed about the
potentially dangerous consequences of using "Simplify". Furthermore,
the release notes for version 1.2.1 describe several bug-fixes since
version 1.2, the problem in the simplification system - which caused
wrong results, not just misprinted registration marks - was not
mentioned at all. It was obviously put under the last item "A variety
of other minor and cosmetic bugs have been fixed". For the SUN system
my coworker from Harvard Medical School was informed only a few days
ago that a free upgrade which "fixes a minor but annoying problem with
the simplification system" is available - after she reported the
problem to Wolfram Research.
	Everybody knows that errors are bound to occur in programming,
especially in a highly complex system like Mathematica. I believe
however, that the attempt to cover up or to play down serious problems
is detrimental to the reputation of Wolfram Research. I would have
appreciated a warning about the erroneous behavior of Simplify. I
could have avoided becoming a victim of this problem. Furthermore, a
timely warning and the announcement of a bug fix version would have
been a sign of your uncompromized commitment to ensure the highest
possible reliability of Mathematica.
	I would like to suggest the announcement of a notification
system which ensures a timely warning about all bugs which lead to
erroneous results. Similar policies exist in many countries for e.g.
serious side effects of pharmaceuticals. This would ensure high
confidence in the accuracy of results obtained with Mathematica.
	Truly Yours

	Dr. Stefan P. Mller



From jacobson@cello.hpl.hp.com Thu May 17 13:03:28 1990
Received: from hplms2.hpl.hp.com by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA11771; Thu, 17 May 90 13:03:26 -0500
Received: from cello.hpl.hp.com by hplms2.hpl.hp.com with SMTP
	(15.11.1.3/15.5+IOS 3.20) id AA23464; Thu, 17 May 90 11:03:43 pdt
Received: from localhost by cello.HPL.HP.COM; Thu, 17 May 90 11:03:21 pdt
To: stevec@yoda.ncsa.uiuc.edu
Subject: Simplify/Together bug
Date: Thu, 17 May 90 11:03:18 PDT
Message-Id: <19893.642967398@cello>
From: jacobson@cello.hpl.hp.com
Status: RO

NOT FOR PUBLICATION ON THE NET.  But feel free to use this information
in making summaries, etc.

Here at HP Labs I know of 3 instances of Mathematica.


For HP 9000/840, Mathematica Version 1.2 (August 22, 1989).  It has the
bug and WE HAVE NOT GOTTEN AN UPDATE.

For HP 9000/???, Mathematica Version 1.2 (November 7, 1989).  It does not
have the bug.

For the Macintosh, Mathematica Version 1.2 (July 17, 1989).  It does
not have the bug.

Moral 1:  WRI has not sent updates to everyone affected.

Moral 2:  Just the version number is insufficient to identify what
kernel you have.

  -- David

From @VM.BYU.EDU:smithw@mathnx.byu.edu Thu May 17 10:19:41 1990
Received: from vm.byu.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA11608; Thu, 17 May 90 10:19:38 -0500
Received: from mathnx.byu.edu.byu.edu by VM.BYU.EDU (IBM VM SMTP R1.2.1) with TCP; Thu, 17 May 90 09:19:37 MDT
Received: by  mathnx.byu.edu.byu.edu  (NeXT-1.0 (From Sendmail 5.52)/NeXT-1.0)
	id AA02400; Thu, 17 May 90 09:17:04 GMT-0700
Date: Thu, 17 May 90 09:17:04 GMT-0700
From: smithw@mathnx.byu.edu (William V. Smith)
Message-Id: <9005171617.AA02400@ mathnx.byu.edu.byu.edu >
To: mathgroup-adm@yoda.ncsa.uiuc.edu
Subject: Mathematica bug on NeXT
Status: RO

The "Together" bug also exists in the NeXT release of mathematica (1.0 opsys).  

Any word on how or when this will be fixed?

From lsf@astrosun.TN.CORNELL.EDU Thu May 17 08:28:50 1990
Received: from ASTROSUN.TN.CORNELL.EDU by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA11364; Thu, 17 May 90 08:28:48 -0500
Received: from supernova.TN.CORNELL.EDU by astrosun.TN.CORNELL.EDU (4.1/1.1nn-Cornell Astronomy Dept)
        id AA22651; Thu, 17 May 90 09:28:27 EDT
Date: Thu, 17 May 90 09:28:27 EDT
From: lsf@astrosun.TN.CORNELL.EDU (Sam Finn)
Message-Id: <9005171328.AA22651@astrosun.TN.CORNELL.EDU>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  Bug in Mathematica 1.2 for the Macintosh and for the SUN 4
Status: RO

>For me, bugs which lead to incorrect results are the most serious
>problem mathematical software can have. I am appalled that Wolfram
>Research is playing this down to a mere nuisance instead of warning
>the registered customers immediately and sending them the improved
>version as soon as it becomes available. I believe that this policy of
>Wolfram Research endangers the reputation of Mathematica as a reliable
>tool. We should demand a notification system which ensures timely
>warning about all bugs which lead to erroneous results.

I agree wholeheartedly. Unfortunately, what we are seeing is, to a
large extent, the same problems and attitudes that we saw with SMP
years ago. There is the hype (which, if anything, is worse this time
around) and (a new twist) the refusal to discuss algorithms or present
some other means of validating performance. Now, as you rightly point
out, incorrect results are seen by WRI as ``cosmetic details.'' Well, I
suppose that is consistent, since mostly Mathematica is a glitzy
(though indisputably useful) frontend. Just think how useful such a
thing would be on, say, Maple or Macsyma . . .

From @RELAY.CS.NET:sp@umb.edu Thu May 17 21:23:47 1990
Received: from relay.cs.net by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA13431; Thu, 17 May 90 21:23:44 -0500
Message-Id: <9005180223.AA13431@yoda.ncsa.uiuc.edu>
Received: from relay2.cs.net by RELAY.CS.NET id aa08052; 17 May 90 22:22 EDT
Received: from umb.edu by RELAY.CS.NET id ad20265; 17 May 90 22:13 EDT
Received: by umb.umb.edu (5.51/5.17) id AA27641; Thu, 17 May 90 20:56:19 EDT
Date: Thu, 17 May 90 20:56:19 EDT
From: Steve Parrott <sp@umb.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Wolfram's policy on notifying users of bugs
Cc: sp@umb.edu
Status: RO

	In a May 16 posting, Kate Ebneter, 
the Software Quality Assurance Manager
of Wolfram Research, Inc. explains Wolfram's policies
on dealing with known bugs in Mathematica: 

> ...
> The policy of Wolfram Research is that if a bug is found that causes a
> function to give incorrect answers, and it is in a function used by most or
> all of our users, we will send out free upgrades to all of our registered 
> users. If the bug is in a more specialized function, which does not
> affect other functions, free upgrades will be sent to registered users who 
> request it.  The letters accompanying any future such upgrades 
> will explicitly state which functions are affected by the upgrade.  
> ... 
_____________________________________________________________________

	Nothing is said about notifying registered users of known
bugs in specialized functions.  Does this mean that if a user
happens to find a bug in a specialized function he can obtain a free
upgrade on request, but that it is his obligation to first discover 
the bug?    

	I hope that this is not to be Wolfram's policy.  
It seems to me that they will have serious problems 
with customer confidence and satisfaction 
if they do not periodically notify users of known bugs.  

	It is understandable that they would not want to send out 
upgrades every time an error is discovered in a specialized function,
but a user who writes a program using such functions should be
able to conveniently find out for which he should request upgrades.  
He shouldn't have to discover that his program doesn't work properly,
laboriously trace the problem to a particular function, 
notify Wolfram, and finally receive the upgrade. 


From SIILI@CSC.FI Fri May 18 10:48:17 1990
Received: from router.funet.fi by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA15410; Fri, 18 May 90 10:48:05 -0500
Message-Id: <9005181548.AA15410@yoda.ncsa.uiuc.edu>
Received: from CSC.FI by router.funet.fi; Fri, 18 May 90 13:55 EET
Date: Fri, 18 May 90 13:57 EET
From: Tero Siili <SIILI@CSC.FI>
Subject: Add to Mathematica users group
To: mathgroup@yoda.ncsa.uiuc.edu
X-Vms-To: IN%"mathgroup@yoda.ncsa.uiuc.edu"
Status: RO

Please add me to the Mathematica mailing list with my Internet address
siili@csc.fi.  Thank you.

Tero Siili
--------------------------------------------------------------------
Finnish Meteorological Institute  Tel:         +358-0-1929676
Department of Geophysics          FAX:         +358-0-1929539
P.O. Box 503                      Internet:    siili@csc.fi
SF-00101 Helsinki                 EARN/BITNET: siili@finfun
Finland                           SPAN:        21905::opmvax::siili

From mathgroup-adm@yoda.ncsa.uiuc.edu Sun May 20 06:05:11 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA17680; Sun, 20 May 90 06:05:11 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15355; Sun, 20 May 90 06:01:33 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA17533; Sun, 20 May 90 03:01:35 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA17529; Sun, 20 May 90 03:01:34 -0500
Message-Id: <9005200801.AA17529@yoda.ncsa.uiuc.edu>
Date: Thu, 17 May 90 20:56:19 EDT
From: sp@umb.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Wolfram's policy on notifying users of bugs
Status: RO

	In a May 16 posting, Kate Ebneter, 
the Software Quality Assurance Manager
of Wolfram Research, Inc. explains Wolfram's policies
on dealing with known bugs in Mathematica: 

> ...
> The policy of Wolfram Research is that if a bug is found that causes a
> function to give incorrect answers, and it is in a function used by most or
> all of our users, we will send out free upgrades to all of our registered 
> users. If the bug is in a more specialized function, which does not
> affect other functions, free upgrades will be sent to registered users who 
> request it.  The letters accompanying any future such upgrades 
> will explicitly state which functions are affected by the upgrade.  
> ... 
_____________________________________________________________________

	Nothing is said about notifying registered users of known
bugs in specialized functions.  Does this mean that if a user
happens to find a bug in a specialized function he can obtain a free
upgrade on request, but that it is his obligation to first discover 
the bug?    

	I hope that this is not to be Wolfram's policy.  
It seems to me that they will have serious problems 
with customer confidence and satisfaction 
if they do not periodically notify users of known bugs.  

	It is understandable that they would not want to send out 
upgrades every time an error is discovered in a specialized function,
but a user who writes a program using such functions should be
able to conveniently find out for which he should request upgrades.  
He shouldn't have to discover that his program doesn't work properly,
laboriously trace the problem to a particular function, 
notify Wolfram, and finally receive the upgrade. 

Steve Parrott

From mathgroup-adm@yoda.ncsa.uiuc.edu Sun May 20 05:05:27 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA17604; Sun, 20 May 90 05:05:26 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14599; Sun, 20 May 90 05:01:48 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA17527; Sun, 20 May 90 02:59:38 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA17523; Sun, 20 May 90 02:59:37 -0500
Message-Id: <9005200759.AA17523@yoda.ncsa.uiuc.edu>
Date: Thu, 17 May 90 09:28:27 EDT
From: lsf@astrosun.TN.CORNELL.EDU (Sam Finn)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  Bug in Mathematica 1.2 for the Macintosh and for the SUN 4
Status: RO

>For me, bugs which lead to incorrect results are the most serious
>problem mathematical software can have. I am appalled that Wolfram
>Research is playing this down to a mere nuisance instead of warning
>the registered customers immediately and sending them the improved
>version as soon as it becomes available. I believe that this policy of
>Wolfram Research endangers the reputation of Mathematica as a reliable
>tool. We should demand a notification system which ensures timely
>warning about all bugs which lead to erroneous results.

I agree wholeheartedly. Unfortunately, what we are seeing is, to a
large extent, the same problems and attitudes that we saw with SMP
years ago. There is the hype (which, if anything, is worse this time
around) and (a new twist) the refusal to discuss algorithms or present
some other means of validating performance. Now, as you rightly point
out, incorrect results are seen by WRI as ``cosmetic details.'' Well, I
suppose that is consistent, since mostly Mathematica is a glitzy
(though indisputably useful) frontend. Just think how useful such a
thing would be on, say, Maple or Macsyma . . .


From mathgroup-adm@yoda.ncsa.uiuc.edu Sun May 20 04:18:04 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA17564; Sun, 20 May 90 04:18:03 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA13858; Sun, 20 May 90 04:14:12 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA17520; Sun, 20 May 90 02:58:43 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA17516; Sun, 20 May 90 02:58:41 -0500
Message-Id: <9005200758.AA17516@yoda.ncsa.uiuc.edu>
Date: Thu, 17 May 90 09:17:04 GMT-0700
From: smithw@mathnx.byu.edu (William V. Smith)
To: mathgroup-adm@yoda.ncsa.uiuc.edu
Subject: Mathematica bug on NeXT
Status: RO

The "Together" bug also exists in the NeXT release of mathematica (1.0 opsys).  

Any word on how or when this will be fixed?


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon May 21 10:01:16 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA19342; Mon, 21 May 90 10:01:15 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15745; Mon, 21 May 90 09:57:37 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA19290; Mon, 21 May 90 09:27:55 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA19286; Mon, 21 May 90 09:27:53 -0500
Message-Id: <9005211427.AA19286@yoda.ncsa.uiuc.edu>
From: macg@SLCS.SLB.COM (Bill Macgregor)
Date: Mon, 21 May 90 09:22:26 CDT
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Should WRI publish a software defect list?
Status: RO

Several recent messages to the mailing list have addressed
WRI's policies wrt. the announcement of software defects 
("bugs") in Mathematica.  The central point seems to be that
WRI might have knowledge of defects in Mma, with potentially
serious consequences for users, but decide not to announce
the presence of the defects in order to protect Mma's reputation 
in the marketplace, and/or reduce the cost to WRI of interim
releases.

A strong argument can be made this this policy is, in fact, 
counterproductive for WRI.  Publication of a software defect 
list would provide a strong incentive for WRI to improve the
quality of their product, with a corresponding improvement
in marketability.  It would also generate feedback to WRI to
help prioritize efforts at quality improvement.  And although
I am certainly not qualified to give a legal opinion, there 
is a possibility that the announcement of software defects 
would actually lessen WRI's liability in the event of serious
consequences to life or property.  Most important, perhaps, 
publication of software defects is one way for WRI to demonstrate 
respect for its customers.

Could I propose a straw vote?  Two issues:

(1)  How many readers of the mailing list believe WRI should, 
     in the interests of good faith with its customers, make 
     public a list of "known Mma kernel defects"?

(2)  Would it be sufficient for WRI to make such a list available 
     on an internet file server?

Please reply to me directly to avoid burdening the mailing list;
I'll be happy to summarize and report.

  - Bill MacGregor  macgregor@slcs.slb.com


From Patti_Carlson@qmail.ncsa.uiuc.edu Mon May 21 10:13:27 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA19365; Mon, 21 May 90 10:13:25 -0500
Return-Path: <Patti_Carlson@qmail.ncsa.uiuc.edu>
Received: from qmail.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA16128; Mon, 21 May 90 10:13:27 CDT
Message-Id: <9005211513.AA16128@newton.ncsa.uiuc.edu>
Date: 21 May 90 10:16:27
From: Patti Carlson <Patti_Carlson@qmail.ncsa.uiuc.edu>
Subject: WRI
To: steve@ncsa.uiuc.edu
Status: RO

GatorMail-Q                   WRI
I sent mail to Marketing at WRI, telling them to answer this Mathgroup mail
about publicizing bugs.  It's getting pretty intense.  (I agree with the
expressed opinion that WRI should notify users of bugs, instead of making them
BEG for an upgrade.)



From walt%keynes@ucsd.edu Mon May 21 11:48:02 1990
Received: from ucsd.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA19611; Mon, 21 May 90 11:48:00 -0500
Received: from keynes.ucsd.edu by ucsd.edu; id AA24439
	sendmail 5.61/UCSD-2.0-sun via SMTP
	Mon, 21 May 90 09:47:59 -0700 for mathgroup-adm@yoda.ncsa.uiuc.edu
Received: by keynes.ucsd.edu (15.11/UCSDGENERIC.2)
	id AA18423 to mathgroup-adm@yoda.ncsa.uiuc.edu; Mon, 21 May 90 09:47:33 pdt
Date: Mon, 21 May 90 09:47:33 pdt
From: walt%keynes@ucsd.edu (Walt Heller)
Message-Id: <9005211647.AA18423@keynes.ucsd.edu>
To: mathgroup-adm@yoda.ncsa.uiuc.edu
Subject: Re:  Should WRI publish a software defect list?
Status: RO


	WRI should not only publish known bugs ti the mailing list immediately,
it should provide a quarterly "bug report" to all users by regular mail.

	Walter P. Heller

From mathgroup-adm@yoda.ncsa.uiuc.edu Mon May 21 13:20:43 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA19717; Mon, 21 May 90 13:20:42 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA19859; Mon, 21 May 90 13:17:05 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA19661; Mon, 21 May 90 12:05:12 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA19657; Mon, 21 May 90 12:05:10 -0500
Message-Id: <9005211705.AA19657@yoda.ncsa.uiuc.edu>
Date: Mon, 21 May 90 09:47:33 pdt
From: walt%keynes@ucsd.edu (Walt Heller)
To: mathgroup-adm@yoda.ncsa.uiuc.edu
Subject: Re:  Should WRI publish a software defect list?
Status: RO


	WRI should not only publish known bugs ti the mailing list immediately,
it should provide a quarterly "bug report" to all users by regular mail.

	Walter P. Heller


From barry@playfair.stanford.edu Mon May 21 14:12:31 1990
Received: from Playfair.Stanford.EDU by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA19812; Mon, 21 May 90 14:12:28 -0500
Message-Id: <9005211912.AA19812@yoda.ncsa.uiuc.edu>
Received: by playfair.stanford.edu; Mon, 21 May 90 12:11:13 PDT
Date: Mon, 21 May 90 12:11:13 PDT
From: Barrett P. Eynon <barry@playfair.stanford.edu>
Subject: Re:  Should WRI publish a software defect list?
To: macg@slcs.slb.com, mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Yes, I think they should make a defects list public. At the least they
should keep a current list available on an internet server, and major
bugs should be widely publicized. 
-Barry Eynon

From mdeale@sargas.acs.calpoly.edu Tue May 22 12:09:59 1990
Received: from cosmos-gw.ACS.CalPoly.EDU by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA21202; Tue, 22 May 90 12:09:56 -0500
Received: from sargas.acs.calpoly.edu by cosmos.acs.calpoly.edu (4.1/1.881115)
	id AA03982; Tue, 22 May 90 10:09:52 PDT
Received: by sargas.acs.calpoly.edu (4.1/SMI-4.0)
	id AA09001; Tue, 22 May 90 10:09:25 PDT
Date: Tue, 22 May 90 10:09:25 PDT
From: mdeale@sargas.ACS.CalPoly.EDU (Myron Deale)
Message-Id: <9005221709.AA09001@sargas.acs.calpoly.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Limit[] trouble
Status: RO


Hello,
   I'm not sure I've seen any discussion on defects with the Limit[]
function, so here goes.

   Upon trying "Limit[ Cos[1/x^2]^(x^4), x->Infinity]" either a Bus
Error (on a NeXT) or a Segmentation Fault (on a Sun) is the result.
Anyone run into this before?  Is this another "known" defect?


-Myron
// mdeale@cosmos.acs.calpoly.edu

From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May 22 12:55:15 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA21289; Tue, 22 May 90 12:55:14 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA10331; Tue, 22 May 90 12:51:34 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA21228; Tue, 22 May 90 12:11:48 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA21224; Tue, 22 May 90 12:11:46 -0500
Message-Id: <9005221711.AA21224@yoda.ncsa.uiuc.edu>
Date: Tue, 22 May 90 10:09:25 PDT
From: mdeale@sargas.ACS.CalPoly.EDU (Myron Deale)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Limit[] trouble
Status: RO


Hello,
   I'm not sure I've seen any discussion on defects with the Limit[]
function, so here goes.

   Upon trying "Limit[ Cos[1/x^2]^(x^4), x->Infinity]" either a Bus
Error (on a NeXT) or a Segmentation Fault (on a Sun) is the result.
Anyone run into this before?  Is this another "known" defect?


-Myron
// mdeale@cosmos.acs.calpoly.edu


From sdw@hpsadsdw.hp.com Tue May 22 13:15:01 1990
Received: from hp-sde.sde.hp.com by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA21333; Tue, 22 May 90 13:14:58 -0500
Received: from hpcea.ce.hp.com by hp-sde.sde.hp.com with SMTP
	(16.2A/15.5+IOS 3.13) id AA22749; Tue, 22 May 90 10:51:24 -0700
Received: from hpsadsdw.HP.COM by hpcea ; Tue, 22 May 90 11:15:36 pdt
Received: by hpsadsdw.HP.COM; Tue, 22 May 90 11:14:17 pdt
Date: Tue, 22 May 90 11:14:17 pdt
From: Steve Warwick <sdw@hpsadsdw.hp.com>
Message-Id: <9005221814.AA04361@hpsadsdw.HP.COM>
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO


Mathematica seems to have problems with the
simplifications of perfect squares - I have had problems finding the
"Correct" simplification of such expressions and have tracked it
down to the following problem:

In[8]:= f1 = a-b

Out[8]= a - b

In[9]:= f2 = b-a

Out[9]= -a + b

In[10]:= Simplify[Sqrt[Expand[f1^2]]]

Out[10]= a - b

In[11]:= Simplify[Sqrt[Expand[f2^2]]]

Out[11]= a - b


a,b,f1,f2 were undefined before trying this...


It seems that such simplifications should return multiple results, and
for more complex formula with multiple roots of squares, should return a
list of the possible simplifications, culling out duplicate results.



Comments??

--
Steven Warwick

From @vmd.cso.uiuc.edu,@VM.BYU.EDU:smithw@mathnx.byu.edu Mon May 21 15:13:22 1990
Received: from vmd.cso.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA19896; Mon, 21 May 90 15:13:20 -0500
Received: from VM.BYU.EDU by VMD.CSO.UIUC.EDU (IBM VM SMTP R1.2) with BSMTP id 8235; Mon, 21 May 90 15:13:28 CDT
Received: from BYUVM by VM.BYU.EDU (Mailer R2.05) with BSMTP id 9951; Mon, 21
 May 90 14:06:45 MDT
Received: from mathnx.byu.edu.byu.edu by VM.BYU.EDU (IBM VM SMTP R1.2.1) with
 TCP; Mon, 21 May 90 14:06:44 MDT
Received: by  mathnx.byu.edu.byu.edu  (NeXT-1.0 (From Sendmail 5.52)/NeXT-1.0)
	id AA03816; Mon, 21 May 90 14:03:59 GMT-0700
Date: Mon, 21 May 90 14:03:59 GMT-0700
From: smithw@mathnx.byu.edu (William V. Smith)
Message-Id: <9005212103.AA03816@ mathnx.byu.edu.byu.edu >
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica bug on NeXT fix
Status: RO

There is a fix for the mathematica bug (together function) on the NeXT.  I sent
 email to
our area rep (in Denver) and he got back to me the same day saying that he
was putting an OD in the mail with the fix on it.  Nice work NeXT . . .

From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May 22 13:53:36 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA21493; Tue, 22 May 90 13:53:35 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA11530; Tue, 22 May 90 13:49:53 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA21355; Tue, 22 May 90 13:16:25 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA21351; Tue, 22 May 90 13:16:23 -0500
Message-Id: <9005221816.AA21351@yoda.ncsa.uiuc.edu>
Date: Tue, 22 May 90 11:14:17 pdt
From: Steve Warwick <sdw@hpsadsdw.hp.com>
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO


Mathematica seems to have problems with the
simplifications of perfect squares - I have had problems finding the
"Correct" simplification of such expressions and have tracked it
down to the following problem:

In[8]:= f1 = a-b

Out[8]= a - b

In[9]:= f2 = b-a

Out[9]= -a + b

In[10]:= Simplify[Sqrt[Expand[f1^2]]]

Out[10]= a - b

In[11]:= Simplify[Sqrt[Expand[f2^2]]]

Out[11]= a - b


a,b,f1,f2 were undefined before trying this...


It seems that such simplifications should return multiple results, and
for more complex formula with multiple roots of squares, should return a
list of the possible simplifications, culling out duplicate results.



Comments??

--
Steven Warwick


From mcdonald@quark.UMD.EDU Tue May 22 15:56:26 1990
Received: from quark.umd.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA21749; Tue, 22 May 90 15:56:24 -0500
Received: by quark.UMD.EDU (5.57/Ultrix3.0-C)
	id AA05134; Tue, 22 May 90 16:52:29 EDT
Date: Tue, 22 May 90 16:52:29 EDT
From: mcdonald@quark.umd.edu (Bill MacDonald)
Message-Id: <9005222052.AA05134@quark.UMD.EDU>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Square root of squares
Status: RO

The following Mathematica command will return f1 or f2 as appropriate.
Solve[c==f1^2,c]
Solve[c==f2^2,c]
If your suggestion were followed, Mathematica could never do the simplest 
calculation involving square roots without getting hung up by delivering
two or more roots every time Sqrt[] was requested.  If you want multiple roots
of an expression, treat it as you would an equation.

From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May 22 16:02:19 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA21755; Tue, 22 May 90 16:02:18 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14042; Tue, 22 May 90 15:58:39 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA21669; Tue, 22 May 90 15:20:39 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA21665; Tue, 22 May 90 15:20:38 -0500
Message-Id: <9005222020.AA21665@yoda.ncsa.uiuc.edu>
Date: Tue, 22 May 90 15:12:55 -0400
From: jack@sun.udel.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  Limit[] trouble
Status: RO

When running the problem,

  Limit[ Cos[1/x^2]^(x^4), x->Infinity]

on a Sun, using Mathmatica 1.2, I also obtained a Sementation Fault.
However, using Mathematica 1.1, I obtain...

In[1]:= Limit[ Cos[1/x^2]^(x^4), x->Infinity]

Limit::nlm: Could not find definite limit.

                       4
                   -2 x
Out[1]= Limit[Cos[x  ]  , x -> Infinity]




From macg@SLCS.SLB.COM Tue May 22 16:03:44 1990
Received: from SLCS.SLB.COM by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA21761; Tue, 22 May 90 16:03:33 -0500
Received: from frank.SLCS.SLB.COM
	by SLCS.SLB.COM (4.1/SLCS Mailhost 3.2)
	id AA27002; Tue, 22 May 90 16:03:30 CDT
From: macg@SLCS.SLB.COM (Bill Macgregor)
Received: by frank.SLCS.SLB.COM (4.1/SLCS Subsidiary 1.6)
	id AA08169; Tue, 22 May 90 16:03:22 CDT
Date: Tue, 22 May 90 16:03:22 CDT
Message-Id: <9005222103.AA08169.macg@frank.SLCS.SLB.COM>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: SUMMARY-software defect list poll
Cc: macgregor@yoda.ncsa.uiuc.edu
Status: RO

In a message to the mailing list yesterday, I asked the
questions:

(1)  How many readers of the mailing list believe WRI should, 
     in the interests of good faith with its customers, make 
     public a list of "known Mma kernel defects"?

(2)  Would it be sufficient for WRI to make such a list available 
     on an internet file server?

I received 46 responses.  All were positive regarding question
(1), the desirability of a published Mma defect list.  Most were
positive regarding (2), although a substantial minority felt
that publication via internet file server would not reach
enough of the Mathematica user community.

One respondent made the point that the wording of the questions
hardly permitted a negative response.  I can only hope that WRI
agrees.

The number of responses and the comments that accompanied them
are more significant than the tally.  46 people felt strongly
enough about the issue to take time to respond, and a number of
the responses were emphatic.  We are justified, I believe,
in hypothesizing that this is an important issue for the Mma user 
community at large.

Here is an unordered summary of the comments I found to be most
interesting and/or most often repeated:

*  Collectively, users waste a great deal of time rediscovering
   known defects and reinventing workarounds.

*  It is in WRI's interests to publish a software defect list,
   rather than to allow a third party to do so.

*  WRI's policy of providing updates to registered users when
   critical defects are found is commendable.

*  Availability of a software defect list to the internet-
   accessible users is a good start, but leaves out many Mma
   users.  What about publication of the list in the Mma
   Journal?  Or a technical newsletter, by subscription, if
   necessary, to cover costs?

*  WRI should verify errors before publishing them (keep the
   noise level down).

*  A software defect list could contain a statement of the 
   problem, a description of workarounds, and a predicted
   disposition (e.g., fixed in next release, update available
   by request, update mailed to registered users).

*  Workarounds and package updates could be made available
   via anonymous ftp (possibly from ncsa?).  Using the netlib
   software would allow access to the repository via email
   from any reachable network.

*  The registration form should include a "preferred contact
   method" for update information, e.g., an email address or
   paper mail, or maybe fax.

*  Could WRI keep documentation updates online, accessible via
   ftp?  Maybe the entire Reference Guide?  Could users get a
   file via ftp to update the local Information database?

*  Just providing a software defect list on paper, available on
   request to WRI, would be a big help.  Sending incremental
   change notices to the mathgroup mailing list would be a good
   idea, too.

Thanks to all of you who took the time to respond.

  - Bill MacGregor

From mbp@lakisis.umd.edu Tue May 22 16:03:53 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA21766; Tue, 22 May 90 16:03:50 -0500
Return-Path: <mbp@lakisis.umd.edu>
Received: from lakisis.umd.edu ([128.8.134.19]) by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14147; Tue, 22 May 90 16:03:48 CDT
Date: Tue, 22 May 90 17:04:10 EDT
From: "Mark Phillips" <mbp@lakisis.umd.edu>
Message-Id: <9005222104.AA02043@lakisis.umd.edu>
Received: by lakisis.umd.edu; Tue, 22 May 90 17:04:10 EDT
To: stevec@ncsa.uiuc.edu
Subject: archive 8 -- last one
Status: RO

Steve,
   Below is Archive8, which will have to be my last one, at least for
a while.  I won't be here much this summer, and as I mentioned earlier
I won't be on the Internet this fall (at least not at first).
	--Mark

 ---- cut here ---- cut here ---- cut here ---- cut here ---- cut here ----

Mathematica Notes from sci.math.symbolic, sci.math, and comp.sys.next

Archive 8: 8 April 1990 -- 22 May 1990
 
Editor: Mark Phillips
	mbp@lakisis.umd.edu

Subjects:
	Serious Mathematica Bug
	Laplace Transforms for Mathematica
	Combinatorica (Discrete Mathematic
	Re: Problem14
	Combinatorica, etc...
	Re: Problem14
	Solving equations in Mathematica
	Comparative review of Symbolic Math Software
	Re: Solving equations in Mathematica (eqn fmt)
	Riemann Surface of Algebraic Function in Mathematica
	Notebooks on Economics
	Why the complex root?
	plasma dispersion function in mathematica
	Digital Filter Design Packages for Mathematica
	Mathematica Integration
	Mathematica and Simplify

(*======================================================================*)

From: phd_ivo@gsbacd.uchicago.edu
Subject: Serious Mathematica Bug
Date: 17 May 90 23:35:55 GMT
Newsgroups: comp.sys.next


Here is the description of a very serious bug in the
Simplify[] function. I would suggest that noone uses
this function any longer without checking the results.
It appears to me that this greatly reduces the value
of Mathematica. When will the next OS version come out?

/ivo welch	ivo@next.agsm.ucla

Excerpt of a "public" message:

This bug caused Together to give incorrect answers for expressions involving
both integerand rational powers of the same subexpression.  A very simple
example ofthis problem:

In[2]:= Together[(a + b x)/(1 + Sqrt[a + b x])]

          Sqrt[a + b x]
Out[2]= -----------------
        1 + Sqrt[a + b x]

.. which of course should give:

             a + b x
Out[2]= -----------------
        1 + Sqrt[a + b x]


.. which is what the current versions of Mathematica do indeed give.  Because
Simplify calls Together (as do many other functions in our algebraic simplifi-
cation system), this bug was manifested in Simplify as well, as shown by Dr.
Mueller's example.

As soon as this bug was discovered, a fix was made and a free upgrade was sent
to all of our registered users. 

..

Kate Ebneter
Software Quality Assurance Manager
Wolfram Research, Inc.
(*----------------------------------------------------------------------*)

From: jweiss@cgdra.cgd.ucar.edu (Jeffrey Weiss)
Subject: Laplace Transforms for Mathematica
Date: 10 May 90 17:50:54 GMT
Newsgroups: sci.math.symbolic

Does anyone have a package that does Laplace transforms and inverse
Laplace transforms for Mathematica?  We have a package that we read in
that does only the most elementary transforms and no inverse transforms.

--
Jeff
jweiss@ncar.ucar.edu
(*----------------------------------------------------------------------*)

From: chrstnsn@ux1.cso.uiuc.edu
Subject: Combinatorica (Discrete Mathematic
Date: 11 May 90 04:19:00 GMT
Newsgroups: sci.math.symbolic


I have just placed the new Mathematica package Combinatorica.m
in the Symbolic/Mathematica/Packages/SKIENA directory
on the anonymous ftp server (128.174.20.50).  Here are
two files from that directory and a contact address for
Steve Skiena, the author.  This is a Beta release.
 
Steve Christensen

======================================================================
(*

        Implementing Discrete Mathematics: Combinatorics and Graph Theory
                                with Mathematica

                Version 0.5   5/8/90   Beta Release

                Copyright (c) 1990 by Steven S. Skiena

This package contains all the programs from the book, "Implementing
Discrete Mathematics: Combinatorics and Graph Theory with Mathematica"
by Steven S. Skiena, Addison-Wesley Publishing Co., Advanced Book Program,
350 Bridge Parkway, Redwood City CA 94065.  ISBN 0-201-50943-1.
For ordering information, call 1-800-447-2226.

This package is copyright 1990 by Steven S. Skiena.  It may be copied
in its entirety for nonprofit purposes only.  Sale, other than for the
direct cost of the media, is prohibited.  This copyright notice must
accompany all copies.

These programs can be obtained on Macintosh and MS-DOS disks. Contact
Discrete Mathematics Disk, Wolfram Research Inc.,
PO Box 6059, Champaign, IL 61826-9905. (217)-398-0700.

The author, Wolfram research, and Addison-Wesley Publishing Company,
Inc. make no representations, express or implied, with respond to this
documentation, of the software it describes and contains, including
without limitations, any implied warranties of mechantability or fitness
for a particular purpose, all of which are expressly disclaimed.  The
author, Wolfram Research, or Addison-Wesley, their licensees,
distributors and dealers shall in no event be liable for any indirect,
incidental, or consequential damages.

This beta release is designed to run under Version 1.2 of Mathematica.
Any comments, bug reports, or requests to get on the Combinatorica
mailing list should be forwarded to:

        Steven Skiena
        Department of Computer Science
        State University of New York
        Stony Brook, NY 11794

        skiena@sbcs.sunysb.edu

        (516)-632-9026 / 8470

*)

=======================================================================

The Combinatorial Mathematica package contains all the programs from
the book, "Implementing Discrete Mathematics: Combinatorics and Graph
Theory with Mathematica" by Steven S. Skiena, Addison-Wesley Publishing
Co., Advanced Book Program, 350 Bridge Parkway, Redwood City CA 94065.
ISBN 0-201-50943-1.  For ordering information, call 1-800-447-2226.

Combinatorial Mathematica currently consists of one file, Combinatorica.m.
It is a 100K ASCII file, and so should be easy to ftp.  Since some mailers
choke on files this large, we have also prepared a distribution of three
smaller files, Part01, Part02, and Part03.

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

(0) A General Public License for Combinatorial Mathematica is in the file
    COPYING.

(1) To execute Combinatorial Mathematica, enter Mathematica and load the
    package (<<Combinatorica.m}

(2) Documentation strings for all important functions are included with
    the package.

(3) By sending your address to skiena@sbcs.sunysb.edu, you will be placed
    on a Combinatorial Mathematica mailing list and informed about
    new releases.

(4) Part01, Part02, and Part03 are shar files.  Running each through unshar
    or /bin/sh unpacks the files.  The main package is broken into three
    files: part1, part2, and part3.  To reconstruct the package, the three
    parts must be concatenated into the file Combinatorica.m.  The script
    makepackage does this automatically.
---
(*----------------------------------------------------------------------*)


From: maeder@inf.ethz.ch (Roman Maeder)
Subject: Re: Problem14
Summary: it can be done
Date: 11 May 90 09:34:45 GMT
Newsgroups: sci.math.symbolic

> From: rp@XN.LL.MIT.EDU (Richard Pavelle)
> Subject: Problem14
> Keywords: A difficult matrix inversion and simplification
> 
> I encountered a problem this week which makes a good candidate
> for the 14th entry in the series I am submitting to the
> group. The problem arises in photon scattering and involves
> little more than inverting a particular 4x4 matrix. But owing
> to the nature of the matrix the components of the inverse are
> huge. It therefore creates an unusually difficult matrix
> inversion problem for my MACSYMA.

(all following timings are with Mathematica 1.2 on a Sun 4/330)

Well, the inversion is no problem, it takes about 14 seconds to
compute it, but trying to print the result is next to impossible.
Canceling common terms in the numerators and denominators 
brings the output down to reasonable size, however (this takes about
25 min.). Max memory used was about 4.5MB.


In[1]:= s={
{(er^2+ei^2)/(4*w^2+g^2+2*er^2+2*ei^2),
-(er^2+ei^2)*(2*p1+g)/((p1+g)*(2*er*w+2*ei*w+2*er*p1-2*ei*p1+er*g-ei*g)),
-(er^2+ei^2)*(2*p2+g)/((p2+g)*(2*er*w+2*ei*w+2*er*p2-2*ei*p2+er*g-ei*g)),
-(er^2+ei^2)*(2*p3+g)/((p3+g)*(2*er*w+2*ei*w+2*er*p3-2*ei*p3+er*g-ei*g))},
{-(2*er*w-ei*g)/(4*w^2+g^2+2*er^2+2*ei^2),
(2*er*w-2*ei*p1-ei*g)/(2*er*w+2*ei*w+2*er*p1-2*ei*p1+er*g-ei*g),
(2*er*w-2*ei*p2-ei*g)/(2*er*w+2*ei*w+2*er*p2-2*ei*p2+er*g-ei*g),
(2*er*w-2*ei*p3-ei*g)/(2*er*w+2*ei*w+2*er*p3-2*ei*p3+er*g-ei*g)},
{-(2*ei*w+er*g)/(4*w^2+g^2+2*er^2+2*ei^2),
(2*ei*w+2*er*p1+er*g)/(2*er*w+2*ei*w+2*er*p1-2*ei*p1+er*g-ei*g),
(2*ei*w+2*er*p2+er*g)/(2*er*w+2*ei*w+2*er*p2-2*ei*p2+er*g-ei*g),
(2*ei*w+2*er*p3+er*g)/(2*er*w+2*ei*w+2*er*p3-2*ei*p3+er*g-ei*g)},
{(4*w^2+g^2+er^2+ei^2)/(4*w^2+g^2+2*er^2+2*ei^2),
-(4*p1*w^2+4*g*w^2+4*p1^3+8*g*p1^2+5*g^2*p1+2*er^2*p1+2*ei^2*p1+g^3
+er^2*g+ei^2*g)
 /((p1+g)*(2*er*w+2*ei*w+2*er*p1-2*ei*p1+er*g-ei*g)),
-(4*p2*w^2+4*g*w^2+4*p2^3+8*g*p2^2+5*g^2*p2+2*er^2*p2+2*ei^2*p2+g^3
  +er^2*g+ei^2*g)
 /((p2+g)*(2*er*w+2*ei*w+2*er*p2-2*ei*p2+er*g-ei*g)),
-(4*p3*w^2+4*g*w^2+4*p3^3+8*g*p3^2+5*g^2*p3+2*er^2*p3+2*ei^2*p3+g^3
  +er^2*g+ei^2*g)
 /((p3+g)*(2*er*w+2*ei*w+2*er*p3-2*ei*p3+er*g-ei*g))}
};

In[2]:= si = MatrixPower[s, -1];	(* inversion of s*)

In[3]:= ByteCount[si]			(* size, if no storage were shared *)

Out[3]= 7425572

In[4]:= Together[si]			(* cancel common terms *)

Out[4]=
{{-(((-(ei^2*g) - er^2*g + 4*g^3 + 4*g^2*p1 + 4*g^2*p2 + 4*g*p1*p2 + 
         4*g^2*p3 + 4*g*p1*p3 + 4*g*p2*p3 + 4*p1*p2*p3)*
       (2*ei^2 + 2*er^2 + g^2 + 4*w^2))/(4*ei^2*p1*p2*p3 + 4*er^2*p1*p2*p3))
   , -(((2*ei^2 + 2*er^2 + g^2 + 4*w^2)*
       (er*g^3 + 2*er*g^2*p1 + 2*er*g^2*p2 + 4*er*g*p1*p2 + 2*er*g^2*p3 + 
         4*er*g*p1*p3 + 4*er*g*p2*p3 + 8*er*p1*p2*p3 - 8*ei*g^2*w - 
         4*ei*g*p1*w - 4*ei*g*p2*w - 4*ei*g*p3*w + 4*er*g*w^2))/
     (8*ei^2*p1*p2*p3*w + 8*er^2*p1*p2*p3*w)), 
  -(((2*ei^2 + 2*er^2 + g^2 + 4*w^2)*
       (ei*g^3 + 2*ei*g^2*p1 + 2*ei*g^2*p2 + 4*ei*g*p1*p2 + 2*ei*g^2*p3 + 
         4*ei*g*p1*p3 + 4*ei*g*p2*p3 + 8*ei*p1*p2*p3 + 8*er*g^2*w + 
         4*er*g*p1*w + 4*er*g*p2*w + 4*er*g*p3*w + 4*ei*g*w^2))/
     (8*ei^2*p1*p2*p3*w + 8*er^2*p1*p2*p3*w)), 
  -(g*(2*ei^2 + 2*er^2 + g^2 + 4*w^2))/(4*p1*p2*p3)}, 
 {-(((g + p1)*(-ei^2 - er^2 + 4*g^2 + 4*g*p2 + 4*g*p3 + 4*p2*p3)*
       (-(ei*g) + er*g - 2*ei*p1 + 2*er*p1 + 2*ei*w + 2*er*w))/
     (4*ei^2*p1^3 + 4*er^2*p1^3 - 4*ei^2*p1^2*p2 - 4*er^2*p1^2*p2 - 
       4*ei^2*p1^2*p3 - 4*er^2*p1^2*p3 + 4*ei^2*p1*p2*p3 + 4*er^2*p1*p2*p3))
   , ((g + p1)*(ei*g - er*g + 2*ei*p1 - 2*er*p1 - 2*ei*w - 2*er*w)*
     (er*g^2 + 2*er*g*p2 + 2*er*g*p3 + 4*er*p2*p3 - 8*ei*g*w - 4*ei*p2*w - 
       4*ei*p3*w + 4*er*w^2))/
   (8*ei^2*p1^3*w + 8*er^2*p1^3*w - 8*ei^2*p1^2*p2*w - 8*er^2*p1^2*p2*w - 
     8*ei^2*p1^2*p3*w - 8*er^2*p1^2*p3*w + 8*ei^2*p1*p2*p3*w + 
     8*er^2*p1*p2*p3*w), ((g + p1)*
     (ei*g - er*g + 2*ei*p1 - 2*er*p1 - 2*ei*w - 2*er*w)*
     (ei*g^2 + 2*ei*g*p2 + 2*ei*g*p3 + 4*ei*p2*p3 + 8*er*g*w + 4*er*p2*w + 
       4*er*p3*w + 4*ei*w^2))/
   (8*ei^2*p1^3*w + 8*er^2*p1^3*w - 8*ei^2*p1^2*p2*w - 8*er^2*p1^2*p2*w - 
     8*ei^2*p1^2*p3*w - 8*er^2*p1^2*p3*w + 8*ei^2*p1*p2*p3*w + 
     8*er^2*p1*p2*p3*w), -(((g + p1)*
       (-(ei*g) + er*g - 2*ei*p1 + 2*er*p1 + 2*ei*w + 2*er*w))/
     (4*p1^3 - 4*p1^2*p2 - 4*p1^2*p3 + 4*p1*p2*p3))}, 
 {-(((g + p2)*(ei^2 + er^2 - 4*g^2 - 4*g*p1 - 4*g*p3 - 4*p1*p3)*
       (-(ei*g) + er*g - 2*ei*p2 + 2*er*p2 + 2*ei*w + 2*er*w))/
     (4*ei^2*p1*p2^2 + 4*er^2*p1*p2^2 - 4*ei^2*p2^3 - 4*er^2*p2^3 - 
       4*ei^2*p1*p2*p3 - 4*er^2*p1*p2*p3 + 4*ei^2*p2^2*p3 + 4*er^2*p2^2*p3))
   , ((g + p2)*(ei*g - er*g + 2*ei*p2 - 2*er*p2 - 2*ei*w - 2*er*w)*
     (-(er*g^2) - 2*er*g*p1 - 2*er*g*p3 - 4*er*p1*p3 + 8*ei*g*w + 
       4*ei*p1*w + 4*ei*p3*w - 4*er*w^2))/
   (8*ei^2*p1*p2^2*w + 8*er^2*p1*p2^2*w - 8*ei^2*p2^3*w - 8*er^2*p2^3*w - 
     8*ei^2*p1*p2*p3*w - 8*er^2*p1*p2*p3*w + 8*ei^2*p2^2*p3*w + 
     8*er^2*p2^2*p3*w), ((g + p2)*
     (ei*g - er*g + 2*ei*p2 - 2*er*p2 - 2*ei*w - 2*er*w)*
     (-(ei*g^2) - 2*ei*g*p1 - 2*ei*g*p3 - 4*ei*p1*p3 - 8*er*g*w - 
       4*er*p1*w - 4*er*p3*w - 4*ei*w^2))/
   (8*ei^2*p1*p2^2*w + 8*er^2*p1*p2^2*w - 8*ei^2*p2^3*w - 8*er^2*p2^3*w - 
     8*ei^2*p1*p2*p3*w - 8*er^2*p1*p2*p3*w + 8*ei^2*p2^2*p3*w + 
     8*er^2*p2^2*p3*w), ((g + p2)*
     (-(ei*g) + er*g - 2*ei*p2 + 2*er*p2 + 2*ei*w + 2*er*w))/
   (4*p1*p2^2 - 4*p2^3 - 4*p1*p2*p3 + 4*p2^2*p3)}, 
 {-(((-ei^2 - er^2 + 4*g^2 + 4*g*p1 + 4*g*p2 + 4*p1*p2)*(g + p3)*
       (-(ei*g) + er*g - 2*ei*p3 + 2*er*p3 + 2*ei*w + 2*er*w))/
     (4*ei^2*p1*p2*p3 + 4*er^2*p1*p2*p3 - 4*ei^2*p1*p3^2 - 4*er^2*p1*p3^2 - 
       4*ei^2*p2*p3^2 - 4*er^2*p2*p3^2 + 4*ei^2*p3^3 + 4*er^2*p3^3)), 
  ((g + p3)*(ei*g - er*g + 2*ei*p3 - 2*er*p3 - 2*ei*w - 2*er*w)*
     (er*g^2 + 2*er*g*p1 + 2*er*g*p2 + 4*er*p1*p2 - 8*ei*g*w - 4*ei*p1*w - 
       4*ei*p2*w + 4*er*w^2))/
   (8*ei^2*p1*p2*p3*w + 8*er^2*p1*p2*p3*w - 8*ei^2*p1*p3^2*w - 
     8*er^2*p1*p3^2*w - 8*ei^2*p2*p3^2*w - 8*er^2*p2*p3^2*w + 
     8*ei^2*p3^3*w + 8*er^2*p3^3*w), 
  ((g + p3)*(ei*g - er*g + 2*ei*p3 - 2*er*p3 - 2*ei*w - 2*er*w)*
     (ei*g^2 + 2*ei*g*p1 + 2*ei*g*p2 + 4*ei*p1*p2 + 8*er*g*w + 4*er*p1*w + 
       4*er*p2*w + 4*ei*w^2))/
   (8*ei^2*p1*p2*p3*w + 8*er^2*p1*p2*p3*w - 8*ei^2*p1*p3^2*w - 
     8*er^2*p1*p3^2*w - 8*ei^2*p2*p3^2*w - 8*er^2*p2*p3^2*w + 
     8*ei^2*p3^3*w + 8*er^2*p3^3*w), 
  -(((g + p3)*(-(ei*g) + er*g - 2*ei*p3 + 2*er*p3 + 2*ei*w + 2*er*w))/
     (4*p1*p2*p3 - 4*p1*p3^2 - 4*p2*p3^2 + 4*p3^3))}}


Roman Maeder
(*----------------------------------------------------------------------*)

From: wheeler@super.ORG (Ferrell S. Wheeler)
Subject: Combinatorica, etc...
Date: 10 May 90 15:05:55 GMT
Newsgroups: sci.math.symbolic

I was at the Mathematica Conference in January and I
heard about alot of new packages, both commercial
and public, that were announced and would "soon be
available."  What is the status of these packages,
in particular Steve Skiena's Combinatorica and
Ilan Vardi's elliptic curve package?  Any information
on these or others would be appreciated.  If a new
package is placed in the ftp archives maintained by
Steve Christensen, then an announcement in this
news group would be appreciated.

Thanks,

Ferrell Wheeler
wheeler@super.org
(*----------------------------------------------------------------------*)

From: monagan@inf.ethz.ch (Michael)
Subject: Re: Problem14
Summary: symbolic matrix inverse
Date: 11 May 90 16:27:27 GMT
Newsgroups: sci.math.symbolic

In article <22001@ethz-inf.UUCP>, maeder@inf.ethz.ch (Roman Maeder) writes:
> > From: rp@XN.LL.MIT.EDU (Richard Pavelle)
> > Subject: Problem14
> > Keywords: A difficult matrix inversion and simplification
> > 
> > I encountered a problem this week which makes a good candidate
> > for the 14th entry in the series I am submitting to the
> > group. The problem arises in photon scattering and involves
> > little more than inverting a particular 4x4 matrix. But owing
> > to the nature of the matrix the components of the inverse are
> > huge. It therefore creates an unusually difficult matrix
> > inversion problem for my MACSYMA.
> 
> (all following timings are with Mathematica 1.2 on a Sun 4/330)
> 
> Well, the inversion is no problem, it takes about 14 seconds to
> compute it, but trying to print the result is next to impossible.
> Canceling common terms in the numerators and denominators 
> brings the output down to reasonable size, however (this takes about
> 25 min.). Max memory used was about 4.5MB.
> ... 

Not to be outdone by my new colleague, I ran it in Maple.
Takes only 30 seconds and under 1 MB to compute, simplify
(i.e. cancel common terms in the numerators and denominators
which is done automatically in Maple) and print the inverse
in Maple 4.3 on a DEC station.

Mike
monagan@inf.ethz.ch

    |\^/|
._|\|   |/|_. Licensed by the University of Waterloo
 \  MAPLE  /  Version 4.3 --- Mar 1989
 <____ ____ >  For on-line help, type  help(); 
      |
 > s:=array(
 > [[(er^2+ei^2)/(4*w^2+g^2+2*er^2+2*ei^2),
 > -(er^2+ei^2)*(2*p1+g)/((p1+g)*(2*er*w+2*ei*w+2*er*p1-2*ei*p1+er*g-ei*g)),
 > -(er^2+ei^2)*(2*p2+g)/((p2+g)*(2*er*w+2*ei*w+2*er*p2-2*ei*p2+er*g-ei*g)),
 > -(er^2+ei^2)*(2*p3+g)/((p3+g)*(2*er*w+2*ei*w+2*er*p3-2*ei*p3+er*g-ei*g))],
 > [-(2*er*w-ei*g)/(4*w^2+g^2+2*er^2+2*ei^2),
 > (2*er*w-2*ei*p1-ei*g)/(2*er*w+2*ei*w+2*er*p1-2*ei*p1+er*g-ei*g),
 > (2*er*w-2*ei*p2-ei*g)/(2*er*w+2*ei*w+2*er*p2-2*ei*p2+er*g-ei*g),
 > (2*er*w-2*ei*p3-ei*g)/(2*er*w+2*ei*w+2*er*p3-2*ei*p3+er*g-ei*g)],
 > [-(2*ei*w+er*g)/(4*w^2+g^2+2*er^2+2*ei^2),
 > (2*ei*w+2*er*p1+er*g)/(2*er*w+2*ei*w+2*er*p1-2*ei*p1+er*g-ei*g),
 > (2*ei*w+2*er*p2+er*g)/(2*er*w+2*ei*w+2*er*p2-2*ei*p2+er*g-ei*g),
 > (2*ei*w+2*er*p3+er*g)/(2*er*w+2*ei*w+2*er*p3-2*ei*p3+er*g-ei*g)],
 > [(4*w^2+g^2+er^2+ei^2)/(4*w^2+g^2+2*er^2+2*ei^2),
 > -(4*p1*w^2+4*g*w^2+4*p1^3+8*g*p1^2+5*g^2*p1+2*er^2*p1+2*ei^2*p1+g^3
 > +er^2*g+ei^2*g)
 >  /((p1+g)*(2*er*w+2*ei*w+2*er*p1-2*ei*p1+er*g-ei*g)),
 > -(4*p2*w^2+4*g*w^2+4*p2^3+8*g*p2^2+5*g^2*p2+2*er^2*p2+2*ei^2*p2+g^3
 >   +er^2*g+ei^2*g)
 >  /((p2+g)*(2*er*w+2*ei*w+2*er*p2-2*ei*p2+er*g-ei*g)),
 > -(4*p3*w^2+4*g*w^2+4*p3^3+8*g*p3^2+5*g^2*p3+2*er^2*p3+2*ei^2*p3+g^3
 >   +er^2*g+ei^2*g)
 >  /((p3+g)*(2*er*w+2*ei*w+2*er*p3-2*ei*p3+er*g-ei*g))]]):
 > evalm(1/s);
                                     2                     2
 [1/4 (- 4 p2 p3 p1 - 4 p1 p2 g - 4 g  p1 - 4 p1 g p3 - 4 g  p2 - 4 p2 g p3

         2       2        3      2         2    2       2       2
     + er  g + ei  g - 4 g  - 4 g  p3) (4 w  + g  + 2 er  + 2 ei )

       /     2     2                       2    2       2       2
      /  ((er  + ei ) p2 p3 p1), - 1/8 (4 w  + g  + 2 er  + 2 ei ) (
     /

	...


           (p3 + g) (2 er w + 2 ei w + 2 er p3 - 2 ei p3 + er g - ei g)
     - 1/4 ------------------------------------------------------------]
                                            2
                         (p1 p2 - p3 p1 + p3  - p2 p3) p3

 > quit
 bytes used=7585924, alloc=925696, time=28.950
(*----------------------------------------------------------------------*)


From: GFX@psuvm.psu.edu
Subject: Solving equations in Mathematica
Date: 13 May 90 18:18:57 GMT
Newsgroups: sci.math.symbolic

Hi!  I just received my copy of Mathematica and was anxious to see how easy
it would be to explore the behavior of equations as we change some parameters.
Well, apparently Mathematica cannot solve the equations I am working with...

Integrating the differential equation is easy and give:

2
-0.1 - x1             x2
E          (10. A x2 - ---)
-0.1 - x1           2                2                            m
(1 - E         ) (-0.01 m  + 10. A x1 - x1 )                          E
V = -------------------------------------------- + --------------------------
0.1 + x1                               0.1 + x2

where x1, x2 and m are control variables, and A is an exogenous variable.  The
problem is first to find optimal values of x1, x2, and m, and what is of real
interest to me is to characterize the change in optimal values for certain
values of A.  (values of x1, x2, and m that maximize V|A)

So, first I compute first derivatives of V wrt x1, x2, and m, and solve simul-
taneously:

Rx1 = D[V,x1]
Rx2 = D[V,x2]
Rm  = D[V,m]

Solve[Rx1 == 0, Rx2 == 0,Rm == 0,{x1,x2,m}]

All I get is {{}}, that is an empty solution set.  Funny thing is that I know
how x1*, x2* and m* behave as a function of A (increasing concave, increasing
more concave and U-concave), both from pencil paper and numerical simulations.
Could someone tell me what I am doing wrong?  Can this be solved on Maple or
Macsyma?  Thanks.  Stephane
(*----------------------------------------------------------------------*)


From: tbray@watsol.waterloo.edu (Tim Bray)
Subject: Comparative review of Symbolic Math Software
Date: 14 May 90 01:09:21 GMT
Newsgroups: sci.math.symbolic

For those who are interested, the May 29th article of PC magazine has a
comparative review of Derive, Macsyma, Maple, and Mathematica.  Bearing in
mind that it's the DOS versions under review, and that the intended audience
is rather less technical than the readers of this group, it still may be
worth reading.

Tim Bray,
Waterloo Maple Software (tbray@watsol.waterloo.edu)
(*----------------------------------------------------------------------*)


From: GFX@psuvm.psu.edu
Subject: Re: Solving equations in Mathematica (eqn fmt)
Date: 14 May 90 02:36:58 GMT
Newsgroups: sci.math.symbolic


[Someone brought to my attention the fact that the equation was impossible
to read, because of formatting problem.  Since here it looks good I can only
suppose that it's been wrapped unto itself during transmission.  So here's
my question again, with the equation now on two lines.]
>
>Hi!  I just received my copy of Mathematica and was anxious to see how easy
>it would be to explore the behavior of equations as we change some parameters.
>Well, apparently Mathematica cannot solve the equations I am working with...
>
>Integrating the differential equation is easy and give:
>
>
-0.1 - x1           2                2
(1 - E         ) (-0.01 m  + 10. A x1 - x1 )
V = --------------------------------------------
0.1 + x1



2
-0.1 - x1             x2
E          (10. A x2 - ---)
m
E
+ --------------------------
0.1 + x2

>where x1, x2 and m are control variables, and A is an exogenous variable.  The
>problem is first to find optimal values of x1, x2, and m, and what is of real
>interest to me is to characterize the change in optimal values for certain
>values of A.  (values of x1, x2, and m that maximize V|A)
>
>So, first I compute first derivatives of V wrt x1, x2, and m, and solve simul-
>taneously:
>
>     Rx1 = D[V,x1]
>     Rx2 = D[V,x2]
>     Rm  = D[V,m]
>
>     Solve[Rx1 == 0, Rx2 == 0,Rm == 0,{x1,x2,m}]
>
>All I get is {{}}, that is an empty solution set.  Funny thing is that I know
>how x1*, x2* and m* behave as a function of A (increasing concave, increasing
>more concave and U-concave), both from pencil paper and numerical simulations.
>Could someone tell me what I am doing wrong?  Can this be solved on Maple or
>Macsyma?  Thanks.  Stephane
(*----------------------------------------------------------------------*)


From: coopere@rocky2.rockefeller.edu (Ellis D. Cooper)
Subject: Riemann Surface of Algebraic Function in Mathematica
Date: 14 May 90 21:40:09 GMT
Newsgroups: sci.math.symbolic

(Richard Bumby already knows I am interested in this.) I could use help in
Mathematica programming (data structures, algorithms) to construct the 
Riemann Surface of an algebraic function represented by a polynomial equation 
P[w,z]==0. I believe this is connected to Newton's Polygon Method and
Puisseux series. I have books by Bliss, Hille, Siegel and Bruno which almost
surely give all the mathematics. Do I have to do the entire translation into
programming, or has someone already gone the route ?
(*----------------------------------------------------------------------*)


From: GFX@psuvm.psu.edu
Subject: Notebooks on Economics
Date: 15 May 90 03:16:52 GMT
Newsgroups: sci.math.symbolic

First, thanks to all of those who replied to my post.   Special thanks to
Marko.Petkovsek@B.GP.CS.CMU.EDU who pointed out that equation systems must
be enclosed in brackets.  Properly expressed, mathematica cannot find a
closed form solution, but it churns out numerical solutions quite fast, so
it's no big deal (just sad :).

Now, I would like to know if there are sources of FTPable notebooks on
applications relevant to Economics; or notebooks concerned with applications
of optimal control theory and so on.  One thing I'd like to see, for example,
is a "good" code to explore the behavior of functions for which there are no
closed form solutions.  My problem, today, is that it seems that FindRoot[]
cannot accept a range of parameter values: it solves for one set of parameters.
Thus, to plot x* f(A), one must build a loop, collect the values of x* in a
list, and finally plot the list.  Somehow, I feel like I'd need to find a good
intro to symbolic programming.  Any suggestion?  Thanks.  Stephane
(*----------------------------------------------------------------------*)


From: ap10+@andrew.cmu.edu (Anand Patwardhan)
Subject: Why the complex root?
Date: 15 May 90 12:02:13 GMT
Newsgroups: sci.math.symbolic


	For some strange reason, mathematica insists on giving me one complex
root for the foll. polynomial equation (f[x] == 0) when a plot shows that
there clearly is a root at the real part of that value. (Besides, just *one*
complex root??) Is this just a numerical glitch? See below:

----------------
Mathematica (DECstation 3100) 1.2 (August 22, 1989) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
with I. Rivin and D. Withoff
Copyright 1988,1989 Wolfram Research Inc.
 -- X11 windows graphics initialized -- 

In[1]:= f1[x1] := 1 + (k (2 x1 -1)/(x1^2 (1 - x1))) (* k is arbitrary *)

In[2]:= k = 100

Out[2]= 100

In[3]:= N[Solve[f1[x1] == 0, x1]]

Out[3]= {{x1 -> 14.4035}, {x1 -> -13.9029}, 
 
                                 -15
>    {x1 -> 0.499376 - 3.07674 10    I}}

In[4]:= f2[x2] := x2^2 (1 - x2) + k (2 x2 - 1) (* f1[x1] == 0 reduces to
this, assuming that x1 is non-zero or unity. *)


In[5]:= N[Solve[f2[x2] == 0, x2]]

Out[5]= {{x2 -> 14.4035}, {x2 -> -13.9029}, 
 
                                 -15
>    {x2 -> 0.499376 - 3.07674 10    I}}

In[6]:= 


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

	Any ideas?

Thanks

Anand
------------------------------------------------------------------------------
Anand Patwardhan	|INTERNET	:	ap10@andrew.cmu.edu
Dept. of Engg. and	|BITNET	:	apat@drycas.BITNET
Public Policy, C.M.U	|(others)..{harvard,psuvax1}!andrew.cmu.edu!ap10
Pittsburgh PA 15213	|VOICE		:	(412)-268-5617 (office)
------------------------------------------------------------------------------
(*----------------------------------------------------------------------*)


From: oliveria@caen.engin.umich.edu (ROQUE DONIZETE DE OLIVEIRA)
Subject: plasma dispersion function in mathematica
Date: 14 May 90 18:27:02 GMT
Newsgroups: sci.math.symbolic

I realize this is a long shot but does anyone have a 
mathematica macro that computes generalized plasma dispersion function,
which is defined as below:

c        Zm(m,z) = 1 / sqrt(pi) * def. integral from -Infinity
c        to Infinity of Exp( -t * t) * (t ** m ) dt / (t - z).
c        for  Im(z) > 0 and analytically continued for Im(z) <= 0.
c
c     An equivalent formulation for the standard (Fried-Conte)
c     plasma dispersion function is
c        Zm(0,z) = sqrt(Pi) * I * W(z)
c
c     where
c        W(z) = Exp(-z * z) * Erfc( -I * z) .
c
c     here Erfc(z) = complementary error function =
c        2 / Sqrt(Pi) * def. integral from z to Infinity of
c        Exp( -t * t) dt.
c
c     The generalized functions Zm(m,z)) satisfy the following
c     recursion relations
c
c        Zm(m+2,z) = z * Zm(m+1,z)
c        Zm(m+1,z) = factorial((m-1)/2) + z * Zm(m,z) ,
c
c     for m even where
c
c        factorial(n-0.5) = (n-0.5)*(n-1.5)*(n-2.5)*...*(0.5), n >= 1,
c        factorial(-0.5)  = 1.

I have a 250-line fortran code the calculates it but I'm trying
to use mathematica in my research and I'll need such a beast converted
to mathematica style. 
Even the code for the Erf function in mathematica style would get
me started.

Thanks for any help you can give me.

   Roque Oliveira
   oliveria@caen.engin.umich.edu
(*----------------------------------------------------------------------*)


From: judge@gpu.utcs.utoronto.ca (Peter Judge)
Subject: Digital Filter Design Packages for Mathematica
Date: 16 May 90 19:13:36 GMT
Newsgroups: sci.math.symbolic

Hi,
	Does anyone know if there are any Mathematica Packages
for designing digital filters?
	Thanks. Please reply by e-mail.

Peter Judge 	(judge@credit.erin.utoronto.ca)


-- 
===============================================
judge@gpu.utcs.utoronto.ca	(Peter Judge)
===============================================
(*----------------------------------------------------------------------*)


From: irh@bby.oz (Ian R Heddle)
Subject: Mathematica Integration
Date: 17 May 90 00:37:34 GMT
Newsgroups: sci.math.symbolic


Can anyone give me any suggestions as to how I can get Mathematica to
do complex integrations? The equation that I've been trying to
integrate describes the surface area of an elipoid. I've attempted
to use the Integrate fn for the definite and indefinite integrals 
of the following equation with no result. Any suggestions would be
greatly appreciated.

Equation:

(b^2*c^2*Cos[phi]^4*Cos[theta]^2 + 
 a^2*b^2*Cos[phi]^2*Sin[phi]^2 + 
 a^2*c^2*Sin[phi]^4*Sin[theta]^2)^0.5

phi   0 -> pi
theta 0 -> 2Pi
--
________________________________
  Ian Heddle
  Burdett, Buckeridge and Young
  Melbourne, Australia
  Internet irh@melba.bby.oz.au
(*----------------------------------------------------------------------*)


From: sdw@hpsad.HP.COM (Steve Warwick)
Subject: Mathematica and Simplify
Date: 17 May 90 15:57:55 GMT
Newsgroups: sci.math.symbolic


Mathematica seems to have problems with the 
simplifications of perfect squares - I have had problems finding the
"Correct" simplification of such expressions and have tracked it 
down to the following problem:

In[8]:= f1 = a-b

Out[8]= a - b

In[9]:= f2 = b-a

Out[9]= -a + b

In[10]:= Simplify[Sqrt[Expand[f1^2]]]

Out[10]= a - b

In[11]:= Simplify[Sqrt[Expand[f2^2]]]

Out[11]= a - b


a,b,f1,f2 were undefined before trying this...


It seems that such simplifications should return multiple results, and
for more complex formula with multiple roots of squares, should return a 
list of the possible simplifications, culling out duplicate results.



Comments??

--
Steven Warwick

Hewlett-Packard
sdw@hpsad
(*----------------------------------------------------------------------*)


From @vmd.cso.uiuc.edu,@VM.BYU.EDU:smithw@mathnx.byu.edu Tue May 22 16:06:15 1990
Received: from vmd.cso.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA21771; Tue, 22 May 90 16:06:13 -0500
Received: from VM.BYU.EDU by VMD.CSO.UIUC.EDU (IBM VM SMTP R1.2) with BSMTP id 8871; Tue, 22 May 90 16:06:23 CDT
Received: from BYUVM by VM.BYU.EDU (Mailer R2.05) with BSMTP id 3837; Tue, 22
 May 90 14:45:05 MDT
Received: from mathnx.byu.edu.byu.edu by VM.BYU.EDU (IBM VM SMTP R1.2.1) with
 TCP; Tue, 22 May 90 14:45:04 MDT
Received: by  mathnx.byu.edu.byu.edu  (NeXT-1.0 (From Sendmail 5.52)/NeXT-1.0)
	id AA04404; Mon, 22 May 89 14:42:12 GMT-0700
Date: Mon, 22 May 89 14:42:12 GMT-0700
From: smithw@mathnx.byu.edu (William V. Smith)
Message-Id: <8905222142.AA04404@ mathnx.byu.edu.byu.edu >
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: mathematica in the classroom
Status: RO

We are interested in talking to folks about the pros and cons of using
 mathematica (and
CAS in general)in or as an adjunct to the classroom in teaching mathematics,
 particularly

calculus but at any level up through graduate courses.  If you are involved or
 know of people who
are involved in such projects who would be willing to discuss what they have
 learned
from this please let me know.  Thanks.

Bill Smith
smithw@mathnx.byu.edu

From mathgroup-adm@yoda.ncsa.uiuc.edu Wed May 23 00:55:52 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA22870; Wed, 23 May 90 00:55:51 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA23357; Wed, 23 May 90 00:52:10 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22129; Tue, 22 May 90 23:46:16 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22125; Tue, 22 May 90 23:46:14 -0500
Message-Id: <9005230446.AA22125@yoda.ncsa.uiuc.edu>
Date: Mon, 21 May 90 14:03:59 GMT-0700
From: smithw@mathnx.byu.edu (William V. Smith)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica bug on NeXT fix
Status: RO

There is a fix for the mathematica bug (together function) on the NeXT. 
I sent email to our area rep (in Denver) and he got back to me the same
day saying that he was putting an OD in the mail with the fix on it.
Nice work NeXT . . .


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed May 23 03:02:36 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA23030; Wed, 23 May 90 03:02:35 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA25771; Wed, 23 May 90 02:58:56 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22135; Tue, 22 May 90 23:46:31 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22131; Tue, 22 May 90 23:46:30 -0500
Message-Id: <9005230446.AA22131@yoda.ncsa.uiuc.edu>
Date: Tue, 22 May 90 16:52:29 EDT
From: mcdonald@quark.umd.edu (Bill MacDonald)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Square root of squares
Status: RO

The following Mathematica command will return f1 or f2 as appropriate.
Solve[c==f1^2,c]
Solve[c==f2^2,c]
If your suggestion were followed, Mathematica could never do the simplest 
calculation involving square roots without getting hung up by delivering
two or more roots every time Sqrt[] was requested.  If you want multiple roots
of an expression, treat it as you would an equation.


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed May 23 03:53:27 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA23134; Wed, 23 May 90 03:53:26 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA26458; Wed, 23 May 90 03:49:48 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22155; Tue, 22 May 90 23:47:06 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22151; Tue, 22 May 90 23:47:04 -0500
Message-Id: <9005230447.AA22151@yoda.ncsa.uiuc.edu>
Date: Mon, 22 May 89 14:42:12 GMT-0700
From: smithw@mathnx.byu.edu (William V. Smith)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: mathematica in the classroom
Status: RO

We are interested in talking to folks about the pros and cons of using
mathematica (and CAS in general)in or as an adjunct to the classroom in 
teaching mathematics, particularly calculus but at any level up through
graduate courses.  If you are involved or know of people who are involved
in such projects who would be willing to discuss what they have learned
from this please let me know.  Thanks.

Bill Smith
smithw@mathnx.byu.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed May 23 04:03:16 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA23140; Wed, 23 May 90 04:03:15 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA26622; Wed, 23 May 90 03:59:25 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22150; Tue, 22 May 90 23:46:57 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22146; Tue, 22 May 90 23:46:55 -0500
Message-Id: <9005230446.AA22146@yoda.ncsa.uiuc.edu>
From: macg@SLCS.SLB.COM (Bill Macgregor)
Date: Tue, 22 May 90 16:03:22 CDT
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: SUMMARY-software defect list poll
Status: RO

In a message to the mailing list yesterday, I asked the
questions:

(1)  How many readers of the mailing list believe WRI should, 
     in the interests of good faith with its customers, make 
     public a list of "known Mma kernel defects"?

(2)  Would it be sufficient for WRI to make such a list available 
     on an internet file server?

I received 46 responses.  All were positive regarding question
(1), the desirability of a published Mma defect list.  Most were
positive regarding (2), although a substantial minority felt
that publication via internet file server would not reach
enough of the Mathematica user community.

One respondent made the point that the wording of the questions
hardly permitted a negative response.  I can only hope that WRI
agrees.

The number of responses and the comments that accompanied them
are more significant than the tally.  46 people felt strongly
enough about the issue to take time to respond, and a number of
the responses were emphatic.  We are justified, I believe,
in hypothesizing that this is an important issue for the Mma user 
community at large.

Here is an unordered summary of the comments I found to be most
interesting and/or most often repeated:

*  Collectively, users waste a great deal of time rediscovering
   known defects and reinventing workarounds.

*  It is in WRI's interests to publish a software defect list,
   rather than to allow a third party to do so.

*  WRI's policy of providing updates to registered users when
   critical defects are found is commendable.

*  Availability of a software defect list to the internet-
   accessible users is a good start, but leaves out many Mma
   users.  What about publication of the list in the Mma
   Journal?  Or a technical newsletter, by subscription, if
   necessary, to cover costs?

*  WRI should verify errors before publishing them (keep the
   noise level down).

*  A software defect list could contain a statement of the 
   problem, a description of workarounds, and a predicted
   disposition (e.g., fixed in next release, update available
   by request, update mailed to registered users).

*  Workarounds and package updates could be made available
   via anonymous ftp (possibly from ncsa?).  Using the netlib
   software would allow access to the repository via email
   from any reachable network.

*  The registration form should include a "preferred contact
   method" for update information, e.g., an email address or
   paper mail, or maybe fax.

*  Could WRI keep documentation updates online, accessible via
   ftp?  Maybe the entire Reference Guide?  Could users get a
   file via ftp to update the local Information database?

*  Just providing a software defect list on paper, available on
   request to WRI, would be a big help.  Sending incremental
   change notices to the mathgroup mailing list would be a good
   idea, too.

Thanks to all of you who took the time to respond.

  - Bill MacGregor


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed May 23 02:12:25 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA22976; Wed, 23 May 90 02:12:24 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA24983; Wed, 23 May 90 02:08:45 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22140; Tue, 22 May 90 23:46:39 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22136; Tue, 22 May 90 23:46:37 -0500
Message-Id: <9005230446.AA22136@yoda.ncsa.uiuc.edu>
Date: Tue, 22 May 90 15:12:55 -0400
From: jack@sun.udel.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  Limit[] trouble
Status: RO

When running the problem,

  Limit[ Cos[1/x^2]^(x^4), x->Infinity]

on a Sun, using Mathmatica 1.2, I also obtained a Sementation Fault.
However, using Mathematica 1.1, I obtain...

In[1]:= Limit[ Cos[1/x^2]^(x^4), x->Infinity]

Limit::nlm: Could not find definite limit.

                       4
                   -2 x
Out[1]= Limit[Cos[x  ]  , x -> Infinity]




From mathgroup-adm@yoda.ncsa.uiuc.edu Wed May 23 02:44:59 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA23014; Wed, 23 May 90 02:44:58 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA25542; Wed, 23 May 90 02:41:20 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22145; Tue, 22 May 90 23:46:46 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA22141; Tue, 22 May 90 23:46:45 -0500
Message-Id: <9005230446.AA22141@yoda.ncsa.uiuc.edu>
Date: Tue, 22 May 90 15:12:55 -0400
From: jack@sun.udel.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  Limit[] trouble
Status: RO

When running the problem,

  Limit[ Cos[1/x^2]^(x^4), x->Infinity]

on a Sun, using Mathmatica 1.2, I also obtained a Sementation Fault.
However, using Mathematica 1.1, I obtain...

In[1]:= Limit[ Cos[1/x^2]^(x^4), x->Infinity]

Limit::nlm: Could not find definite limit.

                       4
                   -2 x
Out[1]= Limit[Cos[x  ]  , x -> Infinity]





From Jim_Wendel@ub.cc.umich.edu Wed May 23 17:07:27 1990
Received: from umich.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA24098; Wed, 23 May 90 17:07:25 -0500
Received: from ubmts.cc.umich.edu by umich.edu (5.61/1123-1.0)
	id AA28201; Wed, 23 May 90 18:07:23 -0400
Date: Wed, 23 May 90 18:07:10 EDT
From: Jim_Wendel@ub.cc.umich.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Message-Id: <5371595@ub.cc.umich.edu>
Status: RO

Concerning Limit[Cos[1/x^2]^(x^4),x->Infinity], I get the correct answer
1/Sqrt[E] on a Mac II.

From tleen@cse.ogi.edu Thu May 24 16:02:06 1990
Received: from cse.ogi.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA25663; Thu, 24 May 90 16:01:58 -0500
Received: by cse.ogi.edu
	(5.61+eap+OGI_1.1.named/IDA-1.2.8+OGI_1.11) id AA14119; Thu, 24 May 90 14:01:44 -0700
Date: Thu, 24 May 90 14:01:44 -0700
From: Todd Leen <tleen@cse.ogi.edu>
Message-Id: <9005242101.AA14119@cse.ogi.edu>
To: mathgroup-request@yoda.ncsa.uiuc.edu
Subject: Mailing list
Cc: tleen@cse.ogi.edu
Status: RO


I am using Mathematica to do perturbation expansions for dynamical
systems analysis of neural network learning.  Please add me to your
mailing list.  Also, if you know of anyone who has written packages for

i.  Liapunov Schmidt reduction
ii. Center manifold expansions
iii. Reduction to normal form

I would appreciate any contacts.

Thanks
tleen@cse.ogi.edu


From marzetta@iam.unibe.ch Fri May 25 03:47:22 1990
Received: from [130.59.1.2] by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA26654; Fri, 25 May 90 03:47:14 -0500
Received: by chx400.switch.ch (5.61/Ultrix2.4-C)
	id AA24323; Fri, 25 May 90 10:47:52 +0200
Date: 25 May 90 10:14 +0200
From: Markus Marzetta <marzetta@iam.unibe.ch>
To: <mathgroup@yoda.ncsa.uiuc.edu>
Message-Id: <205:marzetta@iam.unibe.ch>
Subject: ii) Limit[] trouble
Status: RO

Can anyone explain this singular behaviour:

>  Mathematica (sun4) 1.2 (August 22, 1989) [With pre-loaded data]
>  by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
>     S. Omohundro, D. Ballman and J. Keiper
>  with I. Rivin and D. Withoff
>  Copyright 1988,1989 Wolfram Research Inc.
>   -- X11 windows graphics initialized --
>  
>  In[1]:= Limit[(1+1/n)^n,n->Infinity]
>  
>  Out[1]= E
>  
>  In[2]:=  Limit[(1+1/(n+1))^(n+1),n->Infinity]
>  
>  Out[2]= E
>  
>  In[3]:= Limit[(1+1/n)^(n+1),n->Infinity]
>  
>           1/(1 + 1/n)
>  Out[3]= E
>  
>  In[4]:= Limit[%,n->Infinity]
>  
>  Out[4]= E

I suppose in general the variable bound by "Limit"
should not appear in the result; am I right?

Markus Marzetta
<marzetta@iam.unibe.ch>

From mathgroup-adm@yoda.ncsa.uiuc.edu Sat May 26 05:13:10 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA28530; Sat, 26 May 90 05:13:09 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15392; Sat, 26 May 90 05:09:32 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA28371; Sat, 26 May 90 02:20:00 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA28367; Sat, 26 May 90 02:19:58 -0500
Message-Id: <9005260719.AA28367@yoda.ncsa.uiuc.edu>
Date: 25 May 90 10:14 +0200
From: Markus Marzetta <marzetta@iam.unibe.ch>
To: <mathgroup@yoda.ncsa.uiuc.edu>
Subject: ii) Limit[] trouble
Status: RO

Can anyone explain this singular behaviour:

>  Mathematica (sun4) 1.2 (August 22, 1989) [With pre-loaded data]
>  by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
>     S. Omohundro, D. Ballman and J. Keiper
>  with I. Rivin and D. Withoff
>  Copyright 1988,1989 Wolfram Research Inc.
>   -- X11 windows graphics initialized --
>  
>  In[1]:= Limit[(1+1/n)^n,n->Infinity]
>  
>  Out[1]= E
>  
>  In[2]:=  Limit[(1+1/(n+1))^(n+1),n->Infinity]
>  
>  Out[2]= E
>  
>  In[3]:= Limit[(1+1/n)^(n+1),n->Infinity]
>  
>           1/(1 + 1/n)
>  Out[3]= E
>  
>  In[4]:= Limit[%,n->Infinity]
>  
>  Out[4]= E

I suppose in general the variable bound by "Limit"
should not appear in the result; am I right?

Markus Marzetta
<marzetta@iam.unibe.ch>


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat May 26 04:17:51 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA28472; Sat, 26 May 90 04:17:50 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14542; Sat, 26 May 90 04:14:13 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA28366; Sat, 26 May 90 02:19:52 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA28362; Sat, 26 May 90 02:19:50 -0500
Message-Id: <9005260719.AA28362@yoda.ncsa.uiuc.edu>
Date: Thu, 24 May 90 14:01:44 -0700
From: Todd Leen <tleen@cse.ogi.edu>
To: mathgroup-request@yoda.ncsa.uiuc.edu
Subject: Mailing list
Status: RO


I am using Mathematica to do perturbation expansions for dynamical
systems analysis of neural network learning.  Please add me to your
mailing list.  Also, if you know of anyone who has written packages for

i.  Liapunov Schmidt reduction
ii. Center manifold expansions
iii. Reduction to normal form

I would appreciate any contacts.

Thanks
tleen@cse.ogi.edu



From mathgroup-adm@yoda.ncsa.uiuc.edu Sat May 26 03:18:05 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA28400; Sat, 26 May 90 03:18:02 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA13578; Sat, 26 May 90 03:14:21 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA28361; Sat, 26 May 90 02:19:43 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA28357; Sat, 26 May 90 02:19:42 -0500
Message-Id: <9005260719.AA28357@yoda.ncsa.uiuc.edu>
Date: Wed, 23 May 90 18:07:10 EDT
From: Jim_Wendel@ub.cc.umich.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Concerning Limit[Cos[1/x^2]^(x^4),x->Infinity], I get the correct answer
1/Sqrt[E] on a Mac II.


From @vmd.cso.uiuc.edu:SAF8613@TAMSTAR.BITNET Sun May 27 22:56:16 1990
Received: from vmd.cso.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA29801; Sun, 27 May 90 22:56:13 -0500
Message-Id: <9005280356.AA29801@yoda.ncsa.uiuc.edu>
Received: from TAMSTAR.BITNET by VMD.CSO.UIUC.EDU (IBM VM SMTP R1.2) with BSMTP id 1787; Sun, 27 May 90 22:56:26 CDT
Date:     Sun, 27 May 90 21:43 CDT
From: <SAF8613@tamstar.bitnet>
Subject:  Perturbation theory and symbolic computation
To: mathgroup@yoda.ncsa.uiuc.edu
X-Original-To:  mathgroup@yoda.ncsa.uiuc.edu, tleen@cse.ogi.edu, SAF8613
Status: RO



>I am using Mathematica to do perturbation expansions for dynamical
>systems analysis of neural network learning.  Please add me to your
>mailing list.  Also, if you know of anyone who has written packages for
>
>i.  Liapunov Schmidt reduction
>ii. Center manifold expansions
>iii. Reduction to normal form
>
>I would appreciate any contacts.
>
>Thanks
>tleen@cse.ogi.edu  (Todd Leen)


Precisely the three topics listed (and others) are discussed in
the book by Richard H. Rand and Dieter Armbruster, "Perturbation
Methods, Bifurcation Theory and Computer Algebra" (Springer-
Verlag, Applied Mathematical Sciences vol. 65, 1987).  All their
code is in MACSYMA, but presumably it could be translated into
Mathematica with reasonable effort.

                                Steve Fulling
                                fulling@sarastro.tamu.edu
                                saf8613@tamstar.bitnet


From @vmd.cso.uiuc.edu:SAF8613@TAMSTAR.BITNET Sun May 27 22:56:20 1990
Received: from vmd.cso.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA29806; Sun, 27 May 90 22:56:18 -0500
Message-Id: <9005280356.AA29806@yoda.ncsa.uiuc.edu>
Received: from TAMSTAR.BITNET by VMD.CSO.UIUC.EDU (IBM VM SMTP R1.2) with BSMTP id 1792; Sun, 27 May 90 22:56:27 CDT
Date:     Sun, 27 May 90 21:45 CDT
From: <SAF8613@tamstar.bitnet>
Subject:  Sqrt[x^2], and Mathematica in the classroom
To: mathgroup@yoda.ncsa.uiuc.edu
X-Original-To:  mathgroup@yoda.ncsa.uiuc.edu, smithw@mathnx.byu.edu, SAF8613
Status: RO



>>Mathematica seems to have problems with the
>>simplifications of perfect squares - I have had problems finding the
>>"Correct" simplification of such expressions and have tracked it
>>down to the following problem:
>>
>>In[8]:= f1 = a-b
>>
>>Out[8]= a - b
>>
>>In[9]:= f2 = b-a
>>
>>Out[9]= -a + b
>>
>>In[10]:= Simplify[Sqrt[Expand[f1^2]]]
>>
>>Out[10]= a - b
>>
>>In[11]:= Simplify[Sqrt[Expand[f2^2]]]
>>
>>Out[11]= a - b
>>
>>
>>a,b,f1,f2 were undefined before trying this...
>>
>>
>>It seems that such simplifications should return multiple results, and
>>for more complex formula with multiple roots of squares, should return a
>>list of the possible simplifications, culling out duplicate results.
>>Comments??
>>
>>                   Steven Warwick


>
>The following Mathematica command will return f1 or f2 as appropriate.
>Solve[c==f1^2,c]
>Solve[c==f2^2,c]
>If your suggestion were followed, Mathematica could never do the simplest
>calculation involving square roots without getting hung up by delivering
>two or more roots every time Sqrt[] was requested.  If you want multiple roots
>of an expression, treat it as you would an equation.
>
>                             (Bill MacDonald)


But the square root (of a positive number) is by definition a
positive number.  If Mathematica can't test which of the two
candidates is the positive one, it should leave the function
unevaluated, which is its usual default behavior when it doesn't
know enough about the argument of a function to evaluate the
function.  It should not make a random guess of the sign, as that
could lead to serious, unnoticed errors in complicated
calculations.  At the very least, this "feature" should be
explained in the Mathematica Book so that users can try to work
around it.

The documentation for the function Positive[] states that
"A definition like  Positive[x] = True  effectively specifies
that x is a positive number."  However, I find that
    (1) One must  Unprotect[Positive]  before stating such a
definition.
    (2) Setting  Positive[a-b] = True  leaves  Positive[b-a]
undetermined.
    (3) Setting  Positive[b-a] = False  does not help the Sqrt[]
function to find the right sign.

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

In[1]:= f1=a-b

Out[1]= a - b

In[2]:= f2=b-a

Out[2]= -a + b

In[3]:= s1=f1^2

               2
Out[3]= (a - b)

In[4]:= s2=f2^2

                2
Out[4]= (-a + b)

In[5]:= r1=Sqrt[s1]

Out[5]= a - b

In[6]:= r2=Sqrt[s2]

Out[6]= -a + b


In[11]:= Unprotect[Positive]

Out[11]= {Positive}

In[12]:= Positive[a-b]=True

Out[12]= True

In[13]:= Positive[b-a]

Out[13]= Positive[-a + b]


In[15]:= Positive[b-a]=False

Out[15]= False


In[17]:= Sqrt[s2]

Out[17]= -a + b

In[18]:= Positive[%]

Out[18]= False

In[19]:= Quit

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

Generally speaking, although rich in functions and the treatment
thereof, Mathematica seems to be weak in "predicates" and
relations -- that is, functions whose value is True or False
rather than a number, a list, or whatever.  When a predicate must
be evaluated in order to evaluate a function, the program tends
to make a random default assumption.  I see no reason in
principle why logical functions could not be treated as fully and
consistently as algebraic functions have been.

Another example:  Mathematica does not include functions for
taking the real and imaginary parts of an expression.  (Re[] and
Im[] work only if the argument is a particular complex number.)
Presumably the reason is that to implement such a function
requires a way of specifying which of the variables in the
expression represent real numbers -- i.e., a predicate RealQ[].
At least Mathematica does not assume that all expressions that
don't involve an explicit "I" are real!

In answer to the question of William Smith about Mathematica in
the classroom:  The  Sqrt[x^2] = x  fallacy is only one of many
instances where Mathematica makes the very errors that we are
trying to teach our students to avoid.  (Does this make it
valuable as an object lesson?)  The lack of support for logical
relations (especially inequalities) makes it very difficult to
use Mathematica in first-semester calculus courses, though it may
be very useful in later courses.  I hope (and expect) that later
versions of the program will live up better to its billing as
"A system for doing mathematics by computer".  Granted that
"mathematics" does not mean the same thing to the majority of
WRI's customers that it does to an academic mathematician (I
don't expect the program to prove theorems in functional
analysis), we still should insist that it outgrow its freshman
naivete before depending on it as a TA.

                                S. A. Fulling
                                Professor of Mathematics
                                Texas A&M University
                                fulling@sarastro.tamu.edu
                                saf8613@tamstar.bitnet


From MAILER-DAEMON@ndcvx.cc.nd.edu Tue May 29 00:24:10 1990
Received: from uunet.UU.NET by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02044; Tue, 29 May 90 00:24:08 -0500
Received: from ndcva.cc.nd.edu by uunet.uu.net (5.61/1.14) with SMTP 
	id AA01734; Tue, 29 May 90 01:23:59 -0400
Received: from [128.174.222.70] by ndcvx.cc.nd.edu (5.61/1.34)
	id AA09390; Tue, 29 May 90 00:24:57 -0500
Date: Tue, 29 May 90 00:24:57 -0500
From: MAILER-DAEMON@ndcvx.cc.nd.edu (Mail Delivery Subsystem)
Subject: Returned mail: Host unknown
Message-Id: <9005290524.AA09390@ndcvx.cc.nd.edu>
To: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Status: RO

   ----- Transcript of session follows -----
421 ndcvb.cc.nd.edu.tcpld... Deferred: No such file or directory
550 <johneder@ndcvb.cc.nd.edu>... Host unknown: No such file or directory

   ----- Unsent message follows -----
Received: from [128.174.222.70] by ndcvx.cc.nd.edu (5.61/1.34)
	id AA09365; Tue, 29 May 90 00:24:57 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01003; Mon, 28 May 90 22:43:36 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA00999; Mon, 28 May 90 22:43:34 -0500
Date: Mon, 28 May 90 22:43:34 -0500
Message-Id: <9005290343.AA00999@yoda.ncsa.uiuc.edu>
From: SAF8613@tamstar.bitnet
Subject:  Perturbation theory and symbolic computation
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO



>I am using Mathematica to do perturbation expansions for dynamical
>systems analysis of neural network learning.  Please add me to your
>mailing list.  Also, if you know of anyone who has written packages for
>
>i.  Liapunov Schmidt reduction
>ii. Center manifold expansions
>iii. Reduction to normal form
>
>I would appreciate any contacts.
>
>Thanks
>tleen@cse.ogi.edu  (Todd Leen)


Precisely the three topics listed (and others) are discussed in
the book by Richard H. Rand and Dieter Armbruster, "Perturbation
Methods, Bifurcation Theory and Computer Algebra" (Springer-
Verlag, Applied Mathematical Sciences vol. 65, 1987).  All their
code is in MACSYMA, but presumably it could be translated into
Mathematica with reasonable effort.

                                Steve Fulling
                                fulling@sarastro.tamu.edu
                                saf8613@tamstar.bitnet



From MAILER-DAEMON@ndcvx.cc.nd.edu Tue May 29 01:00:08 1990
Received: from uunet.UU.NET by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02102; Tue, 29 May 90 01:00:06 -0500
Received: from ndcva.cc.nd.edu by uunet.uu.net (5.61/1.14) with SMTP 
	id AA09096; Tue, 29 May 90 01:59:32 -0400
Received: from [128.174.222.70] by ndcvx.cc.nd.edu (5.61/1.34)
	id AA09630; Tue, 29 May 90 01:00:30 -0500
Date: Tue, 29 May 90 01:00:30 -0500
From: MAILER-DAEMON@ndcvx.cc.nd.edu (Mail Delivery Subsystem)
Subject: Returned mail: Host unknown
Message-Id: <9005290600.AA09630@ndcvx.cc.nd.edu>
To: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Status: RO

   ----- Transcript of session follows -----
421 ndcvb.cc.nd.edu.tcpld... Deferred: No such file or directory
550 <johneder@ndcvb.cc.nd.edu>... Host unknown: No such file or directory

   ----- Unsent message follows -----
Received: from [128.174.222.70] by ndcvx.cc.nd.edu (5.61/1.34)
	id AA09627; Tue, 29 May 90 01:00:30 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01009; Mon, 28 May 90 22:44:12 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01005; Mon, 28 May 90 22:44:10 -0500
Message-Id: <9005290344.AA01005@yoda.ncsa.uiuc.edu>
Date:     Sun, 27 May 90 21:45 CDT
From: SAF8613@tamstar.bitnet
Subject:  Sqrt[x^2], and Mathematica in the classroom
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO



>>Mathematica seems to have problems with the
>>simplifications of perfect squares - I have had problems finding the
>>"Correct" simplification of such expressions and have tracked it
>>down to the following problem:
>>
>>In[8]:= f1 = a-b
>>
>>Out[8]= a - b
>>
>>In[9]:= f2 = b-a
>>
>>Out[9]= -a + b
>>
>>In[10]:= Simplify[Sqrt[Expand[f1^2]]]
>>
>>Out[10]= a - b
>>
>>In[11]:= Simplify[Sqrt[Expand[f2^2]]]
>>
>>Out[11]= a - b
>>
>>
>>a,b,f1,f2 were undefined before trying this...
>>
>>
>>It seems that such simplifications should return multiple results, and
>>for more complex formula with multiple roots of squares, should return a
>>list of the possible simplifications, culling out duplicate results.
>>Comments??
>>
>>                   Steven Warwick


>
>The following Mathematica command will return f1 or f2 as appropriate.
>Solve[c==f1^2,c]
>Solve[c==f2^2,c]
>If your suggestion were followed, Mathematica could never do the simplest
>calculation involving square roots without getting hung up by delivering
>two or more roots every time Sqrt[] was requested.  If you want multiple roots
>of an expression, treat it as you would an equation.
>
>                             (Bill MacDonald)


But the square root (of a positive number) is by definition a
positive number.  If Mathematica can't test which of the two
candidates is the positive one, it should leave the function
unevaluated, which is its usual default behavior when it doesn't
know enough about the argument of a function to evaluate the
function.  It should not make a random guess of the sign, as that
could lead to serious, unnoticed errors in complicated
calculations.  At the very least, this "feature" should be
explained in the Mathematica Book so that users can try to work
around it.

The documentation for the function Positive[] states that
"A definition like  Positive[x] = True  effectively specifies
that x is a positive number."  However, I find that
    (1) One must  Unprotect[Positive]  before stating such a
definition.
    (2) Setting  Positive[a-b] = True  leaves  Positive[b-a]
undetermined.
    (3) Setting  Positive[b-a] = False  does not help the Sqrt[]
function to find the right sign.

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

In[1]:= f1=a-b

Out[1]= a - b

In[2]:= f2=b-a

Out[2]= -a + b

In[3]:= s1=f1^2

               2
Out[3]= (a - b)

In[4]:= s2=f2^2

                2
Out[4]= (-a + b)

In[5]:= r1=Sqrt[s1]

Out[5]= a - b

In[6]:= r2=Sqrt[s2]

Out[6]= -a + b


In[11]:= Unprotect[Positive]

Out[11]= {Positive}

In[12]:= Positive[a-b]=True

Out[12]= True

In[13]:= Positive[b-a]

Out[13]= Positive[-a + b]


In[15]:= Positive[b-a]=False

Out[15]= False


In[17]:= Sqrt[s2]

Out[17]= -a + b

In[18]:= Positive[%]

Out[18]= False

In[19]:= Quit

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

Generally speaking, although rich in functions and the treatment
thereof, Mathematica seems to be weak in "predicates" and
relations -- that is, functions whose value is True or False
rather than a number, a list, or whatever.  When a predicate must
be evaluated in order to evaluate a function, the program tends
to make a random default assumption.  I see no reason in
principle why logical functions could not be treated as fully and
consistently as algebraic functions have been.

Another example:  Mathematica does not include functions for
taking the real and imaginary parts of an expression.  (Re[] and
Im[] work only if the argument is a particular complex number.)
Presumably the reason is that to implement such a function
requires a way of specifying which of the variables in the
expression represent real numbers -- i.e., a predicate RealQ[].
At least Mathematica does not assume that all expressions that
don't involve an explicit "I" are real!

In answer to the question of William Smith about Mathematica in
the classroom:  The  Sqrt[x^2] = x  fallacy is only one of many
instances where Mathematica makes the very errors that we are
trying to teach our students to avoid.  (Does this make it
valuable as an object lesson?)  The lack of support for logical
relations (especially inequalities) makes it very difficult to
use Mathematica in first-semester calculus courses, though it may
be very useful in later courses.  I hope (and expect) that later
versions of the program will live up better to its billing as
"A system for doing mathematics by computer".  Granted that
"mathematics" does not mean the same thing to the majority of
WRI's customers that it does to an academic mathematician (I
don't expect the program to prove theorems in functional
analysis), we still should insist that it outgrow its freshman
naivete before depending on it as a TA.

                                S. A. Fulling
                                Professor of Mathematics
                                Texas A&M University
                                fulling@sarastro.tamu.edu
                                saf8613@tamstar.bitnet



From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May 29 13:05:18 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02665; Tue, 29 May 90 13:05:17 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA02994; Tue, 29 May 90 13:01:43 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02610; Tue, 29 May 90 12:19:12 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02606; Tue, 29 May 90 12:19:10 -0500
Message-Id: <9005291719.AA02606@yoda.ncsa.uiuc.edu>
Date: Tue, 29 May 90 09:41:47 EDT
From: mcdonald@quark.umd.edu (Bill MacDonald)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica's Handling of Overflow and Underflow
Status: RO

Mathematica's handling of Overflow and Underflow do not seem to be
consistent and evidence for this is found in the following anomalies.
In[1]:= Overflow[]==Underflow[]
Out[1]= True
In[2]:= Overflow[]===Underflow[]
Out[2]= True
In[3]:= Overflow[] > 0
Out[3]= True
In[4]:= Overflow[] < 1/(10^100)
Out[4]= True
In[5]:= Chop[Overflow[]]
Out[5]= 0
Mathematica is at least consistent in that the last three statements are
also True for Underflow[].  Note that
In[6]:= Head[Overflow[]]
Out[6]= Real
is also true of Underflow[].



From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May 29 14:56:46 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02849; Tue, 29 May 90 14:56:29 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA05215; Tue, 29 May 90 14:52:55 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02620; Tue, 29 May 90 12:19:27 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02616; Tue, 29 May 90 12:19:26 -0500
Message-Id: <9005291719.AA02616@yoda.ncsa.uiuc.edu>
Date: Tue, 29 May 90 10:58:44 +0200
From: lie@itk.unit.no
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  setting element of list
Status: RO

The following example will explain my problem:
--------------

Mathematica (sun4) 1.2 (August 3, 1989) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
with I. Rivin and D. Withoff
Copyright 1988,1989 Wolfram Research Inc.
 -- X11 windows graphics initialized --

In[1]:= h[s_]={{(1-s)/(1+s+s^2)}}

            1 - s
Out[1]= {{----------}}
                   2
          1 + s + s

In[2]:= h[s][[1,1]]

          1 - s
Out[2]= ----------
                 2
        1 + s + s

In[3]:= h[s_][[1,1]]=3

Part::nonsymb: h[s_] in assignment of part is not a symbol.

Out[3]= 3

In[4]:= h[s][[1,1]]=3

Part::nonsymb: h[s] in assignment of part is not a symbol.

Out[4]= 3

In[5]:= h[[1,1]]=3

Part::noval: Symbol h in part assignment does not have an immediate value.

Out[5]= 3

In[6]:= ??????

----------------------
What is the correct way of setting element {1,1} of h[s] to 3? Why doesn't 
"my" methods work??

--------

Two other "problems".
1) There is a bug in our version of ListContourPlot (Sun version): the command 
   requires the table to be square (i.e., the same numberof rows and columns). 
   The Macintosh versions allows for rectangular tables.
2) In general, I'm not impressed by the quality of the numerical algorithms
   that are used. The Roots command, for instance, fails to find the correct
   roots of a certain polynomial of degree 10, whereas Matlab appears to solve
   the problem easily.

----------

-Bernt Lie,
 lie@itk.unit.no




From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May 29 15:04:22 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02860; Tue, 29 May 90 15:04:21 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA05382; Tue, 29 May 90 15:00:49 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02631; Tue, 29 May 90 12:20:25 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02627; Tue, 29 May 90 12:20:23 -0500
Message-Id: <9005291720.AA02627@yoda.ncsa.uiuc.edu>
Date: Tue, 29 May 90 12:03:26 CDT
From: withoff@wri.UUCP (David Withoff)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  Sqrt[x^2], and Mathematica in the classroom
Status: RO

While the comments about Sqrt[x^2] ==> x, real and imaginary parts
of expressions, inequalities, predicates, and so forth, are true of
Mathematica in its "raw" (unprogrammed) state, it is often straightforward
to program Mathematica to have almost any desired behaviour.  For example,
there are indeed functions for obtaining the real and imaginary
parts of expressions:

In[1]:= << ReIm.m

In[2]:= Re[a] ^= a; Im[a] ^= 0; Re[b] ^= x; Im[b] ^= y;

In[3]:= Re[(a + b)^2 + Sin[b]]

                          -y    y
               2    2   (E   + E ) Sin[x]
Out[3]= (a + x)  - y  + -----------------
                                2

In[4]:= Im[b Exp[a b]]

         a x               a x
Out[4]= E    y Cos[a y] + E    x Sin[a y]

The package ReIm.m is a short collection of simple rules, and can
be extended as necessary.  It also represents a good example of a
useful approach for dealing with a number of related problems,
such as equations, predicates, and inequalities.
 
Without programmability, Mathematica (although quite powerful as a
calculator) is rather limited -- but that's like saying that a car is
limited when the engine isn't running.  If the user chooses not to start
the engine, they might be better off with a different product.
 
As for Mathematica the classroom, I know it is widely used for this
purpose, including first semester calculus, and I too am interested in
hearing about the experiences of people who have incorporated it into
their teaching.
 
Dave Withoff
Wolfram Research
withoff@wri.com


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May 29 14:14:07 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02762; Tue, 29 May 90 14:14:06 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA04414; Tue, 29 May 90 14:10:32 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02615; Tue, 29 May 90 12:19:19 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA02611; Tue, 29 May 90 12:19:18 -0500
Message-Id: <9005291719.AA02611@yoda.ncsa.uiuc.edu>
Date: Tue, 29 May 90 09:52:33 +0300
From: pjanhune@finsun.CSC.FI
Apparently-To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

To obtain a simplified Re or Im of a symbolic expression, try this:

(suppose f is a symbolic expression)

<<Algebra/ReIm.m

Re[f] //. {Re[f_?(FreeQ[#,I]&)] :> f, Im[f_?(FreeQ[#,I]&)] :> 0}

This assumes all subexpressions of f not containing an explicit I
to be real. It works, of course, correctly only if all symbols appearing
in f are assumed to be real and, further, if there are no square roots of
negative arguments etc. among the subexpressions of f.

                              Pekka Janhunen
                              Finnish Meteorological Institute,
                              Geophysics Dept.
                              pjanhune@finsun.csc.fi



From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May 29 19:02:54 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03301; Tue, 29 May 90 19:02:54 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA10798; Tue, 29 May 90 18:59:23 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03173; Tue, 29 May 90 17:57:28 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03169; Tue, 29 May 90 17:57:27 -0500
Message-Id: <9005292257.AA03169@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Overflow and Underflow
Date: Tue, 29 May 90 11:27:50 PDT
From: jacobson@cello.hpl.hp.com
Status: RO

It was only upon reading Bill McDonald's message that I discovered the
existance of Overflow and Underflow.  Where are these documented?  If
I try the "?" or "??" specal forms, I only find that they are
protected.  They are not mentioned in the Mathematica book or the
Version 1.2 Reference Guide Updates.

  -- David Jacobson


From @uunet.UU.NET:keiper@wri.UUCP Tue May 29 19:38:10 1990
Received: from uunet.UU.NET by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03345; Tue, 29 May 90 19:38:08 -0500
Received: from wri.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA26439; Tue, 29 May 90 20:37:24 -0400
From: keiper@wri.UUCP
Received: by WRI.com (3.2/SMI-3.0DEV3)
	id AA06736; Tue, 29 May 90 19:13:23 CDT
Message-Id: <9005300013.AA06736@WRI.com>
Date: Tue, 29 May 90 19:13:21 CDT
To: jacobson@cello.hpl.hp.com
Subject: Re:  Overflow and Underflow
Cc: mathgroup@yoda.ncsa.uiuc.edu
Status: RO


In[1]:= ?Overflow 
Overflow[] is the result of a numerical calculation whose result is too large
   to represent.
 
In[1]:= ?Underflow
Underflow[] is the result of a numerical calculation whose result is too small
   to represent.

These "functions" were not documented in the manual because it is intended
that in the future Mathematica will be able to deal with truly arbitrary
sized numbers.  The fact that they were not documented on-line is a bug.
As can be seen above they are docmented in the internal development version
and will also be documented in the next release;  Mathematica is not yet
able to deal with numbers on the order of 10.^1000000000.

Jerry Keiper
Wolfram Research, Inc.
keiper@wri.com

From @VM.BYU.EDU:smithw@mathnx.byu.edu Tue May 29 18:16:41 1990
Received: from vm.byu.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03217; Tue, 29 May 90 18:16:39 -0500
Received: from mathnx.byu.edu.byu.edu by VM.BYU.EDU (IBM VM SMTP R1.2.1) with TCP; Tue, 29 May 90 17:16:38 MDT
Received: by  mathnx.byu.edu.byu.edu  (NeXT-1.0 (From Sendmail 5.52)/NeXT-1.0)
	id AA01909; Tue, 29 May 90 17:17:11 MDT
Date: Tue, 29 May 90 17:17:11 MDT
From: smithw@mathnx.byu.edu (William V. Smith)
Message-Id: <9005292317.AA01909@ mathnx.byu.edu.byu.edu >
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Limits in NeXT Mathematica
Cc: Mitch_Green@next.com
Status: RO

I have the recent fix for Mathematica on the NeXT, but it still seems to have the
problem with limits.  With

Limit[Cos[1/x^2]^(x^4),x->Infinity]

I get "bus error" from a remote login session and it just seems to go on forever
if you run it from the console.

From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May 29 20:03:02 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03387; Tue, 29 May 90 20:03:01 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA12223; Tue, 29 May 90 19:59:29 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03168; Tue, 29 May 90 17:57:21 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03164; Tue, 29 May 90 17:57:19 -0500
Message-Id: <9005292257.AA03164@yoda.ncsa.uiuc.edu>
Date: Tue, 29 May 90 12:03:26 CDT
From: withoff@wri.UUCP (David Withoff)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  Sqrt[x^2], and Mathematica in the classroom
Status: RO

While the comments about Sqrt[x^2] ==> x, real and imaginary parts
of expressions, inequalities, predicates, and so forth, are true of
Mathematica in its "raw" (unprogrammed) state, it is often straightforward
to program Mathematica to have almost any desired behaviour.  For example,
there are indeed functions for obtaining the real and imaginary
parts of expressions:

In[1]:= << ReIm.m

In[2]:= Re[a] ^= a; Im[a] ^= 0; Re[b] ^= x; Im[b] ^= y;

In[3]:= Re[(a + b)^2 + Sin[b]]

                          -y    y
               2    2   (E   + E ) Sin[x]
Out[3]= (a + x)  - y  + -----------------
                                2

In[4]:= Im[b Exp[a b]]

         a x               a x
Out[4]= E    y Cos[a y] + E    x Sin[a y]

The package ReIm.m is a short collection of simple rules, and can
be extended as necessary.  It also represents a good example of a
useful approach for dealing with a number of related problems,
such as equations, predicates, and inequalities.
 
Without programmability, Mathematica (although quite powerful as a
calculator) is rather limited -- but that's like saying that a car is
limited when the engine isn't running.  If the user chooses not to start
the engine, they might be better off with a different product.
 
As for Mathematica the classroom, I know it is widely used for this
purpose, including first semester calculus, and I too am interested in
hearing about the experiences of people who have incorporated it into
their teaching.
 
Dave Withoff
Wolfram Research
withoff@wri.com

>From @uunet.UU.NET:keiper@wri.UUCP Tue May 29 15:23:02 1990
Received: from uunet.UU.NET by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02880; Tue, 29 May 90 15:22:59 -0500
Received: from wri.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA04280; Tue, 29 May 90 16:22:59 -0400
From: keiper@wri.UUCP
Received: by WRI.com (3.2/SMI-3.0DEV3)
	id AA02495; Tue, 29 May 90 15:17:22 CDT
Message-Id: <9005292017.AA02495@WRI.com>
Date: Tue, 29 May 90 15:17:20 CDT
To: lie@itk.unit.no
Subject: Re:  setting element of list
Cc: mathgroup@yoda.ncsa.uiuc.edu
Status: RO


	> What is the correct way of setting element {1,1} of h[s] to 3?

You can't.  h[s] has a Head of "h" and a single argument "s".  Since s is
a Symbol it does not have a first Part.

Now you say "But h[s][[1, 1]] is ...".  But, in the statement

	h[s][[1, 1]] = 3,
	
h[s] is not evaluated since Set[] is HoldFirst.  If it weren't HoldFirst
then things like a = b; a = 3 would result in setting the value of b to 3.
Clearly you don't want this sort of thing to occur.

If I may guess at what is intended, the following does work:

In[11]:= h[s_]={{(1-s)/(1+s+s^2)}}

	     1 - s
Out[11]= {{----------}}
		    2
	   1 + s + s

In[12]:= a = h[s]

	     1 - s
Out[12]= {{----------}}
		    2
	   1 + s + s

In[13]:= a[[1,1]] = 3

Out[13]= 3

>From @uunet.UU.NET:keiper@wri.UUCP Tue May 29 15:23:02 1990
Received: from uunet.UU.NET by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA02880; Tue, 29 May 90 15:22:59 -0500
Received: from wri.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA04280; Tue, 29 May 90 16:22:59 -0400
From: keiper@wri.UUCP
Received: by WRI.com (3.2/SMI-3.0DEV3)
	id AA02495; Tue, 29 May 90 15:17:22 CDT
Message-Id: <9005292017.AA02495@WRI.com>
Date: Tue, 29 May 90 15:17:20 CDT
To: lie@itk.unit.no
Subject: Re:  setting element of list
Cc: mathgroup@yoda.ncsa.uiuc.edu
Status: RO


	> What is the correct way of setting element {1,1} of h[s] to 3?

You can't.  h[s] has a Head of "h" and a single argument "s".  Since s is
a Symbol it does not have a first Part.

Now you say "But h[s][[1, 1]] is ...".  But, in the statement

	h[s][[1, 1]] = 3,
	
h[s] is not evaluated since Set[] is HoldFirst.  If it weren't HoldFirst
then things like a = b; a = 3 would result in setting the value of b to 3.
Clearly you don't want this sort of thing to occur.

If I may guess at what is intended, the following does work:

In[11]:= h[s_]={{(1-s)/(1+s+s^2)}}

	     1 - s
Out[11]= {{----------}}
		    2
	   1 + s + s

In[12]:= a = h[s]

	     1 - s
Out[12]= {{----------}}
		    2
	   1 + s + s

In[13]:= a[[1,1]] = 3

Out[13]= 3


From xinwei@jessica.stanford.edu Tue May 29 17:16:16 1990
Received: from Jessica.Stanford.EDU by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03136; Tue, 29 May 90 17:16:14 -0500
Received: from LOCALHOST by jessica.stanford.edu (5.59/25-eef) id AA25415; Tue, 29 May 90 15:16:07 PDT
Message-Id: <9005292216.AA25415@jessica.stanford.edu>
To: smithw@mathnx.byu.edu (William V. Smith)
Cc: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: mathematica in the classroom 
In-Reply-To: Your message of Mon, 22 May 89 14:42:12 -0700.
             <9005230447.AA22151@yoda.ncsa.uiuc.edu> 
Date: Tue, 29 May 90 15:16:05 -0700
From: xinwei@jessica.stanford.edu
Status: RO

I'm working on a set of illustrations & exploratory
workspaces in the form of Mathematica notebooks
for topics in calculus, ordinary differential equations,
complex analysis, and especially differential geometry.

Suggestions for topics are most welcome.  I'd like to
try some of these on guinea pig students next year.

Sha Xin Wei
Math Dept. & Academic Information Resources
Stanford

From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May 29 21:15:55 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03630; Tue, 29 May 90 21:15:54 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA13421; Tue, 29 May 90 21:12:23 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03478; Tue, 29 May 90 20:27:36 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03474; Tue, 29 May 90 20:27:34 -0500
Message-Id: <9005300127.AA03474@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: mathematica in the classroom 
Date: Tue, 29 May 90 15:16:05 -0700
From: xinwei@jessica.stanford.edu
Status: RO

I'm working on a set of illustrations & exploratory
workspaces in the form of Mathematica notebooks
for topics in calculus, ordinary differential equations,
complex analysis, and especially differential geometry.

Suggestions for topics are most welcome.  I'd like to
try some of these on guinea pig students next year.

Sha Xin Wei
Math Dept. & Academic Information Resources
Stanford


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May 29 22:28:40 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03785; Tue, 29 May 90 22:28:39 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15492; Tue, 29 May 90 22:25:09 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03471; Tue, 29 May 90 20:26:34 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03467; Tue, 29 May 90 20:26:32 -0500
Message-Id: <9005300126.AA03467@yoda.ncsa.uiuc.edu>
Date: Tue, 29 May 90 17:17:11 MDT
From: smithw@mathnx.byu.edu (William V. Smith)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Limits in NeXT Mathematica
Status: RO

I have the recent fix for Mathematica on the NeXT, but it still seems
to have the problem with limits.  With

Limit[Cos[1/x^2]^(x^4),x->Infinity]

I get "bus error" from a remote login session and it just seems to
go on forever if you run it from the console.

>From xinwei@jessica.stanford.edu Tue May 29 17:16:16 1990
Received: from Jessica.Stanford.EDU by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03136; Tue, 29 May 90 17:16:14 -0500
Received: from LOCALHOST by jessica.stanford.edu (5.59/25-eef) id AA25415; Tue, 29 May 90 15:16:07 PDT
Message-Id: <9005292216.AA25415@jessica.stanford.edu>
To: smithw@mathnx.byu.edu (William V. Smith)
Cc: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: mathematica in the classroom 
In-Reply-To: Your message of Mon, 22 May 89 14:42:12 -0700.
             <9005230447.AA22151@yoda.ncsa.uiuc.edu> 
Date: Tue, 29 May 90 15:16:05 -0700
From: xinwei@jessica.stanford.edu
Status: RO

I'm working on a set of illustrations & exploratory
workspaces in the form of Mathematica notebooks
for topics in calculus, ordinary differential equations,
complex analysis, and especially differential geometry.

Suggestions for topics are most welcome.  I'd like to
try some of these on guinea pig students next year.

Sha Xin Wei
Math Dept. & Academic Information Resources
Stanford


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue May 29 21:53:40 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA03690; Tue, 29 May 90 21:53:39 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14600; Tue, 29 May 90 21:50:08 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03464; Tue, 29 May 90 20:25:14 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA03460; Tue, 29 May 90 20:25:12 -0500
Message-Id: <9005300125.AA03460@yoda.ncsa.uiuc.edu>
From: keiper@wri.UUCP
Date: Tue, 29 May 90 19:13:21 CDT
Subject: Re:  Overflow and Underflow
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO


In[1]:= ?Overflow 
Overflow[] is the result of a numerical calculation whose result is too large
   to represent.
 
In[1]:= ?Underflow
Underflow[] is the result of a numerical calculation whose result is too small
   to represent.

These "functions" were not documented in the manual because it is intended
that in the future Mathematica will be able to deal with truly arbitrary
sized numbers.  The fact that they were not documented on-line is a bug.
As can be seen above they are docmented in the internal development version
and will also be documented in the next release;  Mathematica is not yet
able to deal with numbers on the order of 10.^1000000000.

Jerry Keiper
Wolfram Research, Inc.
keiper@wri.com


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed May 30 14:57:13 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA05033; Wed, 30 May 90 14:57:13 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA16181; Wed, 30 May 90 14:53:42 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04944; Wed, 30 May 90 13:49:48 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04940; Wed, 30 May 90 13:49:47 -0500
Message-Id: <9005301849.AA04940@yoda.ncsa.uiuc.edu>
Date: Wed, 30 May 90 13:30:14 EDT
From: Jim_Wendel@ub.cc.umich.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

I ran into a TeX problem (on a Mac IIci using Textures.)  I typed in the
As far as I can tell I gave the input exactly as in In[3].
stuff on pg 158, executed TeXForm[%] and got almost the output specified,
but when I typeset it in either AMS-TeX format or Plain TeX the denomi-
nator factors 9801 and 396^(4n) blended to produce 9801396^(4n).  The
difference between my output and the textbook's lay in the order of the
two factors (4n)! and 1103+26390n.


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed May 30 16:03:53 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA05107; Wed, 30 May 90 16:03:52 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA17666; Wed, 30 May 90 16:00:18 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04952; Wed, 30 May 90 13:50:24 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04948; Wed, 30 May 90 13:50:23 -0500
Message-Id: <9005301850.AA04948@yoda.ncsa.uiuc.edu>
Date: Wed, 30 May 90 10:52:10 PDT
From: kenward@mdivax1.UUCP (Gary Kenward)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Symbolic derivatives and function definition
Status: RO

I have a symbolic function of two variables, f[x,y], which
is differentiable (f'[x,y] exists, and can be generated by Mathematica).

What I would like to be able to do is assigne the symbolic result of
D[f[x,y], x] to a new function, df [x,y], and be able to use df directly.

So far the best solution I have been able to come up with is (I think this
works):

df[x_, y_] := D[f[u, v], u] /. u -> x /. v -> y

I suspect that this is all wrong. In particular, it seems to me that each
evaluation of df results in D[f . . .] being re-evaluated.

Obviously, I am not a Mathematica expert. I am just learning, and I need
a solution as soon as possible.

Can anyone provide a solution?

Gary W. Kenward
Mobile Data International
Richmond B.C.



From mathgroup-adm@yoda.ncsa.uiuc.edu Wed May 30 17:03:35 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA05191; Wed, 30 May 90 17:03:34 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA18720; Wed, 30 May 90 16:59:59 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04975; Wed, 30 May 90 13:59:00 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04971; Wed, 30 May 90 13:58:58 -0500
Message-Id: <9005301858.AA04971@yoda.ncsa.uiuc.edu>
Date: Wed, 30 May 90 14:12:07 +0300
From: pjanhune@finsun.CSC.FI
To: mathgroup@ncsa.uiuc.edu
Status: RO

[The files below are found in /Symbolic/Mathematica/Packages/JANHUNEN directory
on the anonymous ftp server. --- smc]

Hello!
         I sent four Mathematica files to the /Symbolics/New directory
         on the FTP server. The files are DeltaTheta.m, DSubst.m, 
         FortranDef.m and FortranDefDemo.m. They implement the Dirac
         Delta and Heaviside Theta functions, as well as variable and
         function substitutions in (e.g.) differential equations. The
         file FortranDef.m contains a fully automated method to generate,
         compile and call a Fortran program from an arbitrary Mathematica
         expression containing elementary functions. This can tremendously
         speed up e.g. the plotting of complicated expressions. The file
         FortranDefDemo.m contains examples on this.

         The files have been written on a MacII using a remote kernel 
         running in a UNIX machine. The files should be readable without
         problem on a MacII Mathematica, but if you have trouble, please
         inform me, and I try to make an unformatted version of them.

                             Pekka Janhunen
                             Finnish Meteorological Institute
                             Geophysics Dept.
                             pjanhune@finsun.csc.fi


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed May 30 17:05:54 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA05197; Wed, 30 May 90 17:05:53 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA18784; Wed, 30 May 90 17:02:24 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04934; Wed, 30 May 90 13:48:41 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04930; Wed, 30 May 90 13:48:39 -0500
Message-Id: <9005301848.AA04930@yoda.ncsa.uiuc.edu>
Subject: Sqrt...
To: mathgroup@yoda.ncsa.uiuc.edu (mathgroup for mathematica)
Date: Wed, 30 May 90 10:29:23 PDT
From: Steven Warwick <sdw@hpsadsdw.hp.com>
Status: RO

An interesting challange for someone on the group might be to find a way
to expand expressions which contain multiple roots of squares in such
a way as to produce a list of the unique solutions i.e.:

NewExpand[ ( Sqrt[a^2] + 1 ) / ( Sqrt[b^2] +1 ) ] 

gives:

     { (a+1)/(b+1) , (-a+1)/(b+1) , (a+1)/(-b+1) , (-a+1)/(-b+1) }


preferrably, NewExpand would deal with any function which has
multiple values as returned as a list.  

this behaviour is different than normal mathematica since lists in
expressions are  dealt with linearly:

{ a,b} + {c,d} results in   {a+b,c+d}

NewExpand effectivly produces the behaviour:

{ a,b} + {c,d} results in   {a+c,a+d,b+c,b+d}

this behaviour seems correct for the Sqrt case, but is probably not
correct in general. One solution is to define something called a
"combinatorial list" as opposed to the Mathematica "distributed list"
and functions which return multiple values actually return the
combinatorial list, allowing both behaviours in the same expression. 



On another topic, it seems like the traffic in this mailgroup is big
enough to warrent switching over the the notes system. I know there
were complaints from those in sci.math.symbolic about so much
Mathematica traffic, so perhaps it be best to create a new group. How
about it?



 
--
Steven Warwick

Hewlett-Packard
sdw@hpsad




From mathgroup-adm@yoda.ncsa.uiuc.edu Wed May 30 17:57:56 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA05302; Wed, 30 May 90 17:57:55 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA19666; Wed, 30 May 90 17:54:26 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04920; Wed, 30 May 90 13:47:41 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA04916; Wed, 30 May 90 13:47:39 -0500
Message-Id: <9005301847.AA04916@yoda.ncsa.uiuc.edu>
Date: Wed, 30 May 90 10:13:02 CDT
From: drdan@src.honeywell.com (Dan Johnson)
To: mathgroup@WRI.UUCP
Subject: Which[] behaviour
Status: RO


There is a 'foolish inconsistency' between the behaviours
of If[] and Which[] which can be worked around, but is annoying.
I should note that this behaviour is documented.

If we define the functionally identical functions
	f[z_] := Which[z<3,3, z>=3,4]
and
	g[z_] := If[z<3,3, If[z>=3,4]]

and then evaluate...

	Mathematica (sun3.68881) 1.2 (November 6, 1989) [With pre-loaded data]
	by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
	   S. Omohundro, D. Ballman and J. Keiper
	with I. Rivin and D. Withoff
	Copyright 1988,1989 Wolfram Research Inc.
	 -- Tektronix graphics initialized --
	
	In[1]:= f[z_] := Which[z<3,3, z>=3,4]
	
	In[2]:= g[z_] := If[z<3,3, If[z>=3,4]]
	
	In[3]:= f[zz]
	
	In[4]:= g[zz]
	
	Out[4]= If[zz < 3, 3, If[zz >= 3, 4]]

What is happening is that If[] leaves ambiguous expressions unevaluated,
while Which[] returns Null. This is a problem when using Which[]
to define functions to be used elsewhere, i.e.

	In[5]:= NIntegrate[f[zz],{zz,0,5}]
	
	NIntegrate::notnum: Integrand Null is not numerical at {4.90072}.
	
	Out[5]= NIntegrate[f[zz], {zz, 0, 5}]
	
	In[6]:= NIntegrate[g[zz],{zz,0,4}]
	
	Out[6]= 13.0008

where the integration fails because Which[] evaluates the general
expression.

I would prefer to use Which[] rather than nested If[]'s because
I often use up to 10 different conditions. Is there a way to turn
off the behaviour in Which[] and get the same effect as in If[]?


Daniel Johnson  MN65-2500	     (612) 782-7427
Honeywell Systems & Research Center  drdan@SRC.Honeywell.COM  (internet)
3660 Technology Drive                
Mpls, MN  55418                      


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu May 31 15:57:06 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA06638; Thu, 31 May 90 15:57:05 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA06300; Thu, 31 May 90 15:53:52 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA06611; Thu, 31 May 90 15:21:17 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA06607; Thu, 31 May 90 15:21:15 -0500
Message-Id: <9005312021.AA06607@yoda.ncsa.uiuc.edu>
From: macg@SLCS.SLB.COM (Bill Macgregor)
Date: Wed, 23 May 90 15:18:05 CDT
To: stevec@yoda.ncsa.uiuc.edu
Subject: position open
Status: RO

[Here is a job posting of interest to Mathematica users - smc]

Position: Research Scientist

Immediate opening for someone to take on responsibility for the code
generation component of the system described below (implemented in
Mathematica); currently we are especially interested in code generation for
parallel architectures such as the Connection Machine (we have one).  Our
preferred target languages are at the level of CM-Fortran rather than assembly
or machine language, but special-purpose optimizations may require lower-level
code generation.  Longer term directions could include adding more knowledge
about some of: different mathematical modeling domains, new algorithms,
numerical analysis, performance prediction.  Prefer candidate with PhD and
background in numerical algorithms applied to engineering problems.

Send resume or contact for more details:

Elaine Kant
Schlumberger Laboratory for Computer Science
P.O. Box 200015, Austin, Texas 78720-0015 USA
512-331-3737
kant@slcs.slb.com 


Program: Design Environments Group
Project: Synthesis of Finite Difference Programs
	
The Sinapse system synthesizes mathematical modeling programs from descriptions
of equations and algorithm choices.  The goal is to help engineers minimize
the time to design, implement, and evaluate mathematical models.  Our initial
focus is transforming models based on partial differential equations into
efficient numerical codes in Fortran and C for multiple target architectures
(including the Connection Machine).  The system is implemented in Mathematica.
An engineer can first work on symbolic formulations of problems in Mathematica
and then have Sinapse generate a program embodying a numerical solution.  To
date, Sinapse has synthesized a modest number of programs, most of which are
wave propagation programs that use finite difference techniques.  The system
can also synthesize a program that solves a deconblondie.volution problem with linear
Bayesian inversion via Fourier transforms.  Program specifications in the
range of 10 to 50 lines generate target code of 50 to 1600 lines in time
ranging from 10 seconds to several minutes.

In a sample session, Sinapse helps the user express governing stress-strain
equations in Mathematica, then analyzes and discretizes the equations to
produce an explicit time-stepping solution code in Fortran.  This includes
transformation of partial differential equations into finite difference
statements, and the selection of finite difference operators with staggering
of the grids.  Sinapse has domain-specific knowledge about absorbing,
reflecting, and free-surface boundary conditions for wave propagation.  The
synthesis methods handle arbitrary dimensionality.  Graphical results based on
runs of the synthesized code have been displayed on a Silicon Graphics
workstation to validate the accuracy of the generated code and to demonstrate
the type of visualization available to modelers.



Corporate Snapshot:

The Schlumberger Laboratory for Computer Science (SLCS) is located in Austin,
Texas.  SLCS is the corporate-wide computer science research center for
Schlumberger, an international corporation established over six decades ago.
Schlumberger now has over 50,000 employees and a yearly revenue of six billion
dollars.  Schlumberger's Oil Field Services businesses sell products and
services in the areas of oil and gas exploration and development.  The
Measurement & Systems businesses include CAD/CAM, automated testing equipment,
gas and water metering, and electronic transactions.  

The primary goals of SLCS are to enhance quality, creativity, and productivity
in software development.  Total staff is now about 40.  This includes people
in services related to software practice, and in research on software reuse,
design environments, knowledge systems, and modeling and simulation.








From mathgroup-adm@yoda.ncsa.uiuc.edu Thu May 31 20:06:31 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA06860; Thu, 31 May 90 20:06:30 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA21907; Thu, 31 May 90 20:03:32 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA06803; Thu, 31 May 90 19:00:36 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA06799; Thu, 31 May 90 19:00:35 -0500
Message-Id: <9006010000.AA06799@yoda.ncsa.uiuc.edu>
From: keiper@wri.UUCP
Date: Thu, 31 May 90 14:28:27 CDT
Subject: Re:  Which[] behaviour
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO



There are actually two bugs in the problem NIntegrate[Which[...], ...],
both of which have been fixed in the current development version.  These
fixes will appear in the next release.  The first bug has to do with
NIntegrate: although it is claimed to be HoldAll, it isn't really so
the Which[] gets evaluated to Null.  The work around for this problem is
to make the integrand not simply Which[...], but rather
Which[...] /; NumberQ[x] where x is the variable of integration.  This
prevents the integrand from being evaluated until x is actually a number.

The other bug  is a design bug wrt Which[].  In the future Which[] will
return unevaluated if none of the conditions are true.  The current
behavior will still be possible by explicitly giving a true condition at
the end: Which[..., True, Null].



From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun  1 12:06:09 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA07937; Fri, 1 Jun 90 12:06:09 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA07913; Fri, 1 Jun 90 12:03:10 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA07859; Fri, 1 Jun 90 10:54:29 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA07855; Fri, 1 Jun 90 10:54:28 -0500
Message-Id: <9006011554.AA07855@yoda.ncsa.uiuc.edu>
From: macg@SLCS.SLB.COM (Bill Macgregor)
Date: Fri, 1 Jun 90 09:32:57 CDT
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: pristine example--and a lesson
Status: RO

(For me; you may already know it.  All of my lessons are learned
the hard way, of course.  On the 1-10 importance scale, this one
rates a 9, I'd say.)  

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

Consider this script (it's very simple):

In[1]:= f[x_] := g[x] /; flag;

In[2]:= e = f[x] + g[x]

Out[2]= f[x] + g[x]

In[3]:= e

Out[3]= f[x] + g[x]

In[4]:= flag = True

Out[4]= True

In[5]:= e

Out[5]= f[x] + g[x]

In[6]:= Update[]

In[7]:= e

Out[7]= 2 g[x]


  - Bill


----- End Included Message -----



From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun  1 12:58:54 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA08019; Fri, 1 Jun 90 12:58:52 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA08852; Fri, 1 Jun 90 12:55:56 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA07854; Fri, 1 Jun 90 10:54:21 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA07850; Fri, 1 Jun 90 10:54:20 -0500
Message-Id: <9006011554.AA07850@yoda.ncsa.uiuc.edu>
From: keiper@wri.UUCP
Date: Fri, 1 Jun 90 09:15:44 CDT
To: kenward@mdivax1.UUCP
Subject: Re:  Symbolic derivatives and function definition
Status: RO


There may be a better way to do it, but here is one way:
first, evaluate the symbolic derivative once:

	foo = D[f[u, v], u]

this will be an expression involving u and v.  Now define the function you
really want:

	df[x_, y_] := foo /. {u -> x, v -> y}

Note that the definition of foo uses "=" (evaluate this now), while the
definition of df[] uses ":=" (delay the evaluation until df[x,y] is actually
asked for.)

Note that in many cases you could actually just do:

	df[x_, y_] = D[f[x, y], x]

but this method is not quit as flexible.

Jerry Keiper
Wolfram Research, Inc.
keiper@wri.com


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun  1 14:01:14 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA08158; Fri, 1 Jun 90 14:01:13 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA10119; Fri, 1 Jun 90 13:58:16 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA07849; Fri, 1 Jun 90 10:54:07 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA07845; Fri, 1 Jun 90 10:54:05 -0500
Message-Id: <9006011554.AA07845@yoda.ncsa.uiuc.edu>
Date:     Thu, 31 May 90 20:57 CDT
From: SAF8613@tamstar.bitnet
Subject:  Sqrt[x^2] and predicates
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO



    I'm grateful to David Withoff of WRI for pointing out the
ReIm.m package, and also the "^=" operator, which solves
protection problems of the type I mentioned in my earlier
message.  Also, I see that Sec. 8.3 of Roman Maeder's book is
relevant to the sort of problem we're discussing.

    I appreciate the importance of programming and packages, but
I think that the main points of my message are still valid:

    1.  Evaluating Sqrt[x^2] as x when x is, or might be,
negative is just flat wrong.   [As is assuming that a function is
continuous because there is no information to the contrary (and
confusing "continuous" with "bounded" in documenting that
behavior); as is evaluating Integrate[1/x^2, {x,-1,1}] as -2
instead of +Infinity.]

    2.  In Mathematica and its documentation, the treatment of
predicates and relations seems needlessly inconsistent with (and
much inferior to) that of non-Boolean-valued expressions and
functions.  It is hard to see how to define new ones, and those
that exist are few, weak, and have poorly documented syntax.
(Look up "Inequality" and "Greater" in the index.)  To earn the
title "System for Doing Mathematics by Computer", Mathematica
should routinely be able to represent, and reason with,
mathematical assertions such as "x is positive", "x is real", "x
is greater than y".  One would think that Mathematica's superb
pattern-matching capability could do wonders with inequalities.

    Example:  To tell the package ReIm.m that "x is imaginary",
we seem to have to specify the real and imaginary parts of x
(using the FUNCTIONS Re and Im) instead of using a mathematically
natural syntax like "Imag[x]" or "ImagQ[x] ^= True".

    Example:  The correct simplification rule for the square root
is

    Sqrt[x_^2] := x  /; Positive[x]
    Sqrt[x_^2] := -x /; Negative[x]

[This is what Maeder (op.cit.) does to strengthen the absolute
value function.  Incidentally, Abs[] already has the correct
default behavior:  it doesn't try to guess the sign when it
doesn't know it.]  The problem is that considerably more
programming needs to be done before these rules will accomplish
much, because Positive[] and Negative[] are ignorant of their own
basic properties:

In[1]:= Positive[x] ^= True

Out[1]= True

In[2]:= Positive[y] ^= False

Out[2]= False

In[3]:= Negative[x]

Out[3]= Negative[x]

In[4]:= Positive[x-y]

Out[4]= Positive[x - y]

In[5]:= Expand[%]

Out[5]= Positive[x - y]

In[6]:= Quit


                                    Steve Fulling



From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun  1 14:01:45 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA08164; Fri, 1 Jun 90 14:01:44 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA10126; Fri, 1 Jun 90 13:58:47 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA07843; Fri, 1 Jun 90 10:53:31 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA07839; Fri, 1 Jun 90 10:53:29 -0500
Message-Id: <9006011553.AA07839@yoda.ncsa.uiuc.edu>
Date:     Thu, 31 May 90 20:55 CDT
From: SAF8613@tamstar.bitnet
Subject:  Consolidating the messages
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO



>On another topic, it seems like the traffic in this mailgroup is big
>enough to warrent switching over the the notes system. I know there
>were complaints from those in sci.math.symbolic about so much
>Mathematica traffic, so perhaps it be best to create a new group. How
>about it?
>
>
>Steven Warwick

    Dealing with 5 or 10 messages a day (each with its own
header, etc.) has become a nuisance.  I would prefer the system
exemplified by TeXhax Digest, where the moderator collects the
messages and sends them out as one large file every 3 days (say),
or when the accumulation has reached (say) 20 kilobytes,
whichever happens first.

    This would slow down responses, but copies of replies to
specific queries should be sent directly to the original enquirer
in any event.

    There may be people with email who don't have access to
sci.math.*, so that option would cut them out.

                                   Steve Fulling






From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun  1 16:35:37 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA08407; Fri, 1 Jun 90 16:35:36 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA13729; Fri, 1 Jun 90 16:32:37 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA08277; Fri, 1 Jun 90 14:48:00 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA08273; Fri, 1 Jun 90 14:47:58 -0500
Message-Id: <9006011947.AA08273@yoda.ncsa.uiuc.edu>
Date: Fri, 1 Jun 90 15:39:55 EDT
From: wang@pennmess.physics.upenn.edu ( Huangxin Wang)
To: mathgroup-adm@yoda.ncsa.uiuc.edu
Subject: Re:  Symbolic derivatives and function definition
Status: RO


My way of doing it:

	df[x_, y_] := Release[D[f[x,y], x]]

It work well for me.  I believe if you simply do:

	df[x_, y_] = D[f[x, y], x]

math will complain.

		Huangxin Wang of University of Pennsylvania


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun  1 17:14:03 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA08478; Fri, 1 Jun 90 17:14:02 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14464; Fri, 1 Jun 90 17:11:06 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA08282; Fri, 1 Jun 90 14:48:08 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA08278; Fri, 1 Jun 90 14:48:06 -0500
Message-Id: <9006011948.AA08278@yoda.ncsa.uiuc.edu>
Date: Fri, 1 Jun 90 15:49:35 EDT
From: wang@pennmess.physics.upenn.edu ( Huangxin Wang)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Help with roots
Status: RO

Maybe the answer is so obvious, but can anyone point out to me that how to
assign one of the root to a certain variable, say,
	FindRoot[ {x+y==0, x^3-y^2+1==0}, {x,1}, {y,1}]
I want to assign the solution of x to variable z.  Similarily,
	Solve[ x^3+x+3 == 0, x}
how to assign root number 3 to z?


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jun  4 10:17:55 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA00664; Mon, 4 Jun 90 10:17:54 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA20045; Mon, 4 Jun 90 10:14:53 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA08282; Fri, 1 Jun 90 14:48:08 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA08278; Fri, 1 Jun 90 14:48:06 -0500
Message-Id: <9006011948.AA08278@yoda.ncsa.uiuc.edu>
Date: Fri, 1 Jun 90 15:49:35 EDT
From: wang@pennmess.physics.upenn.edu ( Huangxin Wang)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Help with roots
Status: RO

Maybe the answer is so obvious, but can anyone point out to me that how to
assign one of the root to a certain variable, say,
	FindRoot[ {x+y==0, x^3-y^2+1==0}, {x,1}, {y,1}]
I want to assign the solution of x to variable z.  Similarily,
	Solve[ x^3+x+3 == 0, x}
how to assign root number 3 to z?


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jun  4 12:15:58 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA01034; Mon, 4 Jun 90 12:15:57 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA23254; Mon, 4 Jun 90 12:13:01 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA00849; Mon, 4 Jun 90 11:15:12 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA00845; Mon, 4 Jun 90 11:15:10 -0500
Message-Id: <9006041615.AA00845@yoda.ncsa.uiuc.edu>
From: Alfy_N_Riddle@cup.portal.com
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Apply&Map
Date: Sat,  2-Jun-90 02:12:43 PDT
Status: RO

Mathematica Users:
  Rather often I have had the need to apply a function, which had several
arguments, to each row of a list. I will not mention the kludges I used
to use to do this, but a friend helped me find what a solution which now
looks all TOO obvious. It may be useful to others.

In[1]:= fn @@ #& /@ {{1,2},{3,4}}

Out[1] = {fn[1,2], fn[3,4]}

This code maps a pure function over a matrix, and then applies the desired
function, fn, to each row. If your function uses options you can use:

In[2]:= fn[ ##, opt1->2 ] @@ #& /@ {{1,2},{3,4}}

Out[2]= {fn[1,2,opt1->2], fn[3,4,opt1->2]}

Best wishes,
  Alfy Riddle (alfy@cup.portal.com)


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jun  4 13:14:08 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA01120; Mon, 4 Jun 90 13:14:07 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA24371; Mon, 4 Jun 90 13:11:13 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA00859; Mon, 4 Jun 90 11:15:26 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA00855; Mon, 4 Jun 90 11:15:25 -0500
Message-Id: <9006041615.AA00855@yoda.ncsa.uiuc.edu>
Date: Fri, 1 Jun 90 19:30:29 PDT
From: marchett@cod.nosc.mil (David J. Marchette)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Integrating Gaussians
Status: RO


Here's a simple integration question:

I would like to integrate Exp[-x^2/(2 sigma^2)] from -Infinity to Infinity.
If I do the obvious:

Integrate[Exp[-x^2/(2 sigma^2)],{x,-Infinity,Infinity}]

I get an expression involving the error function Erf and Infinity.
This is obviously because Mathematica doesn't know what sigma is.  How do I 
tell Mathematica that sigma > 0 (and finite)? Of course, I could just tell 
Mathematica how to do the integral, but I want to do some integrations where 
things like the above occur in many variations.  (By the way, I'm using 1.2 
on a 386 and a Mac II).

Any suggestions?

Thanks in advance,

David Marchette
Naval Ocean Systems Center
San Diego, Ca
<marchett@nosc.mil>


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jun  4 14:24:27 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA01283; Mon, 4 Jun 90 14:24:26 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA25913; Mon, 4 Jun 90 14:21:31 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA00854; Mon, 4 Jun 90 11:15:20 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA00850; Mon, 4 Jun 90 11:15:18 -0500
Message-Id: <9006041615.AA00850@yoda.ncsa.uiuc.edu>
Date: Fri, 1 Jun 90 12:59:28 PDT
From: ghe@nucthy.PHYSICS.ORST.EDU (Guangliang He)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Consolidating the messages
Status: RO

[In your message entitled "Consolidating the messages", on May 31, you write:]
>
>    Dealing with 5 or 10 messages a day (each with its own
>header, etc.) has become a nuisance.  I would prefer the system
>exemplified by TeXhax Digest, where the moderator collects the
>messages and sends them out as one large file every 3 days (say),
>or when the accumulation has reached (say) 20 kilobytes,
>whichever happens first.
>
>    This would slow down responses, but copies of replies to
>specific queries should be sent directly to the original enquirer
>in any event.
>
>    There may be people with email who don't have access to
>sci.math.*, so that option would cut them out.
>
>                                   Steve Fulling
>

Personally, I don't like to read those Digest type things. It forces me to
(at least) scan over all the messages before I could reach the message I
want to read. I'm much happier to deal with individual messages. Of course,
creating a new news group is a much better idea. But as always, it's only my
own opinion. 

-- 
                            Guangliang He

                            ghe@PHYSICS.ORST.EDU
                            hegl@ORSTVM.BITNET



From jacobson@cello.hpl.hp.com Mon Jun  4 14:45:35 1990
Received: from hplms2.hpl.hp.com by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA01345; Mon, 4 Jun 90 14:45:34 -0500
Received: from cello.hpl.hp.com by hplms2.hpl.hp.com with SMTP
	(15.11.1.3/15.5+IOS 3.20) id AA27732; Mon, 4 Jun 90 12:46:05 pdt
Received: from localhost by cello.HPL.HP.COM; Mon, 4 Jun 90 12:45:31 pdt
To: stevec@yoda.ncsa.uiuc.edu
Subject: newsgroup vs. digest vs. status quo
Date: Mon, 04 Jun 90 12:45:28 PDT
Message-Id: <2068.644528728@cello>
From: jacobson@cello.hpl.hp.com
Status: RO

I'm against making the mathgroup into a newsgroup.  I never get around
to looking at news.  Things falling into my mailbox get seen.  If
people are bothered with the number of things, then a digest is the
answer (in my opinion).  But send out the digest every day or every
other day at the most.  Three days would slow down interaction too
much.

  -- David

From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jun  4 14:11:46 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA01247; Mon, 4 Jun 90 14:11:45 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA25644; Mon, 4 Jun 90 14:08:46 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA00865; Mon, 4 Jun 90 11:15:45 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA00861; Mon, 4 Jun 90 11:15:44 -0500
Message-Id: <9006041615.AA00861@yoda.ncsa.uiuc.edu>
From: keiper@wri.UUCP
Date: Mon, 4 Jun 90 10:22:33 CDT
To: mathgroup@ncsa.uiuc.edu
Subject: Re:  Help with roots
Status: RO


Results of FindRoot[] and Solve[] are given as rules because in multi-variable
cases we need to be able to easily associate the root with the various
variables.  This is done with ReplaceAll[] (i.e. "/.")

In[1]:= FindRoot[ {x+y==0, x^3-y^2+1==0}, {x,-1}, {y,1}]

Out[1]= {x -> -0.754878, y -> 0.754878} 

In[2]:= z = x /. %

Out[2]= -0.754878

In[3]:= Solve[ x^3+x+3 == 0, x];

In[4]:= z = x /. %[[3]]

                    -1                 3    Sqrt[247] 1/3
        -(----------------------- + (-(-) + ---------)   )
               3    Sqrt[247] 1/3      2    6 Sqrt[3]
          3 (-(-) + ---------)
               2    6 Sqrt[3]
Out[4]= -------------------------------------------------- - 
                                2
 
                          1                 3    Sqrt[247] 1/3
     Sqrt[-3] (----------------------- + (-(-) + ---------)   )
                    3    Sqrt[247] 1/3      2    6 Sqrt[3]
               3 (-(-) + ---------)
                    2    6 Sqrt[3]
>    ----------------------------------------------------------
                                 2


Jerry B. Keiper
Wolfram Research, Inc.
keiper@wri.com


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jun  4 15:28:08 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP
	(5.61+/IDA-1.2.8) id AA01420; Mon, 4 Jun 90 15:28:07 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA26781; Mon, 4 Jun 90 15:09:25 CDT
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01157; Mon, 4 Jun 90 13:18:28 -0500
Received: by yoda.ncsa.uiuc.edu
	(5.61+/IDA-1.2.8) id AA01153; Mon, 4 Jun 90 13:18:26 -0500
Message-Id: <9006041818.AA01153@yoda.ncsa.uiuc.edu>
Date: Mon, 4 Jun 90 13:14:54 CDT
From: Elaine Kant <kant@SLCS.SLB.COM>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Apply&Map
Status: RO


Alfy's message made me realize that other users might be interested in this
generalization of the Map function, which applies a function of n arguments
to the corresponding elements of n lists (for any n).


MapN::usage = "MapN[function_, lists__] applies function to nth elements of
lists, one at a time, returning list of results."

MapN[Fn_, Lists__] := 
	Map[Apply[Fn, #]&, Transpose[{Lists}]];



From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Jun  6 23:17:27 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA01220
  (5.62+/IDA-1.3.1 for stevec); Wed, 6 Jun 90 23:17:26 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA11196; Wed, 6 Jun 90 23:14:56 CDT
Received: by yoda.ncsa.uiuc.edu id AA01051
  (5.62+/IDA-1.3.1 for ); Wed, 6 Jun 90 22:51:55 -0500
Received: by yoda.ncsa.uiuc.edu id AA01046
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 6 Jun 90 22:51:54 -0500
Message-Id: <9006070351.AA01046@yoda.ncsa.uiuc.edu>
From: wri!keiper
Date: Mon, 4 Jun 90 14:23:53 CDT
Subject: Re:  Integrating Gaussians
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO


One way to trick Mathematica into evaluating Erf[] at infinities when the
sign of the argument is unknown is to do the following:

In[1]:= Unprotect[Erf]

Out[1]= {Erf}

In[2]:= Erf[DirectedInfinity[1] * ___] = 1

Out[2]= 1
 
In[3]:= Erf[DirectedInfinity[-1] * ___] = -1

Out[3]= -1

In[4]:= Integrate[Exp[-x^2/(2 sigma^2)],{x,-Infinity,Infinity}]

Out[4]= Sqrt[2] Sqrt[Pi] sigma

It will still be smart enough to figure out what to do with signed numbers:

In[5]:= Erf[DirectedInfinity[1] * (-2)]

Out[5]= -1

but if you have in mind a negative value for sigma it will give the wrong
answer.


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun  7 01:19:59 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA01971
  (5.62+/IDA-1.3.1 for stevec); Thu, 7 Jun 90 01:19:58 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14629; Thu, 7 Jun 90 01:17:26 CDT
Received: by yoda.ncsa.uiuc.edu id AA01130
  (5.62+/IDA-1.3.1 for ); Wed, 6 Jun 90 22:58:24 -0500
Received: by yoda.ncsa.uiuc.edu id AA01126
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 6 Jun 90 22:58:23 -0500
Message-Id: <9006070358.AA01126@yoda.ncsa.uiuc.edu>
Date: Mon, 4 Jun 90 15:03:26 EDT
From: Jim_Wendel@ub.cc.umich.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Duplicate mailings
Status: RO

[My computer went down due to air conditioning problems.  This
occured in the middle of some mailings.  When it came back up, it
apparently tried to resent some messages.  I am sorry of some of
you received more than one copy of some messages. --smc ]

I'm getting duplicate transmissions, for instance today two copies of
Help with roots and two of Symbolic derivatives and function definition.
Can the extra be blocked at your end?  Thanks......................Jim Wendel


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun  7 00:57:23 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA01918
  (5.62+/IDA-1.3.1 for stevec); Thu, 7 Jun 90 00:57:21 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA13894; Thu, 7 Jun 90 00:54:50 CDT
Received: by yoda.ncsa.uiuc.edu id AA01051
  (5.62+/IDA-1.3.1 for ); Wed, 6 Jun 90 22:51:55 -0500
Received: by yoda.ncsa.uiuc.edu id AA01046
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 6 Jun 90 22:51:54 -0500
Message-Id: <9006070351.AA01046@yoda.ncsa.uiuc.edu>
From: wri!keiper
Date: Mon, 4 Jun 90 14:23:53 CDT
Subject: Re:  Integrating Gaussians
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO


One way to trick Mathematica into evaluating Erf[] at infinities when the
sign of the argument is unknown is to do the following:

In[1]:= Unprotect[Erf]

Out[1]= {Erf}

In[2]:= Erf[DirectedInfinity[1] * ___] = 1

Out[2]= 1
 
In[3]:= Erf[DirectedInfinity[-1] * ___] = -1

Out[3]= -1

In[4]:= Integrate[Exp[-x^2/(2 sigma^2)],{x,-Infinity,Infinity}]

Out[4]= Sqrt[2] Sqrt[Pi] sigma

It will still be smart enough to figure out what to do with signed numbers:

In[5]:= Erf[DirectedInfinity[1] * (-2)]

Out[5]= -1

but if you have in mind a negative value for sigma it will give the wrong
answer.


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun  7 01:53:18 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA02056
  (5.62+/IDA-1.3.1 for stevec); Thu, 7 Jun 90 01:53:16 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15210; Thu, 7 Jun 90 01:50:47 CDT
Received: by yoda.ncsa.uiuc.edu id AA01193
  (5.62+/IDA-1.3.1 for ); Wed, 6 Jun 90 23:10:01 -0500
Received: by yoda.ncsa.uiuc.edu id AA01189
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 6 Jun 90 23:10:00 -0500
Message-Id: <9006070410.AA01189@yoda.ncsa.uiuc.edu>
Date: Wed, 6 Jun 90 14:56:23 PDT
From: van-bc!kenward%mdivax1 (Gary Kenward)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Superimposed plots
Status: RO

I have a number of curves that I want to show on one plot.
I know that:

	p1=Plot[f[x], {x,xmin,xmax}]

	p2=Plot[g[y], {y,ymin,ymax}]

	Show[p1,p2]

Will combine the two plots, but in the process, to extraneous plots are
displayed. 

Is there an easy way to disable the display of p1 and p2?

Gary W. Kenward
Mobile Data International, Inc
Richmond, BC


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun  7 02:22:37 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA02144
  (5.62+/IDA-1.3.1 for stevec); Thu, 7 Jun 90 02:22:36 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15787; Thu, 7 Jun 90 02:20:05 CDT
Received: by yoda.ncsa.uiuc.edu id AA01139
  (5.62+/IDA-1.3.1 for ); Wed, 6 Jun 90 22:58:52 -0500
Received: by yoda.ncsa.uiuc.edu id AA01135
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 6 Jun 90 22:58:50 -0500
Message-Id: <9006070358.AA01135@yoda.ncsa.uiuc.edu>
Date: Mon, 4 Jun 90 21:58:07 PDT
From: marchett@cod.nosc.mil (David J. Marchette)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Gaussians
Status: RO


Thanks again for all those who responded to my query.  Here is the
simplest solution: (Type the following into mathematica)

f[x_,s_] := Exp[-(x/s)^2/2]/(Sqrt[2 Pi] s)

Unprotect[Erf]
Erf[DirectedInfinity[1] * ___] = 1
Erf[DirectedInfinity[-1] * ___] = -1
Protect[Erf]

Integrate[f[x,sigma],{x,-Infinity,Infinity}]

(* Yay! *)

Integrate[f[x,sigma]^2,{x,-Infinity,Infinity}]

(* Yay! *)

Integrate[f[x,sigma1] f[x,sigma2],{x,-Infinity,Infinity}]

(* Boo! *)

As you can see, if you did the above, it's still hosed.  Now it seems that
I need to tell it that Sqrt[-x] I is -Sqrt[x], and whatall. It is pretty clear
that in order to do what I want, I have to know much more about Mathematica.
Does anyone out there have access to Macsyma or Maple?  Do these also
choke on this?  I'm not saying that Mathematica is wrong, mind you, it's
just not giving me what I want.  Am I too demanding?

By the way, I apologize for not providing Mathematica output.  My email and
Mathematica are on different machines, and the networking is at 1200 baud over
the phone lines (networked into the 50s we call it).  If I come up with any
really complicated questions, I'll figure out a way to get the full session.

David Marchette
marchett@nosc.mil



From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun  7 02:29:56 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA02149
  (5.62+/IDA-1.3.1 for stevec); Thu, 7 Jun 90 02:29:55 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15882; Thu, 7 Jun 90 02:27:27 CDT
Received: by yoda.ncsa.uiuc.edu id AA01199
  (5.62+/IDA-1.3.1 for ); Wed, 6 Jun 90 23:11:04 -0500
Received: by yoda.ncsa.uiuc.edu id AA01195
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 6 Jun 90 23:11:03 -0500
Message-Id: <9006070411.AA01195@yoda.ncsa.uiuc.edu>
Date: Wed, 6 Jun 90 19:24:40 EDT
From: Jim_Wendel@ub.cc.umich.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Two quasi-bugs in Macintosh II Mathematica
Status: RO

Two quasi-bugs in Macintosh II Mathematica:
(1) Plot something that lies wholly in the first quadrant but give option
axes ->{0,0} with the intent of seeing the plot with nice axes; you will
get partial axes, seemingly defined by the ranges of abscissas and ordinates
in the plot.  Example:Plot[x^2,{x,2,5},Axes->{0,0}] produces rather an
ugly display.
(2) DSolve[{y''[x]+y[x]==0,y[0]==1,y'[0]==-1},y[x],x] gives the rule
y[x]->Cos[-x]+Sin[-x].  This is correct, but not as natural and nice to see
as Cos[x]-Sin[x].  At least such is my opinion!

Jim_Wendel@ub.cc.umich.edu



From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Jun  6 23:54:10 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA01246
  (5.62+/IDA-1.3.1 for stevec); Wed, 6 Jun 90 23:54:09 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA11702; Wed, 6 Jun 90 23:51:41 CDT
Received: by yoda.ncsa.uiuc.edu id AA01121
  (5.62+/IDA-1.3.1 for ); Wed, 6 Jun 90 22:57:53 -0500
Received: by yoda.ncsa.uiuc.edu id AA01117
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 6 Jun 90 22:57:52 -0500
Message-Id: <9006070357.AA01117@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: newsgroup vs. digest vs. status quo
Date: Mon, 04 Jun 90 12:45:28 PDT
From: jacobson@cello.hpl.hp.com
Status: RO

I'm against making the mathgroup into a newsgroup.  I never get around
to looking at news.  Things falling into my mailbox get seen.  If
people are bothered with the number of things, then a digest is the
answer (in my opinion).  But send out the digest every day or every
other day at the most.  Three days would slow down interaction too
much.

  -- David


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun  7 03:27:28 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA02371
  (5.62+/IDA-1.3.1 for stevec); Thu, 7 Jun 90 03:27:26 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA16649; Thu, 7 Jun 90 03:24:56 CDT
Received: by yoda.ncsa.uiuc.edu id AA01205
  (5.62+/IDA-1.3.1 for ); Wed, 6 Jun 90 23:11:32 -0500
Received: by yoda.ncsa.uiuc.edu id AA01201
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 6 Jun 90 23:11:29 -0500
Message-Id: <9006070411.AA01201@yoda.ncsa.uiuc.edu>
From: macg@SLCS.SLB.COM (Bill Macgregor)
Date: Tue, 5 Jun 90 16:22:09 CDT
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: debugPoint
Status: RO

This message contains the definition of debugPoint, a small
Mathematica function that we find useful for debugging.  This
function may be obsoleted by new tracing features in Mma 2.0,
but meanwhile... 

The idea for debugPoint was mentioned by Elaine Kant at the 
Mathematica conference in January.  There were enough positive
comments at that meeting to justify distribution to the mailing
list.

How it works
------------

When debugPoint is called, it prints the String passed as its
first argument, and then it prints the values of any expressions 
given as its 2nd or subsequent arguments.  Values are printed
in the form 

    <unevaluated expression> == <evaluated expression>

so you can tell what is being printed.  debugPoint then enters
an interactive evaluation loop.  Any expression presented will
be evaluated and printed in the usual way, except the input
string "go" (without the quotes) which terminates the interaction
sequence.  Example:

  In[4]:= Block[{e},
            e = Expand[(x + y)^4];
            debugPoint["after Set[e, ...]", e];
          ]
  debugPoint:  after Set[e, ...]
            4      3        2  2        3    4
      e == y  + 4 y  x + 6 y  x  + 4 y x  + x
      debugIn:= x + x
      debugOut= 2 x
      debugIn:= go

  In[5]:=

The actions of debugPoint are controlled by two global symbols,
debugPrint and debugPause.  If either is True, debugPoint prints
the label when it is evaluated.  If debugPrint is True, debugPoint
prints the unevaluated == evaluated forms.  If debugPause is
True, debugPoint enters the interactive evaluation loop.

Hint for its use:  if you work with multiple packages, it is a
good idea to always include $Context in the debugPoint argument 
list.

Definitions follow.

  - Bill MacGregor
    Schlumberger Laboratory for Computer Science

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

debugPrint = True;
debugPause = True;

debugPoint::usage = "debugPoint[s_String] prints the label s if 
debugPrint or debugPause is True, and pauses for interactive input 
if debugPause is True.  debugPoint[s_String, x__] also prints the 
unevaluated and evaluated forms of the arguments x, if debugPrint 
is True.";

Off[Hold::argct];

SetAttributes[debugPoint, HoldAll];

debugPoint[s_:"(unlabelled)", x___] := Block[{e},
    If[TrueQ[debugPrint] || TrueQ[debugPause],
        Print["debugPoint:  ", s];
    ];
    If[TrueQ[debugPrint],
        Scan[Print["    ", 
                   StringJoin @@ 
                       Drop[Drop[Characters[ToString[InputForm[#]]] ,5], -1],
                   " == ",
                   Release[#]]&,
            Map[Hold, Hold[x], 1]
        ]
    ];
    If[TrueQ[debugPause],
        While[(e = InputString["    debugIn:= "]) != "go",
            Print["    debugOut= ", ToExpression[e]]
        ]
    ];
];





From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun  7 17:17:41 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA03038
  (5.62+/IDA-1.3.1 for stevec); Thu, 7 Jun 90 17:17:39 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA01037; Thu, 7 Jun 90 17:15:07 CDT
Received: by yoda.ncsa.uiuc.edu id AA02913
  (5.62+/IDA-1.3.1 for ); Thu, 7 Jun 90 15:36:20 -0500
Received: by yoda.ncsa.uiuc.edu id AA02909
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 7 Jun 90 15:36:19 -0500
Message-Id: <9006072036.AA02909@yoda.ncsa.uiuc.edu>
Date: Thu, 7 Jun 90 09:04:02 -0700
From: fateman@ucbarpa.Berkeley.EDU (Richard Fateman)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Integrating Gaussians/ making things easier
Status: RO

You might also see how much slower the system is
after adding such information.  It could be that
Mathematica's clever handling of rules avoids
the introduction of inefficiencies.  Or maybe not..
I suspect that if you put in too many "improvements"
to Mathematica, the whole system would bog down
dreadfully.  Has anyone studied this?
 -- Richard Fateman


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun  7 19:27:18 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA03243
  (5.62+/IDA-1.3.1 for stevec); Thu, 7 Jun 90 19:27:16 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA02992; Thu, 7 Jun 90 19:24:49 CDT
Received: by yoda.ncsa.uiuc.edu id AA02918
  (5.62+/IDA-1.3.1 for ); Thu, 7 Jun 90 15:36:27 -0500
Received: by yoda.ncsa.uiuc.edu id AA02914
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 7 Jun 90 15:36:25 -0500
Message-Id: <9006072036.AA02914@yoda.ncsa.uiuc.edu>
Date: Thu, 7 Jun 90 09:10 PDT
From: JOE@oregon.uoregon.edu
Subject: Does anyone have an apparent fix for this mathematica problem?
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Has anyone else heard of the problem my users describe below? Is a patch
available to make Mathematica on the NeXT yield the same results as 
Mathematica on the Mac?

If you've any queries Fred needs to see or respond to, please CC: him directly
since he's not on the list right now.

Thanks,

Joe St Sauver (JOE@OREGON.UOREGON.EDU or JOE@OREGON)
Statistical Programmer and Consultant
University of Oregon Computing Center

>From:	OREGON::OLNESS       "Fredrick Olness (503) 346-5206 OLNESS@OREGON"  
>To:	OREGON::JOE
>
>Joe,
>
> .... One of Bob Zimmerman's students
>found what appers to be a bug in Mathematica on the Next.
>(Yes, I did  not believe it until I tried it myself.)
>
>I attach two examples of the problem below. 
>(For reference, the Mac gave the correct answer,
>so it is not a subtle error pertaining to branch cuts or 
>anything.)  I think he was going to try it on a different Next 
>machine for comparison.
>
>Thanks,
>
>Fred.
>
>--- example one --
>1% math
>Mathematica 1.2 (August 30, 1989) [With pre-loaded data]
>by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
>   S. Omohundro, D. Ballman and J. Keiper
>with I. Rivin and D. Withoff
>Copyright 1988,1989 Wolfram Research Inc.
>
>In[1]:= InputForm[(b*c*(a + d - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^3)/
>           (4*(a - d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))*
>               (a^2 + 4*b*c - 2*a*d + d^2)^(1/2)) -
>        (b*c*(a +                 d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^3)/
>           (4*(a - d                 - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))*
>               (a^2 + 4*b        *c - 2*a*d + d^2)^(1/2))]
>
>Out[1]//InputForm=
>  (b*c*(a + d - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^3)/
>    (4*(a^2 + 4*b*c - 2*a*d + d^2)^(1/2)*
>      (a - d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))) -
>   (b*c*(a + d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^3)/
>    (4*(a^2 + 4*b*c - 2*a*d + d^2)^(1/2)*
>      (a - d - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2)))
>
>In[2]:= rule={a->1,b->2,c->3,d->4}
>
>Out[2]= {a -> 1, b -> 2, c -> 3, d -> 4}
>
>In[3]:= N[res//.rule]
>
>Out[3]= res
>
>In[4]:= res=%1;
>
>In[5]:= N[res//.rule]
>
>Out[5]= 37.
>
>In[6]:= N[Together[Expand[res]]//.rule]
>
>Out[6]= 47.2208
>
>In[7]:= N[Simplify[res]//.rule]
>
>Out[7]= 47.2208
>
>-- example two follows --
>
>1 % math
>Mathematica 1.2 (August 30, 1989) [With pre-loaded data]
>by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
>   S. Omohundro, D. Ballman and J. Keiper
>with I. Rivin and D. Withoff
>Copyright 1988,1989 Wolfram Research Inc.
>
>In[1]:= InputForm[(b*c*(a + d - (a^2 - 2*a*c + 4*b*c + d^2)^(1/2))^3)/
>           (4*(a - d + (a^2 - 2*a*c + 4*b*c + d^2)^(1/2))*
>               (a^2 - 2*a*c + 4*b*c + d^2)^(1/2)) -
>        (b*c*(a + d + (a^2 - 2*a*c + 4*b*c + d^2)^(1/2))^3)/
>           (4*(a - d - (a^2 - 2*a*c + 4*b*c + d^2)^(1/2))*
>               (a^2 - 2*a        *c + 4*b*c + d^2)^(1/2))]
>
>
>Out[1]//InputForm=
>  (b*c*(a + d - (a^2 - 2*a*c + 4*b*c + d^2)^(1/2))^3)/
>    (4*(a^2 - 2*a*c + 4*b*c + d^2)^(1/2)*
>      (a - d + (a^2 - 2*a*c + 4*b*c + d^2)^(1/2))) -
>   (b*c*(a + d + (a^2 - 2*a*c + 4*b*c + d^2)^(1/2))^3)/
>    (4*(a^2 - 2*a*c + 4*b*c + d^2)^(1/2)*
>      (a - d - (a^2 - 2*a*c + 4*b*c + d^2)^(1/2)))
>
>In[2]:= res=%;
>
>In[3]:= rule={a->1,b->2,c->3,d->4}
>
>Out[3]= {a -> 1, b -> 2, c -> 3, d -> 4}
>
>In[4]:= N[res//.rule]
>
>Out[4]= 36.9231
>
>In[5]:= N[Together[Expand[res]]//.rule]
>
>Out[5]= 46.9906
>
>In[6]:= N[Simplify[res]//.rule]
>
>Out[6]= 46.9906


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun  7 19:16:38 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA03207
  (5.62+/IDA-1.3.1 for stevec); Thu, 7 Jun 90 19:16:31 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA02855; Thu, 7 Jun 90 19:14:04 CDT
Received: by yoda.ncsa.uiuc.edu id AA02924
  (5.62+/IDA-1.3.1 for ); Thu, 7 Jun 90 15:36:34 -0500
Received: by yoda.ncsa.uiuc.edu id AA02919
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 7 Jun 90 15:36:32 -0500
Message-Id: <9006072036.AA02919@yoda.ncsa.uiuc.edu>
Date: Thu, 7 Jun 90 14:08 EDT
From: jpg@ALLEGHENY.SCRC.Symbolics.COM
Subject: Re: Gaussians
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

    Date: Mon, 4 Jun 90 21:58:07 PDT
    From: marchett@cod.nosc.mil (David J. Marchette)

    Thanks again for all those who responded to my query.  Here is the
    simplest solution: (Type the following into mathematica)

    f[x_,s_] := Exp[-(x/s)^2/2]/(Sqrt[2 Pi] s)

    Unprotect[Erf]
    Erf[DirectedInfinity[1] * ___] = 1
    Erf[DirectedInfinity[-1] * ___] = -1
    Protect[Erf]

    Integrate[f[x,sigma],{x,-Infinity,Infinity}]

    (* Yay! *)

    Integrate[f[x,sigma]^2,{x,-Infinity,Infinity}]

    (* Yay! *)

    Integrate[f[x,sigma1] f[x,sigma2],{x,-Infinity,Infinity}]

    (* Boo! *)

    As you can see, if you did the above, it's still hosed.  Now it seems that
    I need to tell it that Sqrt[-x] I is -Sqrt[x], and whatall. It is pretty clear
    that in order to do what I want, I have to know much more about Mathematica.
    Does anyone out there have access to Macsyma or Maple?  Do these also
    choke on this?  

Since you ask, MACSYMA has no trouble with this.  I typed in the problem as you 
first posed it:

(C1) assume(sigma>0)$

(C2) integrate(exp(-x^2/(2*sigma^2)),x,-inf,inf);

(D2)                   sqrt(2) sqrt(%pi) sigma

(C3) (forget(sigma>0),assume(sigma<0))$

(C4) integrate(exp(-x^2/(2*sigma^2)),x,-inf,inf);

(D4)                  - sqrt(2) sqrt(%pi) sigma


    I'm not saying that Mathematica is wrong, mind you, it's
    just not giving me what I want.  Am I too demanding?

I don't think so.

Jeffrey P. Golden
Symbolics MACSYMA Division
jpg@ALLEGHENY.SCRC.Symbolics.COM


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun  8 00:28:38 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA04351
  (5.62+/IDA-1.3.1 for stevec); Fri, 8 Jun 90 00:28:36 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA08483; Fri, 8 Jun 90 00:26:07 CDT
Received: by yoda.ncsa.uiuc.edu id AA03707
  (5.62+/IDA-1.3.1 for ); Thu, 7 Jun 90 23:20:28 -0500
Received: by yoda.ncsa.uiuc.edu id AA03703
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 7 Jun 90 23:20:27 -0500
Message-Id: <9006080420.AA03703@yoda.ncsa.uiuc.edu>
Date: Thu, 7 Jun 90 22:16:39 MDT
From: smithw@mathnx.byu.edu (William V. Smith)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:Does anyone have an apparent fix for this mathematica problem?
Status: RO

Yes.  There is a fix.  It is available from your local friendly NeXT
Rep.  Here's what happens with the fix:

In[1]:= InputForm[(b*c*(a + d - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^3)/
                   (4*(a - d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))*
                       (a^2 + 4*b*c - 2*a*d + d^2)^(1/2)) -
               (b*c*(a +                 d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^
3)/
                  (4*(a - d                 - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))
*
                       (a^2 + 4*b        *c - 2*a*d + d^2)^(1/2))]

Out[1]//InputForm=
  (b*c*(a + d - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^3)/
    (4*(a^2 + 4*b*c - 2*a*d + d^2)^(1/2)*
      (a - d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))) -
   (b*c*(a + d + (a^2 + 4*b*c - 2*a*d + d^2)^(1/2))^3)/
    (4*(a^2 + 4*b*c - 2*a*d + d^2)^(1/2)*
      (a - d - (a^2 + 4*b*c - 2*a*d + d^2)^(1/2)))

In[2]:= rule={a->1,b->2,c->3,d->4}

Out[2]= {a -> 1, b -> 2, c -> 3, d -> 4}

In[3]:= N[res//.rule]

Out[3]= res

In[4]:= res=%1;

In[5]:= N[res//.rule]

Out[5]= 37.

In[6]:= N[Together[Expand[res]]//.rule]

Out[6]= 37.

In[7]:= N[Simplify[res]//.rule]

Out[7]= 37.


    The bad result was from a known bug in the Together function
which is called by Simplify so both gave the wrong answer.


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun  8 22:25:09 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA05094
  (5.62+/IDA-1.3.1 for stevec); Fri, 8 Jun 90 22:25:07 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA29330; Fri, 8 Jun 90 22:22:43 CDT
Received: by yoda.ncsa.uiuc.edu id AA05064
  (5.62+/IDA-1.3.1 for ); Fri, 8 Jun 90 20:58:10 -0500
Received: by yoda.ncsa.uiuc.edu id AA05059
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 8 Jun 90 20:58:09 -0500
Message-Id: <9006090158.AA05059@yoda.ncsa.uiuc.edu>
Date: Fri, 8 Jun 90 14:17:14 EDT
From: Jim_Wendel@ub.cc.umich.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Superimposed Plots
Status: RO

Re Superimposed Plots , Gary W. Kenward.
I just learned how to disable unwanted plotting displays.  On the Plot
command give the option DisplayFunction->Identity; cf. pg 109.  Then on
the Show command give the option DisplayFunction->$DisplayFunction.

Jim_Wendel@ub.cc.umich.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun  8 23:28:04 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA05177
  (5.62+/IDA-1.3.1 for stevec); Fri, 8 Jun 90 23:28:01 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA00396; Fri, 8 Jun 90 23:25:36 CDT
Received: by yoda.ncsa.uiuc.edu id AA05058
  (5.62+/IDA-1.3.1 for ); Fri, 8 Jun 90 20:58:02 -0500
Received: by yoda.ncsa.uiuc.edu id AA05054
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 8 Jun 90 20:58:01 -0500
Message-Id: <9006090158.AA05054@yoda.ncsa.uiuc.edu>
From: wri!withoff@uunet.UU.NET
Date: Thu, 7 Jun 90 10:50:21 CDT
To: mathgroup@yoda.ncsa.uiuc.edu, uunet!van-bc!kenward%mdivax1@uunet.UU.NET
Subject: Re:  Superimposed plots
Status: RO

One way of doing this is included in the Graphics/Graphics.m package.
The basic idea is that what appears on the screen (or other output
device) is a side effect generated by applying the setting of the
DisplayFunction option to the graphics object.  Among other things,
this feature can be used to produce superimposed plots, as in

In[1]:= Show[Plot[Sin[x], {x, 0, 10}, DisplayFunction -> Identity],
             Plot[Cos[x], {x, 0, 10}, DisplayFunction -> Identity],
             DisplayFunction :> $DisplayFunction]

Dave Withoff
Wolfram Research
withoff@wri.com


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Jun 12 22:34:24 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA04085
  (5.62+/IDA-1.3.1 for stevec); Tue, 12 Jun 90 22:34:22 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA25298; Tue, 12 Jun 90 22:32:03 CDT
Received: by yoda.ncsa.uiuc.edu id AA04029
  (5.62+/IDA-1.3.1 for ); Tue, 12 Jun 90 21:29:01 -0500
Received: by yoda.ncsa.uiuc.edu id AA04025
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 12 Jun 90 21:29:00 -0500
Message-Id: <9006130229.AA04025@yoda.ncsa.uiuc.edu>
Date: Tue, 12 Jun 90 16:52:37 CDT
From: fulling@sarastro.tamu.edu (Stephen A. Fulling)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Saying something good, for a change
Status: RO

Since recent messages of mine were critical of Mathematica and its
documentation, let me share my delight over an instance where
Mathematica's special features enabled a hard calculation to be done
easily.  I need to integrate from 0 to Infinity various linear
combinations of functions of the form

     r^a Exp[-b r^2].   (*)

All these integrals can be done in closed form, and for a variety of
reasons I don't want to use Mathematica's built-in integrator; I must
use the formula.  I programmed it:

gaussParam[alpha_, gamma_] :=
    Block[{beta,answer},
	beta = (alpha+1)/2;
	answer = (1/2) gamma^(-beta) Gamma[beta];
	Return[answer]
    ]

The catch is that the integrand emerges as the output of another
Mathematica function, and I was wondering if I'd need to write a C
program to parse that expression to extract all the a's and b's, or
...


That same weekend I was reading through Roman Maeder's book,
Programming in Mathematica.  I hit page 70:

     "Often we can avoid programming a loop altogether by applying
     functions to lists or other expressions.  Section[s ...] about
     mapping of functions over expressions go the heart of
     Mathematica's programming language.  Understanding this material
     will allow you to write concise programs in the style that the
     authors of Mathematica think is best to use."

Blinding illumination!  All I need to do is to write a function defined
only on expressions that match the pattern (*), then Map[] it over
sums!

gauss[ c_. Exp[-gamma_. r^2] r^alpha_. ] :=
    (c/2) gamma^(-(alpha+1)/2) Gamma[(alpha+1)/2] /; FreeQ[c, r]

gauss[ c_. Exp[-gamma_. r^2]  ] :=
    (c/2) gamma^(-1/2) Gamma[1/2] /; FreeQ[c, r]

gauss[expr_] := Map[gauss, expr]

That doesn't mean that all is sweetness and light, however.  I did run
into two bugs-or-features in this little project, which will be
reported in later messages.

				     Steve Fulling
				     Texas A&M Math







From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Jun 12 23:42:08 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA04131
  (5.62+/IDA-1.3.1 for stevec); Tue, 12 Jun 90 23:42:06 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA26287; Tue, 12 Jun 90 23:39:48 CDT
Received: by yoda.ncsa.uiuc.edu id AA04041
  (5.62+/IDA-1.3.1 for ); Tue, 12 Jun 90 21:30:42 -0500
Received: by yoda.ncsa.uiuc.edu id AA04037
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 12 Jun 90 21:30:41 -0500
Message-Id: <9006130230.AA04037@yoda.ncsa.uiuc.edu>
Date: Tue, 12 Jun 90 17:23:15 CDT
From: fulling@sarastro.tamu.edu (Stephen A. Fulling)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: infinite limits that aren't
Status: RO

Here is a more serious problem:

In[1]:= <<exotic.m

In[2]:= cauchy[2,2,a,b]  (* defined to be this: *)

Out[2]=
      2               1               2               1
------------- - -------------   ------------- + -------------
  2    2 3  6     2    2 2  4     2    2 3  6     2    2 2  4
(a  - b )  r    (a  - b )  r    (a  - b )  r    (a  - b )  r
----------------------------- - -----------------------------
	     2  2                            2  2
	    b  r                            a  r
	   E                               E

(* Contrary to appearance, this function approaches a finite limit as
r->0.  This can be seen by expanding the exponentials in power series
and cancelling all the negative powers of r. *)

In[3]:= Limit[%, r->0]

Out[3]= ComplexInfinity     (* wrong *)

In[4]:= %2 /. {a->1, b->2}

	   2      1      -2      1
	    ----- - ----   ----- + ----
		6      4       6      4
	 27 r    9 r    27 r    9 r
Out[4]= ------------ - ------------
		  2             2
	       4 r             r
	   E               E

In[5]:= Limit[%, r->0]

	     1
Out[5]= -(-)   (* For a special case, the right answer is obtained. *)
	     6

In[6]:= Quit


I SPECULATE that this is what is happening:  Mathematica is trying to
evaluate the limit of a quotient, either before or after applying
l'Hopital's rule.  It simplifies the limit of the denominator to 0.  It
simplifies the limit of the numerator to an expression (not a "number",
in Mathematica's technical sense), which it does not recognize as
identically zero, although that expression would indeed simplify to
zero if a more powerful simplification procedure were applied.  (This,
by the way, is the reason I inserted a Together[] inside the Limit[] in
the code included in the previous message on "lost" error messages.)
So, it gives its "generic" response,

     expression/0 = ComplexInfinity.

But it really should be "Indeterminate" (at worst) in this case.  Like
the Sqrt[x^2] bug that we recently discussed, this feature can give an
unsuspecting user false information.  The default behavior of functions
and simplification procedures should somehow be made "fail safe".  I do
appreciate the difficulty of doing so in subtle cases like this, where
it may be very hard for the program to know what numerical values an
expression might take on.

				       Steve Fulling
				       Texas A&M Math







From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Jun 13 00:45:26 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA04865
  (5.62+/IDA-1.3.1 for stevec); Wed, 13 Jun 90 00:45:24 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA28450; Wed, 13 Jun 90 00:43:04 CDT
Received: by yoda.ncsa.uiuc.edu id AA04035
  (5.62+/IDA-1.3.1 for ); Tue, 12 Jun 90 21:30:04 -0500
Received: by yoda.ncsa.uiuc.edu id AA04031
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 12 Jun 90 21:30:03 -0500
Message-Id: <9006130230.AA04031@yoda.ncsa.uiuc.edu>
Date: Tue, 12 Jun 90 16:57:39 CDT
From: fulling@sarastro.tamu.edu (Stephen A. Fulling)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: "Lost" error message
Status: RO


I have run into two peculiar phenomena.  Maybe somebody can tell me
whether I'm doing something wrong.

The first is a merely aesthetic annoyance.  I am calculating a sum of
terms involving Gamma functions (see previous message).  If the
argument of a Gamma is a nonpositive integer, that term is infinite;
however, the expression as a whole is guaranteed to be finite -- the
infinities must cancel.  The finite value can be computed as the limit
from noninteger values of the parameter.  Mathematica can be told to
compute the limit if the first attempt at calculating the function
yields Indeterminate:

radial[expon_, m1_, m2_, a_, b_] :=
    Block[{answer},
	answer = gauss[Expand[r^expon cauchy[m1,m2,a,b]]];
	answer = If[answer===Indeterminate,
	    Limit[Together[radial[varexpon,m1,m2,a,b]],
	    varexpon->expon],
	    answer];
	Return[answer]
    ]

So far, so good.  But of course Mathematica issues a warning message

    Infinity::indt: Indeterminate expression ComplexInfinity -
    ComplexInfinity encountered.

This is objectionable, since the program is actually performing
correctly.  So, we turn off the message inside the Block:

    Off[Infinity::indt]

Alas, that turns off the message globally -- which is undesirable,
since that message might turn up later in another context where it
really does indicate an error.  So, at the end of the Block we turn it
back on again.  Problem should be solved.

Unfortunately, the On[] statement, when executed, issues an error
message

    On::none: Message Infinity::indt not found.

(It does, however, succeed in turning the indt message back on!)  This
new message is even more objectionable than the first.  So, we have to
turn it off, too.  Then turn it back on again, and, wondrous to relate,
we are NOT caught in an infinite regress:  On[] CAN find its OWN
message without complaining.

So the final version of the function is

radial[expon_, m1_, m2_, a_, b_] :=
    Block[{answer},
	Off[Infinity::indt];
	answer = gauss[Expand[r^expon cauchy[m1,m2,a,b]]];
	answer = If[answer===Indeterminate,
	    Limit[Together[radial[varexpon,m1,m2,a,b]],
	    varexpon->expon],
	    answer];
	Off[On::none];
	On[Infinity::indt];
	On[On::none];
	Return[answer]
    ]

This does exactly what it is supposed to, but seems needlessly
complex.

A bit of experimentation revealed:

(1)  The indt message can be turned off and on interactively without
any problem.  Only inside a subroutine does it trigger the On::none
message.

(2)  In a virgin Mathematica session -- no radial[] loaded --
Messages[Infinity] does NOT show the indt message.  However,
Messages[On] DOES turn up the "none" message.

Comments?

Since this is getting long, I'll describe the second problem in another
message.

				    Steve Fulling
				    Texas A&M Math







From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Jun 13 01:41:50 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA04979
  (5.62+/IDA-1.3.1 for stevec); Wed, 13 Jun 90 01:41:42 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA29673; Wed, 13 Jun 90 01:39:22 CDT
Received: by yoda.ncsa.uiuc.edu id AA04885
  (5.62+/IDA-1.3.1 for ); Wed, 13 Jun 90 00:47:30 -0500
Received: by yoda.ncsa.uiuc.edu id AA04880
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 13 Jun 90 00:47:27 -0500
Message-Id: <9006130547.AA04880@yoda.ncsa.uiuc.edu>
Date: Wed, 13 Jun 90 01:26:30 EDT
From: wsd@cs.brown.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Differential Geom Package
Status: RO


I already made this request on sci.math.symbolic, but this is a better
place for it:

I am looking for Mathematica code that provides operations from
differential geometry such as normal hairs on surfaces, tubes around
space curves, and geodesics on surfaces (given initial conditions).

any help is appreciated.

wsd@cs.brown.edu

From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun 14 23:46:26 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA06868
  (5.62+/IDA-1.3.1 for stevec); Thu, 14 Jun 90 23:46:24 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14151; Thu, 14 Jun 90 23:43:25 CDT
Received: by yoda.ncsa.uiuc.edu id AA06651
  (5.62+/IDA-1.3.1 for ); Thu, 14 Jun 90 22:41:23 -0500
Received: by yoda.ncsa.uiuc.edu id AA06647
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 14 Jun 90 22:41:22 -0500
Message-Id: <9006150341.AA06647@yoda.ncsa.uiuc.edu>
Date:    Wed, 13 Jun 90 14:32:52 PDT
From: jwendel@isdmnl.wr.usgs.gov
Subject: Limit
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

The function Series can help in some cases where Limit fails or errs.  An
example is Steve Fulling's cauchy[2,2,a,b].  Apply Series to his complicated
function of r,a,b and see directly that no negative powers of r survive.
                 Jim Wendel
                 jwendel@isdmnl.wr.usgs.gov


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun 15 01:43:09 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA07668
  (5.62+/IDA-1.3.1 for stevec); Fri, 15 Jun 90 01:43:08 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA17537; Fri, 15 Jun 90 01:40:03 CDT
Received: by yoda.ncsa.uiuc.edu id AA06656
  (5.62+/IDA-1.3.1 for ); Thu, 14 Jun 90 22:41:30 -0500
Received: by yoda.ncsa.uiuc.edu id AA06652
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 14 Jun 90 22:41:28 -0500
Message-Id: <9006150341.AA06652@yoda.ncsa.uiuc.edu>
Date: 14 Jun 90 11:03:00 EST
From: buot%estd.decnet@ccf3.nrl.navy.mil
Subject: mathematica applied to tight-binding Dyson equation
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

      I and my colleague,Felix Buot,are interested in exploring the
use of the symbolic capabilities of the Mathematica software to generate
tight-binding Green's functions via application of Dyson's equation.
      Please let us know if you have any software products that can do
this,or are aware of users of Mathematica who have done something similar.
      You can contact either Bill Grise at:
                    Bill Grise
                    Electrical Engineering Dept.
                    Anderson Hall,Rm. 699
                    Univ. of Kentucky
                    Lexington,Ky. 40506-0046
                    606-257-1971
    OR Felix Buot at
                    Felix Buot
                    Code 6852,Naval Research Lab
                    4555 Overlook Ave.,S.W.
                    Washington ,D.C. 20375-5000
                    202-767-2535
    FAB's email address is:
                    buot%estd.decnet@ccf3.nrl.navy.mil
       Thanks for your efforts,
                                         Felix Buot/Bill Grise



From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun 15 00:43:13 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA07551
  (5.62+/IDA-1.3.1 for stevec); Fri, 15 Jun 90 00:43:11 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA16286; Fri, 15 Jun 90 00:40:11 CDT
Received: by yoda.ncsa.uiuc.edu id AA06646
  (5.62+/IDA-1.3.1 for ); Thu, 14 Jun 90 22:41:18 -0500
Received: by yoda.ncsa.uiuc.edu id AA06642
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 14 Jun 90 22:41:16 -0500
Message-Id: <9006150341.AA06642@yoda.ncsa.uiuc.edu>
Date: Wed, 13 Jun 90 16:07:21 EDT
From: jas@erc-sparc.mc.duke.edu (John Schmidt)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject:  C program
Status: RO

I am trying to write a C program that can be called from Mathematica that 
solves a linear set of equations.  I would like to be able to have my program
return the solution set back to Mathematica for further processing.  I would
like to be able to pass my matrix and my b vector generated by Mathematica to
my C program.  I understand that I must use mathlink.c and other related files
and commands, but I am not sure if I can pass an array to the C program.  Has
anyone else done this type of thing that they might be able to help me out?

Thanks for any help,

John Schmidt
Duke University
jas@erc-sparc.mc.duke.edu



From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun 15 01:48:45 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA07686
  (5.62+/IDA-1.3.1 for stevec); Fri, 15 Jun 90 01:48:43 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA17645; Fri, 15 Jun 90 01:45:42 CDT
Received: by yoda.ncsa.uiuc.edu id AA06636
  (5.62+/IDA-1.3.1 for ); Thu, 14 Jun 90 22:41:02 -0500
Received: by yoda.ncsa.uiuc.edu id AA06632
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 14 Jun 90 22:41:01 -0500
Message-Id: <9006150341.AA06632@yoda.ncsa.uiuc.edu>
From: wri!withoff@uunet.uu.net
Date: Wed, 13 Jun 90 11:04:51 CDT
To: mathgroup@yoda.ncsa.uiuc.edu, fulling@sarastro.tamu.edu
Subject: Re:  infinite limits that aren't
Status: RO

The fact that Limit isn't yet up to handling the problem described
by Steve Fulling is disappointing.  For relatively tricky things
like this I often look to other parts of Mathematica for independent
confirmation of results.  In the case of Limit, I try substituting
numerical values, or plotting.  Another perhaps less obvious tool
is Series, which works reasonably well in this example:

               2               1               2               1
         ------------- - -------------   ------------- + -------------
           2    2 3  6     2    2 2  4     2    2 3  6     2    2 2  4
         (a  - b )  r    (a  - b )  r    (a  - b )  r    (a  - b )  r
Out[31]= ----------------------------- - -----------------------------
                      2  2                            2  2
                     b  r                            a  r
                    E                               E

In[32]:= Together /@ Series[%, {r, 0, 2}]

                  2    2   2
           1    (a  + b ) r        3
Out[32]= -(-) + ------------ + O[r]
           6         12



From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun 15 02:29:54 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA07756
  (5.62+/IDA-1.3.1 for stevec); Fri, 15 Jun 90 02:29:52 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA18412; Fri, 15 Jun 90 02:26:49 CDT
Received: by yoda.ncsa.uiuc.edu id AA06641
  (5.62+/IDA-1.3.1 for ); Thu, 14 Jun 90 22:41:11 -0500
Received: by yoda.ncsa.uiuc.edu id AA06637
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 14 Jun 90 22:41:09 -0500
Message-Id: <9006150341.AA06637@yoda.ncsa.uiuc.edu>
Date: Wed, 13 Jun 90 21:08:58 +0200
From: lauten@ds1.cip.physik.tu-muenchen.de
Subject: Reordered transformation rules
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

I have started to work with Mathematica only recently and I have
run into the following trouble:
In a file, say "ordered.m", I specify the following  ORDERED
transformation rules (reduced here to a generic form):

f[{a___, X, X, b___}]  := 1
f[{a___, X, b_, c___}] := 2
f[{a___, X}]           := 3  /; OddQ[ Length[{a}] ]
f[{a___}]              := 4  /; !MemberQ[{a},X] && OddQ[ Length[{a}] ]
f[{X}]                 := 5
f[{a_,b_,X}]           := 6
f[{a_,b_}]             := 7
f[{a_,b_,c_,d_,X}]     := 8
f[{a_,b_,c_,d_}]       := 9
f[{a___, X}]           := 10
f[{a___}]              := 11

where X is a symbol that shouldn't be used as a normal variable by the
later user. I have numbered the rules for use in the discussion below.

Then I teach Mathematica my ORDERED transformations rules by entering:
   In[1]:= <<ordered.m
and to control it I type:
   In[2]:= ?f
to get the answer:

f
f/: f[{a___, X, X, b___}]  := 1
f/: f[{a___, X, b_, c___}] := 2
f/: f[{a___, X}]           := 3 /; OddQ[Length[{a}]]
f/: f[{a___, X}]           := 10
f/: f[{a___}]              := 4 /; !MemberQ[{a}, X] && OddQ[Length[{a}]]
f/: f[{a___}]              := 11
f/: f[{X}]                 := 5
f/: f[{a_, b_, X}]         := 6
f/: f[{a_, b_}]            := 7
f/: f[{a_, b_, c_, d_, X}] := 8
f/: f[{a_, b_, c_, d_}]    := 9

where Mathematica has obviously REORDERED some of the rules.

Now the problem is the following: In order to make my algorithm work
properly and effectively it is necessary to apply the transformation
rules exactly in the original order given in "ordered.m". E.g. I want
Mathematica to apply the rule 8 before applying the more general rule
10 and similarly 9 before 11. With the reordered rules given above
this turns out to be impossible.

Can anybody tell me how to prevent the reordering of the
transformation rules or at least give me a hint why and how
Mathematica reorders the rules.

Thanks in advance,

MARKUS LAUTENBACHER


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun 15 13:35:32 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA08207
  (5.62+/IDA-1.3.1 for stevec); Fri, 15 Jun 90 13:35:29 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA27214; Fri, 15 Jun 90 13:32:28 CDT
Received: by yoda.ncsa.uiuc.edu id AA08160
  (5.62+/IDA-1.3.1 for ); Fri, 15 Jun 90 12:17:07 -0500
Received: by yoda.ncsa.uiuc.edu id AA08156
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 15 Jun 90 12:17:06 -0500
Message-Id: <9006151717.AA08156@yoda.ncsa.uiuc.edu>
From: macg@SLCS.SLB.COM (Bill Macgregor)
Date: Fri, 15 Jun 90 08:37:35 CDT
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: RE rule ordering
Status: RO

and echoing lauten's request for information.  Does anyone know
the precise meaning of "match" on page 575 in the book?  (See
paragraph quoted below.)  Anyone from WRI listening?  Is there
a formal definition of the pattern match relation which 
determines rule ordering, maybe represented as a Mma program?

  - Bill MacGregor

----- Begin Included Message -----

>From macg@SLCS.SLB.COM Wed Jun 13 09:25:11 1990
Return-Path: <macg@SLCS.SLB.COM>
Received: from frank.SLCS.SLB.COM
	by SLCS.SLB.COM (4.1/SLCS Mailhost 3.2)
	id AA00233; Wed, 13 Jun 90 09:25:08 CDT
From: macg@SLCS.SLB.COM (Bill Macgregor)
Received: by frank.SLCS.SLB.COM (4.1/SLCS Subsidiary 1.6)
	id AA07558; Wed, 13 Jun 90 09:25:05 CDT
Date: Wed, 13 Jun 90 09:25:05 CDT
Message-Id: <9006131425.AA07558.macg@frank.SLCS.SLB.COM>
To: de
Subject: confusion reigns
Status: RO

Amazing what you can find in the book.  Our question yesterday
on transformation rule ordering has a natural, concise answer on
pages 574-575 (but keep reading):

    .... Each time you make an assignment, the corresponding
    transformation rule is inserted at the end of the list of
    transformation rules [the list is searched in order, in 
    principle, during evaluation-MacG] associated with s,
    except in the following cases:

     * The left-hand side of the transformation rule is 
       identical to a transformation rule that has already
       been stored, and any /; conditions on the right-hand
       side are also identical.  In this case, the new
       transformation rule is inserted in place of the old
       one.

     * Transformation rules that are already in the list have
       left-hand sides which are patterns that match the left-
       hand side of the transformation rule being inserted.
       In this case, the new transformation rule is inserted
       immediately before the first transformation rule that
       matches it.  (Neither new nor old transformation rules
       can have /; conditions attached in this case.)

Subtlety here, I suspect, is in the definition of one pattern
"matching" another--I don't think it means MatchQ.  Our case in 
point was the rule set

  Rule 1:   f[h_[a___]] := ...      
  Rule 2:   f[x_] := ...

Suppose Rule 1 is defined first (i.e., is in the list).  When
Rule 2 is defined, does h_[a___]  match x_?  MatchQ says yes, if
you try it (see below).  So Rule 2 is inserted before Rule 1,
right?

Suppose Rule 2 is defined first.  When Rule 1 is defined, 
MatchQ[h_[a___], x_] is True, so Rule 1 is inserted before Rule 2,
don't you think?

However, look over this typescript that shows the opposite 
actually happens -

In[1]:= f[x_] := 7;

In[2]:= f[h_[a___]] := 8;

In[3]:= ??f
f
f/: f[x_] := 7
 
f/: f[(h_)[a___]] := 8
 

In[3]:= Clear[f]

In[4]:= ??f
f

In[4]:= f[h_[a___]] := 8;

In[5]:= f[x_] := 7;

In[6]:= ??f
f
f/: f[(h_)[a___]] := 8
 
f/: f[x_] := 7
 
In[6]:= MatchQ[h_[a___], x_]

Out[6]= True

In[7]:= MatchQ[x_, h_[a___]]

Out[7]= True

My conclusion:  "match" in the text from the Mathematica book
does not mean MatchQ.  Which leaves the question:  what does 
"match" mean?

Meanwhile, the answer to the specific question is clear:  the
behavior of CasesAll DOES depend upon the order in which the
two definitions are made.

  - Bill

PS to readers of mathgroup:  we've defined CasesAll (named by 
analogy with MapAll) by:


CasesAll::usage = "CasesAll[expr_, pat_] returns a list of the 
subexpressions in expr that match pat.  CasesAll[expr_, pat_, rhs_]
returns Map[(# /. pat :> rhs)&, CasesAll[expr, pat]]."

CasesAll[x_, p_, r_] := Map[(# /. p :> r)&, CasesAll[x, p]];

CasesAll[e:h_[a___], p_] := Join[CasesAllmatch[e, p],
                                    CasesAll[h, p], 
                                    Join @@ Map[CasesAll[#, p]&, {a}]];

CasesAll[x_, p_] := CasesAllmatch[x, p];

CasesAllmatch[x_, p_] := Replace[x, {p -> {x}, _ -> {}}];



From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Jun 16 02:29:16 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA09440
  (5.62+/IDA-1.3.1 for stevec); Sat, 16 Jun 90 02:29:14 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA11452; Sat, 16 Jun 90 02:26:17 CDT
Received: by yoda.ncsa.uiuc.edu id AA09245
  (5.62+/IDA-1.3.1 for ); Sat, 16 Jun 90 00:53:09 -0500
Received: by yoda.ncsa.uiuc.edu id AA09240
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 16 Jun 90 00:53:07 -0500
Message-Id: <9006160553.AA09240@yoda.ncsa.uiuc.edu>
Date: Fri, 15 Jun 90 17:06:53 EDT
From: oliveria@caen.engin.umich.edu (ROQUE DONIZETE DE OLIVEIRA)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: ComplexMap.m
Status: RO

Has anyone modified ComplexMap.m from the book
	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
to handle x and y axes labeling when plotting a function F[x + I y] ? 
It already draws labels for the Re an Im part of F but it would be nice
to keep track of what the corresponding x and y values are.

Thanks for any help.

       Roque
       oliveria@caen.engin.umich.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Jun 16 01:29:53 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA09363
  (5.62+/IDA-1.3.1 for stevec); Sat, 16 Jun 90 01:29:51 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA10434; Sat, 16 Jun 90 01:26:51 CDT
Received: by yoda.ncsa.uiuc.edu id AA09239
  (5.62+/IDA-1.3.1 for ); Sat, 16 Jun 90 00:53:03 -0500
Received: by yoda.ncsa.uiuc.edu id AA09235
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 16 Jun 90 00:53:01 -0500
Message-Id: <9006160553.AA09235@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: meaning of match
Date: Fri, 15 Jun 90 13:40:51 PDT
From: jacobson@cello.hpl.hp.com
Status: RO

The meaning of match is apparently very strict.  Observer the
following:

In[1]:= f[x_] := 1

In[2]:= f[y_] := 2

In[3]:= ??f

f
f/: f[x_] := 1
 
f/: f[y_] := 2

  -- David Jacobson




From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Jun 16 02:50:42 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA09468
  (5.62+/IDA-1.3.1 for stevec); Sat, 16 Jun 90 02:50:40 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA11693; Sat, 16 Jun 90 02:47:43 CDT
Received: by yoda.ncsa.uiuc.edu id AA09234
  (5.62+/IDA-1.3.1 for ); Sat, 16 Jun 90 00:52:56 -0500
Received: by yoda.ncsa.uiuc.edu id AA09230
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 16 Jun 90 00:52:55 -0500
Message-Id: <9006160552.AA09230@yoda.ncsa.uiuc.edu>
Date: Fri, 15 Jun 90 10:35:08 PDT
From: van-bc!mdivax1!kenward (Gary Kenward)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: A question about plotting
Status: RO

Please excuse my impatience, but I am reposting this 
question in case it did not get through:

I am trying to plot two lists on one plot but with
different point styles. I cannot find anything in
the documentation on how to specify a point style.

"PlotStyle is an option for Plot and ListPlot that 
specifies the style of lines or points to be plotted",
however, like many of the attributes, there is no
hint as to how point styles (other than size) are
defined.

Any suggestions?

Thanks, 
Gary Kenward
Mobile Data International, Inc.
(a Motorola company)




From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Jun 19 23:15:24 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA12960
  (5.62+/IDA-1.3.1 for stevec); Tue, 19 Jun 90 23:15:22 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA04730; Tue, 19 Jun 90 23:13:00 CDT
Received: by yoda.ncsa.uiuc.edu id AA12772
  (5.62+/IDA-1.3.1 for ); Tue, 19 Jun 90 20:18:15 -0500
Received: by yoda.ncsa.uiuc.edu id AA12768
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 19 Jun 90 20:18:14 -0500
Message-Id: <9006200118.AA12768@yoda.ncsa.uiuc.edu>
From: mcdonald@quark.umd.edu (Bill MacDonald)
Subject: Re: A question about plotting
To: mathgroup@yoda.ncsa.uiuc.edu
Date: Sat, 16 Jun 90 17:05:42 EDT
Status: RO

William M. MacDonald  
Internet : MCDONALD@QUARK.UMD.EDU
Bitnet   : MCDONALD@CINCOM
X-Mailer: ELM [version 2.3 PL0]

> 
> Please excuse my impatience, but I am reposting this 
> question in case it did not get through:
> 
> I am trying to plot two lists on one plot but with
> different point styles. I cannot find anything in
> the documentation on how to specify a point style.
> 
> "PlotStyle is an option for Plot and ListPlot that 
> specifies the style of lines or points to be plotted",
> however, like many of the attributes, there is no
> hint as to how point styles (other than size) are
> defined.
> 
> Any suggestions?
> 
> Thanks, 
> Gary Kenward
> Mobile Data International, Inc.
> (a Motorola company)
> 
> 
> 
> 

Look at the alphabetical List of Built-in atheematica Objects, which
begins on page 593, under Graphics. (I find this the best place to start when
unsure about some Mathematica object.) There you will find listed the primitives Thickness and Dashing listed.  In the index under Thickness find a reference
to page 142.  There the explanation of these two primitives is given.  You can
also find explanations of both primitives in the L-o-Bi-M-O.  Under Dashing
finfururther explanations.



From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Jun 19 22:25:46 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA12897
  (5.62+/IDA-1.3.1 for stevec); Tue, 19 Jun 90 22:25:44 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA03976; Tue, 19 Jun 90 22:23:22 CDT
Received: by yoda.ncsa.uiuc.edu id AA12784
  (5.62+/IDA-1.3.1 for ); Tue, 19 Jun 90 20:19:57 -0500
Received: by yoda.ncsa.uiuc.edu id AA12780
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 19 Jun 90 20:19:56 -0500
Message-Id: <9006200119.AA12780@yoda.ncsa.uiuc.edu>
Date: Mon, 18 Jun 90 11:34:28 CDT
From: wri!withoff@uunet.UU.NET (David Withoff)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  A question about plotting
Status: RO

The only PlotStyle settings I've used for ListPlot are color and
PointSize.  To get other plotting symbols, the TextListPlot function
in Graphics.m is a reasonable starting point.  TextListPlot uses
character strings instead of points to display data.  The same
basic idea can be used to display other plotting symbols.  For
example:

SquarePoint[point:{_?NumberQ, _?NumberQ}] :=
    {Line[{Scaled[{.01, .01}, point], Scaled[{.01, -.01}, point],
          Scaled[{-.01, -.01}, point], Scaled[{-.01, .01}, point],
          Scaled[{.01, .01}, point]}], Point[point]}

SquarePointPlot[data:{{_?NumberQ, _?NumberQ}..}] :=
    Show[Graphics[Map[SquarePoint, data]], Axes -> Automatic]

example:

data = Table[Random[], {10}, {2}]
SquarePointPlot[data]

I've seen some partially finished packages (with code fragments
like the above), but nothing that seemed finished enough to merit
broad distribution.  Hopefully a a few code fragments like this
will serve the purpose until a more complete solution becomes
available.

Dave Withoff
Wolfram Research
withoff@wri.com


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Jun 19 23:25:50 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA13003
  (5.62+/IDA-1.3.1 for stevec); Tue, 19 Jun 90 23:25:48 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA04869; Tue, 19 Jun 90 23:23:26 CDT
Received: by yoda.ncsa.uiuc.edu id AA12796
  (5.62+/IDA-1.3.1 for ); Tue, 19 Jun 90 20:20:53 -0500
Received: by yoda.ncsa.uiuc.edu id AA12792
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 19 Jun 90 20:20:52 -0500
Message-Id: <9006200120.AA12792@yoda.ncsa.uiuc.edu>
Date: Tue, 19 Jun 90 14:41:19 MDT
From: smithw@mathnx.byu.edu (William V. Smith)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Bug in NullSpace?
Status: RO

I take it back.  Seems there was some kind of machine problem with
this computation.  I have been able to get it to work twice (at least it
gave an answer).  It was very slow with the computation however.


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Jun 19 21:33:45 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA12850
  (5.62+/IDA-1.3.1 for stevec); Tue, 19 Jun 90 21:33:44 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA03276; Tue, 19 Jun 90 21:31:22 CDT
Received: by yoda.ncsa.uiuc.edu id AA12778
  (5.62+/IDA-1.3.1 for ); Tue, 19 Jun 90 20:19:10 -0500
Received: by yoda.ncsa.uiuc.edu id AA12774
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 19 Jun 90 20:19:09 -0500
Message-Id: <9006200119.AA12774@yoda.ncsa.uiuc.edu>
Date: Sat, 16 Jun 90 15:46:28 PDT
From: don@kinghorn.chem.WSU.EDU (Don Kinghorn)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: A question about plotting
Status: RO


>...
>I am trying to plot two lists on one plot but with
>different point styles. I cannot find anything in
>the documentation on how to specify a point style.
>...

If you don't mind using ascii characters for your points you could try using the
TextListPlot  function found in the Graphics.m package.

EXAMPLE;
In[1]:= <<Graphics/Graphics.m

In[2]:= xdata1= {1,2,3,4}; xdata2 = {1,2,3,4};

In[3]:= ydata1= {1,2,3,4}; ydata2 = {1,4,9,16};

In[4]:= symbol1 = Table[ "+" ,{ Length[xdata1] } ];

In[5]:= symbol2 = Table[ "*" ,{ Length[xdata2] } ];

In[6]:= data1 = Transpose[ {xdata1, ydata1, symbol1} ];

In[7]:= data2 = Transpose[ {xdata2, ydata2, symbol2} ];

In[8]:= dataplot1=TextListPlot[data1];

In[9]:= dataplot2= TextListPlot[data2];

In[10]:= Show[dataplot1,dataplot2]

If you want the points connected or overlayed with curve fits you can make additional
plots and put them all together and set options with Show.

To get at special ascii characters you can use FromASCII[n] or FromASSCII[16^^hex]

I hope this is of some help.

--Don Kinghorn









From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun 21 22:27:42 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA15443
  (5.62+/IDA-1.3.1 for stevec); Thu, 21 Jun 90 22:27:41 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA20966; Thu, 21 Jun 90 22:25:21 CDT
Received: by yoda.ncsa.uiuc.edu id AA15350
  (5.62+/IDA-1.3.1 for ); Thu, 21 Jun 90 20:35:36 -0500
Received: by yoda.ncsa.uiuc.edu id AA15346
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 21 Jun 90 20:35:34 -0500
Message-Id: <9006220135.AA15346@yoda.ncsa.uiuc.edu>
Date: Thu, 21 Jun 90 21:16:47 -0400 (EDT)
From: Anand Patwardhan <ap10+@andrew.cmu.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Remote kernels in Mathematica
Status: RO


        I'd like to run a remote kernel in Mathematica, with the front end on
a Macintosh. I do the necessary stuff in the 'Edit Connections' menu and add
the hostnames (actually I put in the IP numbers) of the hosts on which I
want to run the kernel. Now when I try to actually open a connection,
Mathematica complains that it cannot find the 'Hosts' file and leaves MacTCP
all confused.

        I tried to explore and could not find any documentation about this
file and/or its syntax etc..
        
        Anybody out there have success in running a remote kernel in
Mathematica on the Macintosh? Any suggestions?

Thanks in advance

Anand
------------------------------------------------------------------------------
Anand Patwardhan	|INTERNET	:	ap10@andrew.cmu.edu
Dept. of Engg. and	|BITNET	:	apat@drycas.BITNET
Public Policy, C.M.U	|(others)..{harvard,psuvax1}!andrew.cmu.edu!ap10
Pittsburgh PA 15213	|VOICE		:	(412)-268-5617 (office)
------------------------------------------------------------------------------




From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun 21 21:30:36 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA15401
  (5.62+/IDA-1.3.1 for stevec); Thu, 21 Jun 90 21:30:35 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA20149; Thu, 21 Jun 90 21:28:16 CDT
Received: by yoda.ncsa.uiuc.edu id AA15345
  (5.62+/IDA-1.3.1 for ); Thu, 21 Jun 90 20:35:28 -0500
Received: by yoda.ncsa.uiuc.edu id AA15341
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 21 Jun 90 20:35:27 -0500
Message-Id: <9006220135.AA15341@yoda.ncsa.uiuc.edu>
Date: Wed, 20 Jun 90 15:30:08 MDT
From: smithw@mathnx.byu.edu (William V. Smith)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Plot problem
Status: RO

  We have some NeXT machines in the department and we have run into a difficulty
with Plot.   Try this on your NeXT if you have one available (the problem
does not seem to occur on our MIPS)

In[1]:=  f[x_]:= x^(5/3) + 5 x^(2/3);
              g=D[f[x],x]

In[2]:= Plot[{f[x],g}, {x, -5, 3}]

In[3]:=  Show[%,AspectRatio->Automatic]

The machine takes an awful long time to compute this and equally long times
to copy and paste someplace else (if you can get it to that at all).   Worse,
the window server seems to lock up so you can't do anything until this compute
is done!   What's the problem here?   When we run this on our MIPS using
X-windows graphics (the machines seem about equal in speed on other
mathematica stuff) the result comes up FAST!   Help!   We would like to use
some NeXT's in a calculus lab this fall where no doubt problems like this
will come up again.....   When the machine does finally produce the graphic,
just try to PRINT  IT!   Yikes!   Your machine dies!


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun 22 19:26:41 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA16686
  (5.62+/IDA-1.3.1 for stevec); Fri, 22 Jun 90 19:26:39 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA12471; Fri, 22 Jun 90 19:24:22 CDT
Received: by yoda.ncsa.uiuc.edu id AA16628
  (5.62+/IDA-1.3.1 for ); Fri, 22 Jun 90 17:49:22 -0500
Received: by yoda.ncsa.uiuc.edu id AA16624
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 22 Jun 90 17:49:20 -0500
Message-Id: <9006222249.AA16624@yoda.ncsa.uiuc.edu>
Date:         Fri, 22 Jun 90 15:00:52 CST
From: "E. Neely Atkinson" <AN123651@uthvm1.bitnet>
Subject:      Mathematica bug.
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Please help. I have been muched by a nasty Mathematica bug. I
am running version 1.2f33 Enhanced on a Mac II.

If I define the function

      f[x_] := (1/x) (1/x^2)^(1/x^2 -1)

and then ask for f[x], I get

      x^(-1 - 2 (-1 + x^(-2)))

Considering the case x=-1 quickly demonstrates that these are not
equivalent.


                               E. Neely Atkinson
                               AN123651 at UTHVM1.BITNET
                               neely@mdaali.cancer.utexas.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun 22 20:04:13 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA16749
  (5.62+/IDA-1.3.1 for stevec); Fri, 22 Jun 90 20:04:11 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA13126; Fri, 22 Jun 90 20:01:53 CDT
Received: by yoda.ncsa.uiuc.edu id AA16613
  (5.62+/IDA-1.3.1 for ); Fri, 22 Jun 90 17:49:02 -0500
Received: by yoda.ncsa.uiuc.edu id AA16609
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 22 Jun 90 17:49:00 -0500
Message-Id: <9006222249.AA16609@yoda.ncsa.uiuc.edu>
Date: Fri, 22 Jun 90 13:30:12 EDT
From: riddle@mathcs.emory.edu (Larry Riddle)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Two column printing
Status: RO

A friend recently showed me a printout from a mathematica session on
the NeXt which was in two column landscape mode (at a small font
size) similar to what is produced by the Unix command enscript -2r.
Unfortunately we were in the midst of grading 77000 Advanced placement
calculus exams for ETS and so I didn't get the details on how he
did this. What I would like to know is if it is possible to do this on
the Macintosh, that is, print a notebook in landscape orientation with
two columns. Any suggestions?

Larry Riddle        | riddle@mathcs.emory.edu         PREFERRED
Agnes Scott College | {decvax,gatech}!emory!riddle    UUCP 
Dept of Math        | riddle@emory.bitnet             NON-DOMAIN BITNET
Decatur, GA 30030   | (404) 371-6222                  AT&T


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun 22 20:28:48 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA16778
  (5.62+/IDA-1.3.1 for stevec); Fri, 22 Jun 90 20:28:46 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA13477; Fri, 22 Jun 90 20:26:29 CDT
Received: by yoda.ncsa.uiuc.edu id AA16633
  (5.62+/IDA-1.3.1 for ); Fri, 22 Jun 90 17:49:29 -0500
Received: by yoda.ncsa.uiuc.edu id AA16629
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 22 Jun 90 17:49:27 -0500
Message-Id: <9006222249.AA16629@yoda.ncsa.uiuc.edu>
Date: Fri, 22 Jun 90 16:53:27 ED
From: sor@cs.williams.edu (Seth O. Rogers)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica packages
Status: RO

Dear Math Group,
   My name is Seth Rogers, and I am a student at Williams College (in
Massachusetts).  This summer, I am helping to design a course in
probability.  We are interested in computer programs to compute the
various distributions, specifically the discrete distributions
(Binomial, Poisson, etc.), and also, if possible, some stochastic
pro- cesses, such as discrete branching and random walks.  I have
been experimenting with Mathematica for the Macintosh as a possible
product for use in the course, and it seems like a very appropriate
framework.  I have written a few of the functions myself, but as I am
a novice and I hear that there are many packages available, I thought
I would look into a package of probability functions already written
better than I can do.
   Which brings me to the point of the note: do you know of any such
   package, or anybody else I could ask?  I would appreciate any help
you may be able to give, as you are my only lead.  Please reply as
soon as you can, because we are eager to order something and get
started.  I can be reached at "sor@bull.williams.cs.edu" or
"91sor_c@vax.cc.williams.edu"  I hope to hear from you soon.
					Sincerely, Seth Rogers


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun 22 21:16:25 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA16883
  (5.62+/IDA-1.3.1 for stevec); Fri, 22 Jun 90 21:16:23 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14131; Fri, 22 Jun 90 21:14:05 CDT
Received: by yoda.ncsa.uiuc.edu id AA16608
  (5.62+/IDA-1.3.1 for ); Fri, 22 Jun 90 17:48:54 -0500
Received: by yoda.ncsa.uiuc.edu id AA16604
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 22 Jun 90 17:48:52 -0500
Message-Id: <9006222248.AA16604@yoda.ncsa.uiuc.edu>
From: mcdonald@quark.umd.edu (Bill MacDonald)
Subject: Re: Remote kernels in Mathematica
To: mathgroup-adm@yoda.ncsa.uiuc.edu (Anand Patwardhan)
Date: Fri, 22 Jun 90 8:13:12 EDT
Status: RO

William M. MacDonald  
Internet : MCDONALD@QUARK.UMD.EDU
Bitnet   : MCDONALD@CINCOM
X-Mailer: ELM [version 2.3 PL0]

> 
> 
>         I'd like to run a remote kernel in Mathematica, with the front end on
> a Macintosh. I do the necessary stuff in the 'Edit Connections' menu and add
> the hostnames (actually I put in the IP numbers) of the hosts on which I
> want to run the kernel. Now when I try to actually open a connection,
> Mathematica complains that it cannot find the 'Hosts' file and leaves MacTCP
> all confused.
> 
>         I tried to explore and could not find any documentation about this
> file and/or its syntax etc..
>         
>         Anybody out there have success in running a remote kernel in
> Mathematica on the Macintosh? Any suggestions?
> 
> Thanks in advance
> 
> Anand
> ------------------------------------------------------------------------------
> Anand Patwardhan	|INTERNET	:	ap10@andrew.cmu.edu
> Dept. of Engg. and	|BITNET	:	apat@drycas.BITNET
> Public Policy, C.M.U	|(others)..{harvard,psuvax1}!andrew.cmu.edu!ap10
> Pittsburgh PA 15213	|VOICE		:	(412)-268-5617 (office)
> ------------------------------------------------------------------------------
> 
> 
> 
> 
I am running from MacIICi to a DECstation 3100 using the frontend on the MAC
and the remote kernel on the DECstation.  I had the same difficulty, but
solved it by deselecting the Host File box (take out the check).  I think you
must need a local file and Mathematica can not find it.  Let me hear from
you if this works or if there are other problems.  Like many users I don't
have time to read every word in the documentation.
Bill (William M. MacDonald, Prof of Physics, U of Maryland)


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun 22 21:16:40 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA16888
  (5.62+/IDA-1.3.1 for stevec); Fri, 22 Jun 90 21:16:38 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14135; Fri, 22 Jun 90 21:14:22 CDT
Received: by yoda.ncsa.uiuc.edu id AA16618
  (5.62+/IDA-1.3.1 for ); Fri, 22 Jun 90 17:49:08 -0500
Received: by yoda.ncsa.uiuc.edu id AA16614
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 22 Jun 90 17:49:06 -0500
Message-Id: <9006222249.AA16614@yoda.ncsa.uiuc.edu>
Date: Fri, 22 Jun 90 12:44:27 PDT
From: don@kinghorn.chem.WSU.EDU (Don Kinghorn)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:Plot problem
Status: RO

>  We have some NeXT machines in the department and we have run into a difficulty
>with Plot.   Try this on your NeXT if you have one available (the problem
>does not seem to occur on our MIPS)
>
>In[1]:=  f[x_]:= x^(5/3) + 5 x^(2/3);
>             g=D[f[x],x]
>
>In[2]:= Plot[{f[x],g}, {x, -5, 3}]
>
>In[3]:=  Show[%,AspectRatio->Automatic]
>
>The machine takes an awful long time to compute this and equally long times
>to copy and paste someplace else (if you can get it to that at all).   Worse,
>the window server seems to lock up so you can't do anything until this compute
>is done!   What's the problem here?   When we run this on our MIPS using
>X-windows graphics (the machines seem about equal in speed on other
>mathematica stuff) the result comes up FAST!   Help!   We would like to use
>some NeXT's in a calculus lab this fall where no doubt problems like this
>will come up again.....   When the machine does finally produce the graphic,
>just try to PRINT  IT!   Yikes!   Your machine dies!
>

I ran your input statements on a minimally configured NeXT running the 1.0
 system software and got the following results with ShowTime on.

f[x_]:= x^(5/3) + 5 x^(2/3);
              g=D[f[x],x]
0.0166667 Second

Plot[{f[x],g}, {x, -5, 3}]
2.28333 Second

Show[%,AspectRatio->Automatic]
0.483333 Second

The results seem fine on my machine. Copy and paste into WriteNow worked fine
as did printing from the Mathematica window .
You didn't say how your NeXT was configured, but if you're running 1.0 with the
40 meg swap drive your swap file may be growing to large. I've had this problem on 

my machine with the result being symptoms like you described above. System 1.0
does not clean up the swapfile correctly.You can run df from a UNIX prompt to 

check this out. The easiest work around I know is to power down when the swapdisk
is greater than 75% full. The latest upgrade, 1.0a, fixes this problem (I hope) 

I'm waiting on the upgrade myself.

---Don Kinghorn


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Jun 22 18:26:45 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA16638
  (5.62+/IDA-1.3.1 for stevec); Fri, 22 Jun 90 18:26:44 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA11513; Fri, 22 Jun 90 18:24:25 CDT
Received: by yoda.ncsa.uiuc.edu id AA16623
  (5.62+/IDA-1.3.1 for ); Fri, 22 Jun 90 17:49:14 -0500
Received: by yoda.ncsa.uiuc.edu id AA16619
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 22 Jun 90 17:49:12 -0500
Message-Id: <9006222249.AA16619@yoda.ncsa.uiuc.edu>
Date: Fri, 22 Jun 90 14:31:06 MDT
From: smithw@mathnx.byu.edu (William V. Smith)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Plot problem
Status: RO

It looks like I gave out a slightly different problem than the one I originally had.
Here is the original problem:

f[x_] = x^(5/3) + 5x^(2/3);
g = D[f[x], x];
Plot[ {f[x], g}, {x, -6, 2},
PlotStyle -> { GrayLevel[0.2],Dashing[{.05, .05}] } ]
Show[%, AspectRatio -> Automatic]

But we may have had some corruption introduced by a system problem.
See what you can do with this if you can get a moment.  Thanks.
We had a problem printing this as well.


From mathgroup-adm@yoda.ncsa.uiuc.edu Sun Jun 24 20:29:30 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA19060
  (5.62+/IDA-1.3.1 for stevec); Sun, 24 Jun 90 20:29:28 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA20353; Sun, 24 Jun 90 20:27:13 CDT
Received: by yoda.ncsa.uiuc.edu id AA19053
  (5.62+/IDA-1.3.1 for ); Sun, 24 Jun 90 19:34:54 -0500
Received: by yoda.ncsa.uiuc.edu id AA19049
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sun, 24 Jun 90 19:34:53 -0500
Message-Id: <9006250034.AA19049@yoda.ncsa.uiuc.edu>
Date: Sun, 24 Jun 90 15:54:52 PDT
From: don@kinghorn.chem.WSU.EDU (Don Kinghorn)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Plot problem / NeXT Mathematica bug in PlotStyle->Dashing
Status: RO

>
>It looks like I gave out a slightly different problem than the one I originally had.
>Here is the original problem:
>
>f[x_] = x^(5/3) + 5x^(2/3);
>g = D[f[x], x];
>Plot[ {f[x], g}, {x, -6, 2},
>PlotStyle -> { GrayLevel[0.2],Dashing[{.05, .05}] } ]
>Show[%, AspectRatio -> Automatic]
>
>But we may have had some corruption introduced by a system problem.
>See what you can do with this if you can get a moment.  Thanks.
>We had a problem printing this as well.
>
I tried this input ---result, locked up system.
The problem seems to be with the Dashing option. I sent the following bug report
to NeXT inc. along with the original messages describing the problem;
------------------------------------------------------------------------
This bug report concerns;

	NeXT release 1.0
	Mathematica Kernel version 1.2
	Front end version 1.2 


The PlotStyle option Dashing locks up the window server when
used for plotting functions that contain  singularities . This seems
to be a NeXT only problem.?

THIS CRASHES THE SYSTEM;
In[1]:= Plot[ 1/x, {x, -10, 10} ,  PlotStyle-> Dashing[ {.05, .05} ]  ]


HOWEVER, THIS WORKS FINE;
In[1]:= Plot[ 1/x, {x, -11, 10} ,  PlotStyle-> Dashing[ {.05, .05} ]  ]    


... etc...
----------------------------------------------------------------------------
The effect this bug has on the system makes it hard to investigate.
The only thing I can suggest is avoid using the Dashing option. If NeXT Inc.
sends me any "work around" I'll be sure to pass it on.  


---Don Kinghorn



From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jun 25 20:28:07 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA20072
  (5.62+/IDA-1.3.1 for stevec); Mon, 25 Jun 90 20:28:05 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA12972; Mon, 25 Jun 90 20:25:21 CDT
Received: by yoda.ncsa.uiuc.edu id AA20038
  (5.62+/IDA-1.3.1 for ); Mon, 25 Jun 90 19:52:37 -0500
Received: by yoda.ncsa.uiuc.edu id AA20034
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 25 Jun 90 19:52:35 -0500
Message-Id: <9006260052.AA20034@yoda.ncsa.uiuc.edu>
Date: Mon, 25 Jun 90 09:32:47 +0200
From: lauten@ds1.cip.physik.tu-muenchen.de
Subject: Re: Mathematica packages
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Dear SETH,

I am a student and a Mathematica novice, too, so my help will be
probably very limited.
I remember seeing an example Mathematica program on random walk in the
book "Programming Mathematica" by Roman Maeder, published by
Addison-Wesley. Since you will probably have to dive deeper into
Mathematica having a look at this book might be a good idea anyway.
If your finial Mathematica Package is free for distribution I would
greatly appreciate a copy of it.


Do the right hack,
                   MARKUS


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jun 25 21:27:24 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA20180
  (5.62+/IDA-1.3.1 for stevec); Mon, 25 Jun 90 21:27:22 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA13854; Mon, 25 Jun 90 21:24:39 CDT
Received: by yoda.ncsa.uiuc.edu id AA20054
  (5.62+/IDA-1.3.1 for ); Mon, 25 Jun 90 19:52:58 -0500
Received: by yoda.ncsa.uiuc.edu id AA20049
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 25 Jun 90 19:52:56 -0500
Message-Id: <9006260052.AA20049@yoda.ncsa.uiuc.edu>
Date: Mon, 25 Jun 90 17:22:53 EST
From: irh@baby.bby.oz.au (Ian R Heddle)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: mathlink.c bug
Status: RO

The mathlink.c code used to call external functions contains a programming 
error. The parameter information linked list is linked in reverse order to 
the functions actual parameters. This can cause type mismatch. 

The code is also restricted to using either one or two parameters, which is not mentioned in any Mathematica documentation. If more than two parameters are
needed to call a remote funcition you will have to edit the mathlink.c file
to include a switch selection statement that will coincide with the parameters
you require.


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jun 25 22:17:12 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA20279
  (5.62+/IDA-1.3.1 for stevec); Mon, 25 Jun 90 22:17:10 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14579; Mon, 25 Jun 90 22:14:26 CDT
Received: by yoda.ncsa.uiuc.edu id AA20043
  (5.62+/IDA-1.3.1 for ); Mon, 25 Jun 90 19:52:44 -0500
Received: by yoda.ncsa.uiuc.edu id AA20039
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 25 Jun 90 19:52:43 -0500
Message-Id: <9006260052.AA20039@yoda.ncsa.uiuc.edu>
Date: Mon, 25 Jun 90 10:49:20 PDT
From: eran@THSUN1.SLAC.STANFORD.EDU
Subject: HEP packages
To: mathgroup@yoda.ncsa.uiuc.EDU
Status: RO

I have recently completed, together with Alex Hsieh, a set of packages
for performing calculations common in High-Energy Physics, using
Mathematica.

Specifically, we have written the following packages:

NonCommutativeMultiply.m - General utilities for working with non-commutative
			   algebras: declaring objects as non-commutative,
			   automatically factoring out the commuting variables,
			   manually commuting specific objects, and more.
RelativisticKinematics.m - Working with four-vectors: constructing 
			   four-vectors, extracting invariant mass, energy and
			   momentum from a four-vector, calculating the 
			   dot-product of two four-vectors, boosting a 
			   four-vector in an arbitrary direction, decaying a 
			   four-vector into two four-vectors, working with
			   Mandelstam variables and more. All operations can
			   be done both symbolically and numerically.
Spinor.m -		   Working with Dirac Algebra and Lorentz indices:
			   The space-time metric g, contructing over Lorentz
			   indices, working with spinors U, Ubar, V and Vbar,
			   squaring expressions with spinors to give traces
			   over gamma-matrices, evaluating traces over gamma-
			   matrices in arbitrary space-time dimension and more.
CrossSection.m -	   Automatically evaluating cross-sections and decay-
			   widths from a matrix element squared by constructing
			   the necessary phase-space integrals, and optionally
			   evaluating them. Evaluation can be either symbolic
			   or numeric.
Class.m -		   A very general implementation of some object-
			   oriented programming tools: classes, properties and
			   inheritance.
StandardModel.m -	   A compilation of the Feyman rules of the Standard-
			   Model, together with other useful facts.

These packages, together with a small number of sample calculations are now
available for beta testing. If you are interested, write to me. Pease 
indicate explicitly if you are NOT using a Unix-based system.


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jun 25 22:27:36 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA20285
  (5.62+/IDA-1.3.1 for stevec); Mon, 25 Jun 90 22:27:35 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14727; Mon, 25 Jun 90 22:24:52 CDT
Received: by yoda.ncsa.uiuc.edu id AA20048
  (5.62+/IDA-1.3.1 for ); Mon, 25 Jun 90 19:52:51 -0500
Received: by yoda.ncsa.uiuc.edu id AA20044
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 25 Jun 90 19:52:50 -0500
Message-Id: <9006260052.AA20044@yoda.ncsa.uiuc.edu>
Date: Mon, 25 Jun 90 14:54:41 CST
From: AN123651@uthvm1.bitnet
Subject: Mathematica confusion
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Thanks to the many people who have responded to my earlier posting.
Let me see if I can be more clear, and refrain from embarassing
myself further.

When I enter the expression

      (1/x) (1/x^2)^(1/x^2 -1)

mma simplifies it to

      x^(-1 - 2 (-1 + x^(-2)))

Now, consider x = -2 (not -1 as I mistyped previously). In the first
expression, x is squared before any roots are taken, so it is natural
to expect a real answer. In the second case, a root of -2 is taken and
a complex answer is no surprise. mma's simplification effects the
choice of the branch cut.

This is not a bug. The question of branch cuts is difficult. Instead,
let me post this as a query - how can I get mma to take the cut I
want? Note that mma is not entirely consistent on this point:

      (1/x) (1/x^2)^(1/x^2 -1) /. x-> -2
and
      f[x_] := (1/x) (1/x^2)^(1/x^2 -1)
      f[-2]

return different answers.

                               E. Neely Atkinson
                               AN123651 at UTHVM1.BITNET
                               neely@mdaali.cancer.utexas.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun 28 21:36:35 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA23777
  (5.62+/IDA-1.3.1 for stevec); Thu, 28 Jun 90 21:36:34 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15918; Thu, 28 Jun 90 21:33:36 CDT
Received: by yoda.ncsa.uiuc.edu id AA23729
  (5.62+/IDA-1.3.1 for ); Thu, 28 Jun 90 20:40:30 -0500
Received: by yoda.ncsa.uiuc.edu id AA23725
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 28 Jun 90 20:40:28 -0500
Message-Id: <9006290140.AA23725@yoda.ncsa.uiuc.edu>
Date: Mon, 25 Jun 90 23:30:04 EDT
From: wsd@cs.brown.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Sqrt[x^2]
Status: RO


In[6]:= Sqrt[x^2]
Out[6]= x

why?

this leads to the rather dubious distinction:

In[13]:= f[x_] := Sqrt[x x]
In[15]:= f[-2]
Out[15]= 2

In[16]:= g[x_] = Sqrt[x x]
In[18]:= g[-2]
Out[18]= -2

as well as real problems such as E. Neely Atkinson's.  anyone want to
defend this?

wsd@cs.brown.edu

From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun 28 22:48:54 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA23843
  (5.62+/IDA-1.3.1 for stevec); Thu, 28 Jun 90 22:48:52 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA16989; Thu, 28 Jun 90 22:45:41 CDT
Received: by yoda.ncsa.uiuc.edu id AA23734
  (5.62+/IDA-1.3.1 for ); Thu, 28 Jun 90 20:40:37 -0500
Received: by yoda.ncsa.uiuc.edu id AA23730
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 28 Jun 90 20:40:35 -0500
Message-Id: <9006290140.AA23730@yoda.ncsa.uiuc.edu>
Date: Tue, 26 Jun 90 12:52:40 +0200
From: lauten@ds1.cip.physik.tu-muenchen.de
Subject: New Mathematica release?
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Our physics department wants to buy a new license for Mathematica on
a SUN SparcStation. Since recent discussion in this mailing list has
shown that there are still some serious bugs in the current release,
e.g. the ordering of transformation rules, it would be interesting to
know whether there is a new improved version of Mathematica just
around the corner. If there is one, how long will it take until it
will be available ?

MARKUS LAUTENBACHER
lauten@ds1.cip.physik.tu-muenchen.de


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun 28 23:36:57 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA23917
  (5.62+/IDA-1.3.1 for stevec); Thu, 28 Jun 90 23:36:56 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA17677; Thu, 28 Jun 90 23:33:57 CDT
Received: by yoda.ncsa.uiuc.edu id AA23744
  (5.62+/IDA-1.3.1 for ); Thu, 28 Jun 90 20:40:54 -0500
Received: by yoda.ncsa.uiuc.edu id AA23740
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 28 Jun 90 20:40:53 -0500
Message-Id: <9006290140.AA23740@yoda.ncsa.uiuc.edu>
Date: Thu, 28 Jun 90 06:54:13 EDT
From: joe@mathcs.emory.edu (Joe Christy)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Braids
Status: RO

[The braids packages and other files can be found on the
MathGroup archive in the /Symbolic/Mathematica/Packages/BRAIDS
directory. -- smc]

	I have submitted a trio of packages, SymmetricGroup.m, BraidGroup.m,
and Braids.m to the archive at ftp.ncsa.uiuc.edu. Together they do some
simple algebraic manipulations in the symmetric and braid groups, and
draw pictures of framed links, represented as braids. There is also a
notebook, WhizzoKeenBraids.ma, which demonstrates how to use the
packages to draw some pretty pictures of some interesting knots and
links.
Joe
Joe Christy         | joe@mathcs.emory.edu       | Time flies like an
Emory University    | {rutgers,gatech}!emory!joe | arrow, fruit flies
Dept of Math and CS | joe@emory.bitnet           | like bananas.
Atlanta, GA 30322   | Phone: (404) 727-7956      |


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jun 28 23:45:09 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA23929
  (5.62+/IDA-1.3.1 for stevec); Thu, 28 Jun 90 23:45:06 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA17801; Thu, 28 Jun 90 23:42:05 CDT
Received: by yoda.ncsa.uiuc.edu id AA23739
  (5.62+/IDA-1.3.1 for ); Thu, 28 Jun 90 20:40:44 -0500
Received: by yoda.ncsa.uiuc.edu id AA23735
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 28 Jun 90 20:40:43 -0500
Message-Id: <9006290140.AA23735@yoda.ncsa.uiuc.edu>
Date: Wed, 27 Jun 90 18:59:27 +0200
From: lauten@ds1.cip.physik.tu-muenchen.de
Subject: Transformation rules and Conditions
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Suppose you have a Mathematica file called "f.m" that contains the
following generic transformation rules:

f[ a_ ] := StringJoin[ "< ", ToString[ a ], " >" ]  /; ftostring

f[ a_,b_ ] := f[a] f[b]

ftostring = True

Now I give the script of a short Mathematica session using these
rules:

In[1]:= <<f.m
Out[1]= True
In[2]:= ftest = f[a,b]
Out[2]= < a > < b >
In[3]:= ftostring = False
Out[3]= False
In[4]:= ftest = f[a,b]
Out[4]= f[a] f[b]
In[5]:= ftostring = True
Out[5]= True
In[6]:= ftest
Out[6]= f[a] f[b]
In[7]:= Update[]
In[8]:= ftest
Out[8]= < a > < b >

Now the problem is the result of In[6], since I want Mathematica to
use the transformation rule for f[a_] if ftostring is True. Obviously
this only works after I do an Update[].
I know what the Mathematica handbook says in connection with Update[]
and Condition tests on page 699 and 223, but I am interested in the
three following points anyway:

1. Is there a way to avoid the Update[], since e.g. on an AT386/87 the
Update[] can take quite a time and I will have to switch the rules
several times in my particular application.

2. Can I do just a partial Update[] ? I tried Update[ftostring] but it
didn't work.

3. Can anyone (e.g. Wolfram Res. people) explain to me the deeper
meaning of "It (Update[]) should not need to be called except under
very special circumstances that very rarely occur in practice."
(Mathematica book page 699), since I am really interested in Why and
What is going on on a deeper level of understanding ?

Thanks in advance,

MARKUS


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Jul  7 01:30:30 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA05094
  (5.62+/IDA-1.3.1 for stevec); Sat, 7 Jul 90 01:30:28 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA23884; Sat, 7 Jul 90 01:28:12 CDT
Received: by yoda.ncsa.uiuc.edu id AA04394
  (5.62+/IDA-1.3.1 for ); Fri, 6 Jul 90 23:41:00 -0500
Received: by yoda.ncsa.uiuc.edu id AA04390
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 6 Jul 90 23:40:58 -0500
Message-Id: <9007070440.AA04390@yoda.ncsa.uiuc.edu>
Date: Tue, 3 Jul 90 15:14:26 MDT
From: smithw@mathnx.byu.edu (William V. Smith)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Problems resizing plots
Status: RO

Some one down the hall brought  me this problem and I thought I would ask
you people about it.  The problem seems to occur on a NeXT (1.0a software,
Jan. 1990 Mathematica kernel).  They are developing notebooks for 

honors calculus with alot of plot windows.  It seems that after they are
working for 10 or 15 minutes on the machine, suddenly plot window resizing
goes haywire.  When they try to resize a plot, the window suddenly becomes
very narrow .  Height is still adjustable, but width no longer is adjustable.  The
problem is temporarily cured by reloading Mathematica.app from an optical.
Someone have an idea on this???

smithw@mathnx.byu.edu (William V. Smith)

From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Jul  7 01:47:34 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA05127
  (5.62+/IDA-1.3.1 for stevec); Sat, 7 Jul 90 01:47:32 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA24158; Sat, 7 Jul 90 01:45:16 CDT
Received: by yoda.ncsa.uiuc.edu id AA04399
  (5.62+/IDA-1.3.1 for ); Fri, 6 Jul 90 23:41:04 -0500
Received: by yoda.ncsa.uiuc.edu id AA04395
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 6 Jul 90 23:41:03 -0500
Message-Id: <9007070441.AA04395@yoda.ncsa.uiuc.edu>
Date: Fri, 6 Jul 90 17:41:58 CDT
From: Elaine Kant <kant@SLCS.SLB.COM>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: forcing printing of error messages
Status: RO

In theory, you can force Mathematica to print all error messages instead
of just the first 3 by turning off General::stop.  However, this doesn't
seem to work, at least not in our environment (version 1.2 on a Sun4).

  "...Mathematica keeps track of all messages that are produced during a
  particular calculation, and stops printing a particular message if it
  comes up more than three times.  Whenever this happens, Mathematica
  prints the message General::stop to let you know.  If you really want
  to see all the messages that Mathematica tries to print, you can do
  this by switching off General::stop."

If we try the following,

Off[General::stop]
MathCode::syntax = "Syntax error in ``."
Do[Message[MathCode::syntax, foo], {i, 10}]

we still only get 3 messages.  What's happening?  Is this not the proper way
to see all the messages?  IS there a way?

Thanks. 
  -- Elaine 



From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jul  9 20:32:20 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA07238
  (5.62+/IDA-1.3.1 for stevec); Mon, 9 Jul 90 20:32:17 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA19995; Mon, 9 Jul 90 20:30:03 CDT
Received: by yoda.ncsa.uiuc.edu id AA07161
  (5.62+/IDA-1.3.1 for ); Mon, 9 Jul 90 18:16:06 -0500
Received: by yoda.ncsa.uiuc.edu id AA07157
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 9 Jul 90 18:16:04 -0500
Message-Id: <9007092316.AA07157@yoda.ncsa.uiuc.edu>
Date: Sun, 8 Jul 90 14:17:42 EST
From: marwan@ee.su.oz.au (Marwan Jabri)
To: stevec@yoda.ncsa.uiuc.edu
Subject: Re:  X11 driver
Status: RO

We have a Mathematica license for Sun 4 and for some reasons we were
delivered the X11 driver for Sun 3. We have been trying to get the proper
driver now for some months from the Australian distributors of Mathematica
without success (The company is in Melbourne and we are not sure if there are
still in business or playing the deads!). Is there anyway of getting the 
X11 driver through ftp?

Marwan Jabri
marwan@ee.su.oz.au




From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jul  9 21:33:53 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA07312
  (5.62+/IDA-1.3.1 for stevec); Mon, 9 Jul 90 21:33:50 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA20916; Mon, 9 Jul 90 21:31:38 CDT
Received: by yoda.ncsa.uiuc.edu id AA07166
  (5.62+/IDA-1.3.1 for ); Mon, 9 Jul 90 18:16:13 -0500
Received: by yoda.ncsa.uiuc.edu id AA07162
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 9 Jul 90 18:16:12 -0500
Message-Id: <9007092316.AA07162@yoda.ncsa.uiuc.edu>
Date: Sat, 7 Jul 90 20:08:50 +0200
From: lie@itk.unit.no
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: ParametricPlot
Status: RO

k

Plotting of several curves in ParametricPlot
--------------------------------------------

I want to make a routine that plots several curves in one window with ParametricPlot. The problem is that I don't want to specify the number of functions in advance - the routine
should detect the number. To be more specific:

Let:  h[s] be a vector where each element is a "transferfunction", 
      {h[s]}(i,j) = a(s)/b(s)  (a, b may be polynomials in s)

I want to plot each element of Abs[h[s]] in a log-log coordinate system. A simple way
is to use ParametricPlot.

   ParametricPlot[ { {d, 20 Log[10, Abs[ h[I 10^d] [[1,1]] ] ]},
                     {d, 20 Log[10, Abs[ h[I 10^d] [[2,1]] ] ]},
                     .............}, {d, dmin, dmax} ]

This is, however, rather inconvenient. I want the list of elements of h[s] to be 
made automatically. I tried the following solution:

   list={};
   Do[ list=Append[list, {d, f[i]}], {i, Dimensions[h[s]] [[1,1]] } ];
   
   ParametricPlot[ f[i_]=20 Log[10, Abs[ h[I 10^d] [[i,1]] ] ]; list,
                   {d,dmin,dmax} ]


What I actually tried was the following: I wanted to plot all the Singular values of a 
*matrix* h[I w] as a function of "frequency" w, in one plot. The function f[i_] above
thus got rather involved, and I got an error message that said that I tried to 
calculate the Singur values of a non-numeric matrix.


How should I solve my problem?

-Bernt Lie
 lie@itk.unit.no







From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Jul  9 19:45:18 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA07219
  (5.62+/IDA-1.3.1 for stevec); Mon, 9 Jul 90 19:45:15 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA19293; Mon, 9 Jul 90 19:43:03 CDT
Received: by yoda.ncsa.uiuc.edu id AA07156
  (5.62+/IDA-1.3.1 for ); Mon, 9 Jul 90 18:16:00 -0500
Received: by yoda.ncsa.uiuc.edu id AA07152
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 9 Jul 90 18:15:59 -0500
Message-Id: <9007092315.AA07152@yoda.ncsa.uiuc.edu>
Date: Mon, 9 Jul 90 12:03:19 EST
From: irh@melba.bby.oz.au (Ian R Heddle)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: AnalysisofVariance package
Status: RO


I've just been reading the 1990 Mathematica conference notes on
Data Analysis by Dave Withoff. On page 30 he mentions the
packages AnalysisofVariance and LinearRegression. We did not
receive these packages with our copy of Mathematica. Are they
available, and if so from who ?
Thanks in advance
	Ian Heddle
	irh@melba.bby.oz.au


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Jul 10 12:48:43 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA08431
  (5.62+/IDA-1.3.1 for stevec); Tue, 10 Jul 90 12:48:41 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA11559; Tue, 10 Jul 90 12:46:32 CDT
Received: by yoda.ncsa.uiuc.edu id AA08342
  (5.62+/IDA-1.3.1 for ); Tue, 10 Jul 90 11:27:14 -0500
Received: by yoda.ncsa.uiuc.edu id AA08338
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 10 Jul 90 11:27:13 -0500
Message-Id: <9007101627.AA08338@yoda.ncsa.uiuc.edu>
Date: Mon, 9 Jul 90 18:33:28 PDT
From: campbell@garnet.berkeley.edu (Robert I. Campbell)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: mathematica in the classroom
Status: RO

Some contacts you might try:
Prof Ken Ribet at UCBerkeley has been teaching freshman calc w/ Mathematica.
Prof Stan Devitt at Univ of Saskatchewan " " " " w/ MAPLE
Prof Don Small at Colby College publishes a newsletter on the subject.

					- Robert Campbell -


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Jul 10 13:45:53 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA08444
  (5.62+/IDA-1.3.1 for stevec); Tue, 10 Jul 90 13:45:50 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA29959; Tue, 10 Jul 90 13:43:30 CDT
Received: by yoda.ncsa.uiuc.edu id AA08337
  (5.62+/IDA-1.3.1 for ); Tue, 10 Jul 90 11:27:07 -0500
Received: by yoda.ncsa.uiuc.edu id AA08333
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 10 Jul 90 11:27:06 -0500
Message-Id: <9007101627.AA08333@yoda.ncsa.uiuc.edu>
Date: Sun, 8 Jul 90 14:17:42 EST
From: marwan@ee.su.oz.au (Marwan Jabri)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  X11 driver
Status: RO

We have a Mathematica license for Sun 4 and for some reasons we were
delivered the X11 driver for Sun 3. We have been trying to get the proper
driver now for some months from the Australian distributors of Mathematica
without success (The company is in Melbourne and we are not sure if there are
still in business or playing the deads!). Is there anyway of getting the 
X11 driver through ftp?

Marwan Jabri
marwan@ee.su.oz.au




From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Jul 10 14:48:14 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA08556
  (5.62+/IDA-1.3.1 for stevec); Tue, 10 Jul 90 14:48:12 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA09206; Tue, 10 Jul 90 14:46:02 CDT
Received: by yoda.ncsa.uiuc.edu id AA08353
  (5.62+/IDA-1.3.1 for ); Tue, 10 Jul 90 11:28:53 -0500
Received: by yoda.ncsa.uiuc.edu id AA08349
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 10 Jul 90 11:28:52 -0500
Message-Id: <9007101628.AA08349@yoda.ncsa.uiuc.edu>
Date: Tue, 10 Jul 90 08:21:24 EDT
From: gregor@oit.itd.umich.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica Materials for 3rd Semester Multi-Variable Calculus
Status: RO

Hello,

I am at the University of Michigan. There is a project here about ready to get under way  
which involves the creation of Mathematica materials for a 3rd semester multi-variable  
calculus course. We are wondering if there are any such materials available already  
which we could use as a springboard for our work, or possibly incorporate as-is.

Can anyone out there help us?

--Gregor


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Jul 10 15:25:27 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA08631
  (5.62+/IDA-1.3.1 for stevec); Tue, 10 Jul 90 15:25:21 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA09995; Tue, 10 Jul 90 15:23:10 CDT
Received: by yoda.ncsa.uiuc.edu id AA08358
  (5.62+/IDA-1.3.1 for ); Tue, 10 Jul 90 11:29:00 -0500
Received: by yoda.ncsa.uiuc.edu id AA08354
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 10 Jul 90 11:28:59 -0500
Message-Id: <9007101628.AA08354@yoda.ncsa.uiuc.edu>
Date: Tue, 10 Jul 90 17:05:41 +0200
From: lie@itk.unit.no
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Bug ?
Status: RO

BUG in evaluation of iteration functions?
-----------------------------------------

According to the Mathematica book, "Iteration functions such as *Table* and *Sum*, as well
as *Plot* and *Plot3D*, evaluate their arguments in a slightly complicated  way...". Then
follows a discussion of how *Table* works.

*Plot* and *Table* does, however, not evaluate the argument in the same way, as the
following example shows:

Example: (Comments and questions follow the example).
-----------------------------------------------------------------------
In[225]:= MatrixForm[h[s]]


                      1 - s         1 + 3 s
                      ------        -------
                           3             3
                      1 + s         1 + s

                           2                   2
                      5 + s         5 + 3 s + s
                      ------        ------------
                           3                3
Out[225]//MatrixForm= 1 + s            1 + s

In[226]:= Table[ sv[d_]:= N[ SingularValues[ h[ I 10^d] ] ];
          Table[sv[d][[2,i]], {i, 2}], {d, -2, 3, .5}]

Out[226]= {{7.21106, 0.0235744}, {7.21065, 0.0745382}, {7.20658, 0.235377},

>    {7.16454, 0.733152}, {4.96973, 1.34229}, {0.461212, 0.170416},

>    {0.138501, 0.0277379}, {0.0446215, 0.00282351}, {0.014139, 0.000282794},

>    {0.00447204, 0.0000282838}, {0.00141421, 0.00000282842}}

In[227]:= Plot[ sv[d_]:= N[ SingularValues[ h[I 10^d] ] ];
          Table[ sv[d][[2,i]], {i, 2}], {d, -2,3}, PlotPoints->11]

                                               d
Plot::notnum: sv[d_] := N[SingularValues[h[I 10 ]]];
     Table[sv[d][[2,i]], {i, 2}] does not evaluate to a real number at d=-2..

                                               d
Plot::notnum: sv[d_] := N[SingularValues[h[I 10 ]]];
     Table[sv[d][[2,i]], {i, 2}] does not evaluate to a real number at d=-1.5.

                                               d
Plot::notnum: sv[d_] := N[SingularValues[h[I 10 ]]];
     Table[sv[d][[2,i]], {i, 2}] does not evaluate to a real number at d=-1..

General::stop: Further output of Plot::notnum
     will be suppressed during this calculation.

Out[227]= -Graphics-

In[228]:=                        

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

The table in Out[226]  shows the singular values of h[I 10^d], d in {-2, -1.5, ..., 3}.
This will only work as long as the *outermost* iterator is evaluated first. (See
Maeder: Programming in Math..., p. 78-79). The command in In[227] was meant to plot these same singular values.

The error messages seem to indicate that in In[227], the *innermost* iterator (i of
Table) is sought evaluated *before* the *outermost* iterator (d of Plot). In that case, 
the Singular Values can not be evaluated, and sv[d][[2,i]] has no meaning.

Question: 1) Is my interpretation of the error messages correct? If so, is this a bug?
*********
          2) If it isn't a bug, what is the purpose of this feature? How can I 
             override the order of evaluation?


-Bernt Lie,
 lie@itk.unit.no

Question: In Plot: How can I make the iterator receive a value *before* the iterator in
          Table is evaluated, i.e., the way Table works.


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Jul 10 15:43:42 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA08643
  (5.62+/IDA-1.3.1 for stevec); Tue, 10 Jul 90 15:43:41 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA10399; Tue, 10 Jul 90 15:41:30 CDT
Received: by yoda.ncsa.uiuc.edu id AA08398
  (5.62+/IDA-1.3.1 for ); Tue, 10 Jul 90 12:11:02 -0500
Received: by yoda.ncsa.uiuc.edu id AA08394
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 10 Jul 90 12:11:01 -0500
Message-Id: <9007101711.AA08394@yoda.ncsa.uiuc.edu>
From: mcdonald@wmm-wks.umd.edu (Bill MacDonald)
Subject: Sqrt[x^2] "bug"
To: mathgroup@yoda.ncsa.uiuc.edu
Date: Tue, 10 Jul 90 12:23:52 EDT
Status: RO

The "bug" is that if 
f[x_] = Sqrt[x*x] and g[x_]:=Sqrt[x*x] then
f[-2] returns -2 and g[-2] returns 2.
  
Look at f with ?f .  You learn that 
f[x_] = x 
while
g[x_]:=Sqrt[x*x]  .
So that immediate evaluation causes Mathematica to say that the Sqrt[] is 
the inverse of the operation of squaring. However, in the delayed evaluation
the creators have chosen to take only the positive square root ?
-- 
William M. MacDonald
Professor of Physics
University of Maryland
Internet: mcdonald@quark.umd.edu
Bitnet:mAcdonald@cincom


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jul 12 00:39:22 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA11024
  (5.62+/IDA-1.3.1 for stevec); Thu, 12 Jul 90 00:39:21 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14171; Thu, 12 Jul 90 00:37:42 CDT
Received: by yoda.ncsa.uiuc.edu id AA10362
  (5.62+/IDA-1.3.1 for ); Thu, 12 Jul 90 00:00:39 -0500
Received: by yoda.ncsa.uiuc.edu id AA10351
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 11 Jul 90 23:59:45 -0500
Message-Id: <9007120459.AA10351@yoda.ncsa.uiuc.edu>
Date: Tue, 10 Jul 90 15:49:32 EDT
From: fran@jim.cam.nist.gov (Francis Sullivan)
To: mathgroup-adm@yoda.ncsa.uiuc.edu
Subject: Mathematica in the classroom.
Status: RO

An additional contact for Mathematica in the classroom is:

Calculus&Mathematica

H. Porta and J.J. Uhl

University of Illinois

                                  -Francis Sullivan-



From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Jul 12 01:29:26 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA11049
  (5.62+/IDA-1.3.1 for stevec); Thu, 12 Jul 90 01:29:22 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15396; Thu, 12 Jul 90 01:27:43 CDT
Received: by yoda.ncsa.uiuc.edu id AA10363
  (5.62+/IDA-1.3.1 for ); Thu, 12 Jul 90 00:00:41 -0500
Received: by yoda.ncsa.uiuc.edu id AA10355
  (5.62+/IDA-1.3.1 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 11 Jul 90 23:59:53 -0500
Message-Id: <9007120459.AA10355@yoda.ncsa.uiuc.edu>
Date: Wed, 11 Jul 90 15:35:02 +0200
From: lie@itk.unit.no
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Framed Plots
Status: RO

Framed plots with axes on the frame.
---------------------------------------

Question: How can I create framed plots with axes on the frame?? I have tried to write:

                  Show[%, Framed->True, Axes->Scaled[{0,0}] ]

    but Mathematica doesn't seem to recognize the function Scaled (which is
    supposed to scale coordinates to run from 0 to 1 in each direction).



-Bernt Lie, lie@itk.unit.no

PS: The scaled command is briefly described on p. 146 in the Mathematica book.


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Jul 28 23:13:13 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA07032
  (5.64+/IDA-1.3.4 for stevec); Sat, 28 Jul 90 23:13:09 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA18067; Sat, 28 Jul 90 23:11:53 CDT
Received: by yoda.ncsa.uiuc.edu id AA06957
  (5.64+/IDA-1.3.4 for ); Sat, 28 Jul 90 22:01:37 -0500
Received: by yoda.ncsa.uiuc.edu id AA06953
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 28 Jul 90 22:01:35 -0500
Message-Id: <9007290301.AA06953@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica packages
Date: Fri, 27 Jul 90 11:47:19 PDT
From: jacobson@cello.hpl.hp.com
Status: RO

I've heard rumors of a collection of Mathematica packages available
via anonymous ftp from somewhere at Stanford.  I solicit more
information about this.

  -- David Jacobson


From mathgroup-adm@yoda.ncsa.uiuc.edu Sun Jul 29 03:11:40 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA07805
  (5.64+/IDA-1.3.4 for stevec); Sun, 29 Jul 90 03:11:38 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA23673; Sun, 29 Jul 90 03:10:09 CDT
Received: by yoda.ncsa.uiuc.edu id AA06947
  (5.64+/IDA-1.3.4 for ); Sat, 28 Jul 90 22:01:06 -0500
Received: by yoda.ncsa.uiuc.edu id AA06943
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 28 Jul 90 22:01:04 -0500
Message-Id: <9007290301.AA06943@yoda.ncsa.uiuc.edu>
From: btbg1194@uxa.cso.uiuc.edu (Bradley T Banko)
Subject: Mathematica needs a Trig capability...
Date: Wed, 25 Jul 90 17:07:42 GMT
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Mathematica needs the capability to perform ComplexToTrig and TrigToComplex
operations with respect to only one particular angular variable.
I often get expressions like:

	cos(phi) + i sin(phi) + cos(omega)(cos(phi) + i sin(phi)), ...etc.

Also, for more fun and games, try to simplify the following expression:
(I have 8 more where this one comes from.)
                                                 2
    -1       5 Sqrt[2] Sqrt[5] (-1 + 3 Cos[theta] )
---------- + -------------------------------------- - 
6 Sqrt[Pi]        4 Sqrt[15] Sqrt[30] Sqrt[Pi]
 
  Cos[omega] + -I Sin[omega]
  -------------------------- + 
          6 Sqrt[Pi]
 
  Sqrt[3] Cos[theta] (Cos[omega] + -I Sin[omega])
  ----------------------------------------------- - 
                    4 Sqrt[Pi]
 
                            2
  Sqrt[5] (-1 + 3 Cos[theta] ) (Cos[omega] + -I Sin[omega])
  --------------------------------------------------------- - 
                         24 Sqrt[Pi]
 
  Cos[omega] + I Sin[omega]
  ------------------------- - 
         6 Sqrt[Pi]
 
  Sqrt[3] Cos[theta] (Cos[omega] + I Sin[omega])
  ---------------------------------------------- - 
                    4 Sqrt[Pi]
 
                            2
  Sqrt[5] (-1 + 3 Cos[theta] ) (Cos[omega] + I Sin[omega])
  --------------------------------------------------------
                        24 Sqrt[Pi]

Finally,... Is it possible to "cut and paste" in Mathematica on a Mac II
from Mathematica into an NCSA Telnet window running VI or Emacs?
(I would imagine that people at Wolfram would have a quick answer to this.)

Thanks!

Brad Banko
Theoretical Biophysics


--
Bradley T. Banko
Dept of Physics, Univ. of Illinois at Urbana-Champaign
btbg1194@uxa.cso.uiuc.edu

>From jacobson@cello.hpl.hp.com Fri Jul 27 13:47:18 1990
Received: from hplms2.hpl.hp.com by yoda.ncsa.uiuc.edu with SMTP id AA05175
  (5.62+/IDA-1.3.1 for stevec); Fri, 27 Jul 90 13:47:08 -0500
Received: from cello.hpl.hp.com by hplms2.hpl.hp.com with SMTP
	(15.11.1.3/15.5+IOS 3.20) id AA06142; Fri, 27 Jul 90 11:47:40 pdt
Received: from localhost by cello.hpl.hp.com with SMTP
	(15.11/15.5+IOS 3.14) id AA26559; Fri, 27 Jul 90 11:47:21 pdt
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica packages
Date: Fri, 27 Jul 90 11:47:19 PDT
Message-Id: <26557.649104439@cello.hpl.hp.com>
From: jacobson@cello.hpl.hp.com
Status: RO

I've heard rumors of a collection of Mathematica packages available
via anonymous ftp from somewhere at Stanford.  I solicit more
information about this.

  -- David Jacobson


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Aug  7 02:58:59 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA04939
  (5.64+/IDA-1.3.4 for stevec); Tue, 7 Aug 90 02:58:56 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA23462; Tue, 7 Aug 90 02:57:10 CDT
Received: by yoda.ncsa.uiuc.edu id AA04853
  (5.64+/IDA-1.3.4 for ); Tue, 7 Aug 90 01:30:51 -0500
Received: by yoda.ncsa.uiuc.edu id AA04849
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 7 Aug 90 01:30:49 -0500
Message-Id: <9008070630.AA04849@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Derivative "feature"
Date: Mon, 30 Jul 90 10:50:33 PDT
From: jacobson@cello.hpl.hp.com
Status: RO

Beware of differentiation of functions defined on more than one piece using 
"/;" operator.  

In[1]:= f[x_] := x^2 /; x <=1

In[2]:= f[x_] := 2 x -1

Plotting this shows a parabola to the left smoothly connecting to a straight 
line at x = 1.

However, if we ask for the derivative, we get a surprise:

In[3]:= f'

Out[3]= 2 & 

This is wrong for x < 1.  

Does anyone know how to write a function composed of multiple segments
that can be differentiated?  I tried to teach Mathematica how to
differentiate the If[cond,expr1,expr2] function, without success.

  -- David Jacobson



From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Aug  7 05:02:51 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA05146
  (5.64+/IDA-1.3.4 for stevec); Tue, 7 Aug 90 05:02:48 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA27079; Tue, 7 Aug 90 05:01:01 CDT
Received: by yoda.ncsa.uiuc.edu id AA04858
  (5.64+/IDA-1.3.4 for ); Tue, 7 Aug 90 01:30:58 -0500
Received: by yoda.ncsa.uiuc.edu id AA04854
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 7 Aug 90 01:30:56 -0500
Message-Id: <9008070630.AA04854@yoda.ncsa.uiuc.edu>
Date: Mon, 30 Jul 90 13:57:44 EDT
From: royster@unccvax.uncc.edu (David Royster)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Relative Speed of Mathematica on a MacII
Status: RO


I have been learning to use Mathematica on a MacII for a couple of months now.
I quite often run into problems of the speed with which Mathematica performs
its operations. For example, I wanted to compute the determinant of the 
n x n Hilbert matrix, the matrix whose ij th entry is \frac{1}{i+j-1}. I
was able to compute the determinant of the 12 x 12 matrix in a matter of 4
minutes, whereas DERIVE was able to compute the determinant of the 40 x 40
in 153 seconds. I was never able to compute the determinant of the 13 x 13
matrix in  Mathematica.

Last week we saw the form to graph using SphericalPlot3D to graph a cornucopia.
Mathematica on my Mac refused to graph the surface. I left it running all night
and all that happened was that the Mac froze---completely!

Should I be expecting this type of behavior from Mathematica on a MacII? 
Should I send the MacII back to Siberia and use something else? I would really
like to get some benchmarks with which to compare the performance on my 
machine.

Thanks,
dcroyster

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

David C. Royster               royster@unccvax.uncc.edu (128.143.109.1)
Mathematics Department         fma00dcr@unccvm.bitnet
UNC Charlotte, Charlotte NC
Augustus Moebius Wedding Band Co.---Rings to fit every finger!




From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Aug  7 05:04:50 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA05157
  (5.64+/IDA-1.3.4 for stevec); Tue, 7 Aug 90 05:04:47 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA27093; Tue, 7 Aug 90 05:03:01 CDT
Received: by yoda.ncsa.uiuc.edu id AA04868
  (5.64+/IDA-1.3.4 for ); Tue, 7 Aug 90 01:31:12 -0500
Received: by yoda.ncsa.uiuc.edu id AA04864
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 7 Aug 90 01:31:10 -0500
Message-Id: <9008070631.AA04864@yoda.ncsa.uiuc.edu>
Date: Tue, 31 Jul 90 14:42:49 CDT
From: johnsonj@phobos.mathcs.carleton.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Strange results with the Integrate function
Status: RO

     In our research this summer, many different statistical applications  
have been successfully carried out using NeXT Mathematica version 1.2, with  
the irksome exception of the following exercise:

     Exact density functions representing sums of n uniforms (on [-.5, .5])  
may be calculated exactly by means of Fourier tranforms, using the formula  
(expressed in Mathematica syntax):

     f[x_, n_Integer] :=
          (1 / Pi) * Integrate[(Sin[t / 2] / (t / 2)) ^ n * Cos[x * t],
               {t, 0, Infinity}] /; n > 1

     We are replacing the infinite expression for the upper limit by a  
calculated error function, 2 / epsilon ^ (1 / (n - 1)).  Made in the  
interest of simplification and speed, this step may not be necessary.

     The question is, why is this (relatively) straightforward integral  
impossible to express for, say, n = 2 ?  When given the input f[x, 2],  
Mathematica responds with an "Indeterminate" output.

     BUT...if we change the formula by putting an N[] function about the  
integrand, the function operates normally, and the time needed to make a  
Plot of the function f[x, 2] drops considerably, since it is possible to  
preevaluate the expression before plotting.  Still, WHY DOES THIS MAKE A  
DIFFERENCE?  There is nothing numerical in the integrand expression besides  
the n exponent, and that ought to be simplified anyway -- and if it were  
not, it would not have an indeterminate result.

     WHY?

	Jonathan Johnson, Carleton College, Northfield, MN
	(Mathematica group member Mike Tie, mtie@mathcs.carleton.edu)


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Aug  7 05:46:17 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA05298
  (5.64+/IDA-1.3.4 for stevec); Tue, 7 Aug 90 05:46:14 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA27613; Tue, 7 Aug 90 05:44:28 CDT
Received: by yoda.ncsa.uiuc.edu id AA04863
  (5.64+/IDA-1.3.4 for ); Tue, 7 Aug 90 01:31:05 -0500
Received: by yoda.ncsa.uiuc.edu id AA04859
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 7 Aug 90 01:31:03 -0500
Message-Id: <9008070631.AA04859@yoda.ncsa.uiuc.edu>
Date: Mon, 30 Jul 90 12:26:45 PDT
From: eran@THSUN1.SLAC.STANFORD.EDU
Subject: Fourier Transform Package
To: mathgroup@yoda.ncsa.uiuc.EDU
Status: RO

I am currently in the process of writing a package for performing
analytic Fourier transform with Mathematica. This package is being
written for Wolfram Research, and will be bundled with the next major
Mathematica release.
I am now seeking input from potential users as to their needs and
wants on the subject.
Particularly:

 1) What methods do you currently use?
   a) Evaluating transform numerically. (With what method and/or
   computational tools?)
   b) Consulting tables. (Which?)
   c) Working transforms from 'first principles'.
   d) Using a different symbolic algebra software for the purpose.
   (Which one?)
   e) Have written a Mathematica package. (Great! Could you enclose
   it?)

 2) Which particular classes of functions (please give specific
 examples) do you usually work with? Do you transform these functions
 analytically? If not, do you know whether an analytical formula
 exists or not?

 3) What convention for the Fourier integral do you usually use?
   a) F[f, t, w] := Integrate[f Exp[-2 Pi I t w], {t, -Infinity,
   Infinity}]
   b) F[f, t, w] := Integrate[f Exp[2 Pi I t w], {t, -Infinity,
   Infinity}]
   c) F[f, t, w] := Integrate[f Exp[-I t w], {t, -Infinity, Infinity}]
   d) F[f, t, w] := Integrate[f Exp[I t w], {t, -Infinity, Infinity}]
   e) One of the above, multiplied by an additional constant coefficient.
   f) Other?

 4) What other, related, operations would you find useful
   a) Finding Fourier Series coefficients analytically.
   b) Calculating Fourier Series coefficients numerically.
   c) Fourier Sin and Cos transforms.
   d) Others?

 5) What is your field of work?

 6) What is your favorite literature on the subject?

 7) Any other comments, suggestions, warnings, etc.?

I will send a copy of the package to anybody who answers this
questionnaire, and who so wishes.

 8) Would you be interested in becoming a beta tester for the package,
 once it is completed?

Please send your replies to
       eran@thsun1.slac.stanford.edu

Thanks,
Eran Yehudai


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Aug  7 05:48:22 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA05305
  (5.64+/IDA-1.3.4 for stevec); Tue, 7 Aug 90 05:48:19 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA27669; Tue, 7 Aug 90 05:46:31 CDT
Received: by yoda.ncsa.uiuc.edu id AA04878
  (5.64+/IDA-1.3.4 for ); Tue, 7 Aug 90 01:31:26 -0500
Received: by yoda.ncsa.uiuc.edu id AA04874
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 7 Aug 90 01:31:24 -0500
Message-Id: <9008070631.AA04874@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica Errors 386 version 1.2
Date: Tue, 07 Aug 90 09:41:21 +1000
From: Peter Horan <peter@cm.deakin.OZ.AU>
Status: RO

ERROR #1:
I sent you mail yesterday about a problem with
Hardcopy[]/HARDCOPY.BAT. However, I did not have the details.
Here they are.
When I run HARDCOPY DIS or do 
    <<dis
    Hardcopy[%]
I get the message
    Abnormal program termination: Memory Protection Fault
    CS:EIP = 000C:00010b40
`dis' is appended below. It is the output of ListPlot[] which
has been Save[]'d.
Please note that Hardcopy works with other output (eg. from
Plot3D[]),

ERROR #2:
When I do ListPlot[] points are not displayed unless
PointSize -> 0.03 or larger. e.g.
ListPlot[Point[{{x1, y1},{x2, y2},....}]] does not appear. The
axes are correct if they are turned on. Similarly,
ListPlot[Line[......]] works.

The contents of dis are as follows:
---------cut here----------------

%!
%%Creator: Mathematica
%%AspectRatio: 0.61803 
MathPictureStart
% Scaling calculations
0.02381 1.36054 0.01472 0.02247 [
[(0.1)] 0.15986 0.00222 0 1 Msboxa
[(0.2)] 0.29592 0.00222 0 1 Msboxa
[(0.3)] 0.43197 0.00222 0 1 Msboxa
[(0.4)] 0.56803 0.00222 0 1 Msboxa
[(0.5)] 0.70408 0.00222 0 1 Msboxa
[(0.6)] 0.84014 0.00222 0 1 Msboxa
[(0.7)] 0.97619 0.00222 0 1 Msboxa
[(5)] 0.01131 0.12705 1 0 Msboxa
[(10)] 0.01131 0.23939 1 0 Msboxa
[(15)] 0.01131 0.35172 1 0 Msboxa
[(20)] 0.01131 0.46406 1 0 Msboxa
[(25)] 0.01131 0.57639 1 0 Msboxa
[ -0.001 -0.001 0 0 ]
[ 1.001 0.61903 0 0 ]
] MathScale
% Start of Graphics
1 setlinecap
1 setlinejoin
newpath
%%Object: Graphics
[ ] 0 setdash
0 setgray
gsave
gsave
0.002 setlinewidth
0 0.01472 moveto
1 0.01472 lineto
stroke
0.15986 0.00847 moveto
0.15986 0.02097 lineto
stroke
0 setgray
[(0.1)] 0.15986 0.00222 0 1 Mshowa
0.29592 0.00847 moveto
0.29592 0.02097 lineto
stroke
0 setgray
[(0.2)] 0.29592 0.00222 0 1 Mshowa
0.43197 0.00847 moveto
0.43197 0.02097 lineto
stroke
0 setgray
[(0.3)] 0.43197 0.00222 0 1 Mshowa
0.56803 0.00847 moveto
0.56803 0.02097 lineto
stroke
0 setgray
[(0.4)] 0.56803 0.00222 0 1 Mshowa
0.70408 0.00847 moveto
0.70408 0.02097 lineto
stroke
0 setgray
[(0.5)] 0.70408 0.00222 0 1 Mshowa
0.84014 0.00847 moveto
0.84014 0.02097 lineto
stroke
0 setgray
[(0.6)] 0.84014 0.00222 0 1 Mshowa
0.97619 0.00847 moveto
0.97619 0.02097 lineto
stroke
0 setgray
[(0.7)] 0.97619 0.00222 0 1 Mshowa
0.02381 0 moveto
0.02381 0.61803 lineto
stroke
0.01756 0.12705 moveto
0.03006 0.12705 lineto
stroke
0 setgray
[(5)] 0.01131 0.12705 1 0 Mshowa
0.01756 0.23939 moveto
0.03006 0.23939 lineto
stroke
0 setgray
[(10)] 0.01131 0.23939 1 0 Mshowa
0.01756 0.35172 moveto
0.03006 0.35172 lineto
stroke
0 setgray
[(15)] 0.01131 0.35172 1 0 Mshowa
0.01756 0.46406 moveto
0.03006 0.46406 lineto
stroke
0 setgray
[(20)] 0.01131 0.46406 1 0 Mshowa
0.01756 0.57639 moveto
0.03006 0.57639 lineto
stroke
0 setgray
[(25)] 0.01131 0.57639 1 0 Mshowa
grestore
grestore
0 0 moveto
1 0 lineto
1 0.618034 lineto
0 0.618034 lineto
closepath
clip
newpath
0 setgray
gsave
gsave
0.004 setlinewidth
0.02381 0.01472 moveto
0.15986 0.05258 lineto
0.29592 0.06206 lineto
0.43197 0.07578 lineto
0.56803 0.10049 lineto
0.70408 0.13357 lineto
0.84014 0.33573 lineto
0.97619 1.55231 lineto
stroke
0.02381 0.01472 moveto
0.15986 0.0492 lineto
0.29592 0.06416 lineto
0.43197 0.07757 lineto
0.56803 0.09354 lineto
0.70408 0.14035 lineto
0.84014 0.29292 lineto
0.97619 1.72971 lineto
stroke
0.02381 0.01472 moveto
0.15986 0.0443 lineto
0.29592 0.06278 lineto
0.43197 0.08044 lineto
0.56803 0.0926 lineto
0.70408 0.14652 lineto
0.84014 0.26867 lineto
0.97619 3.69698 lineto
stroke
0.02381 0.01472 moveto
0.15986 0.06042 lineto
0.29592 0.06128 lineto
0.43197 0.0757 lineto
0.56803 0.09951 lineto
0.70408 0.1395 lineto
0.84014 0.24426 lineto
0.97619 2.25076 lineto
stroke
0.02381 0.01472 moveto
0.15986 0.05597 lineto
0.29592 0.07083 lineto
0.43197 0.08251 lineto
0.56803 0.10293 lineto
0.70408 0.15091 lineto
0.84014 0.25367 lineto
0.97619 5.30671 lineto
stroke
0.02381 0.01472 moveto
0.15986 0.0474 lineto
0.29592 0.0635 lineto
0.43197 0.07212 lineto
0.56803 0.09685 lineto
0.70408 0.14807 lineto
0.84014 0.3351 lineto
0.97619 3.10699 lineto
stroke
0.02381 0.01472 moveto
0.15986 0.05136 lineto
0.29592 0.06013 lineto
0.43197 0.08808 lineto
0.56803 0.09617 lineto
0.70408 0.15339 lineto
0.84014 0.26884 lineto
0.97619 6.18006 lineto
stroke
0.02381 0.01472 moveto
0.15986 0.04769 lineto
0.29592 0.05937 lineto
0.43197 0.07788 lineto
0.56803 0.10776 lineto
0.70408 0.14501 lineto
0.84014 0.28565 lineto
stroke
0.02381 0.01472 moveto
0.15986 0.0578 lineto
0.29592 0.05782 lineto
0.43197 0.07248 lineto
0.56803 0.09655 lineto
0.70408 0.16965 lineto
0.84014 0.45957 lineto
stroke
0.02381 0.01472 moveto
0.15986 0.0541 lineto
0.29592 0.06017 lineto
0.43197 0.08065 lineto
0.56803 0.11142 lineto
0.70408 0.2381 lineto
0.84014 2.41422 lineto
stroke
0.02381 0.01472 moveto
0.15986 0.05256 lineto
0.29592 0.06632 lineto
0.43197 0.08874 lineto
0.56803 0.11721 lineto
0.70408 0.27084 lineto
0.84014 7.00296 lineto
stroke
0.02381 0.01472 moveto
0.15986 0.05054 lineto
0.29592 0.06732 lineto
0.43197 0.08488 lineto
0.56803 0.14505 lineto
0.70408 0.54387 lineto
stroke
0.02381 0.01472 moveto
0.15986 0.05703 lineto
0.29592 0.06625 lineto
0.43197 0.09412 lineto
0.56803 0.17113 lineto
0.70408 3.02084 lineto
stroke
0.02381 0.01472 moveto
0.15986 0.0641 lineto
0.29592 0.06542 lineto
0.43197 0.11169 lineto
0.56803 0.19959 lineto
0.70408 10.2614 lineto
stroke
0.02381 0.01472 moveto
0.15986 0.05343 lineto
0.29592 0.07059 lineto
0.43197 0.12167 lineto
0.56803 0.33076 lineto
stroke
grestore
grestore
% End of Graphics
MathPictureEnd
-----------cut here---------------

Peter Horan
peter@aragorn.cm.deakin.oz


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Aug  7 03:55:28 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA05016
  (5.64+/IDA-1.3.4 for stevec); Tue, 7 Aug 90 03:55:25 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA25996; Tue, 7 Aug 90 03:53:39 CDT
Received: by yoda.ncsa.uiuc.edu id AA04873
  (5.64+/IDA-1.3.4 for ); Tue, 7 Aug 90 01:31:19 -0500
Received: by yoda.ncsa.uiuc.edu id AA04869
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 7 Aug 90 01:31:17 -0500
Message-Id: <9008070631.AA04869@yoda.ncsa.uiuc.edu>
From: fed!m1ejb00@uunet.UU.NET
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Cholesky Decomposition
Date: Wed, 01 Aug 90 17:14:46 -0400
Status: RO

I have the following problem:

I am looking for a matrix R such that
A = R`R, where A is a positive definite symmetric matrix.

This is called the Cholesky decomposition in most linear algebra texts.
How can I do such a thing, symbolically, in Mathematica.

I thought that decomposing with:

eigval=Eigensystem[A]

would do the trick since, if Q are the eigenvalues and L is a diagonal
matrix of eigenvectors, then:

A = Q L Q`, and one can take the square root of L to get

A=R`R, where R=Sqrt[L] Transpose[Q].

However, this identity doesn't work in Mathematica, although the
manual says it should. (I even tried  both permutations with
Transpose, in case I got row eigenvectors instead of column
eigenvectors.)

Does anyone have suggestions.
Thank you.

Eric Bartelsman
email: m1ejb00@fed.FRB.GOV
(202) 452-2530




From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Aug  8 04:43:34 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA06886
  (5.64+/IDA-1.3.4 for stevec); Wed, 8 Aug 90 04:43:31 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA05389; Wed, 8 Aug 90 04:41:47 CDT
Received: by yoda.ncsa.uiuc.edu id AA06855
  (5.64+/IDA-1.3.4 for ); Wed, 8 Aug 90 02:09:24 -0500
Received: by yoda.ncsa.uiuc.edu id AA06851
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 8 Aug 90 02:09:23 -0500
Message-Id: <9008080709.AA06851@yoda.ncsa.uiuc.edu>
Date: Tue, 7 Aug 90 17:52:41 -0400
From: fink@acf5.NYU.EDU (Howard Fink)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: 386 Hardcopy error
Status: RO

I too got the memory error using Hardcopy, but only occasionally.
It's my belief that the error is due to insufficient memory in the 
printer.  I have a 640k laserjet II, and the install program for 
mathematica 386 calls for one meg of memory in the printer.
	Perhaps when Hardcopy tries to image an area that's more than
the standard graphics area the memory required exeeds that in the printer.

Howard Fink
fink@acf5.nyu.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Aug  8 05:30:08 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA06921
  (5.64+/IDA-1.3.4 for stevec); Wed, 8 Aug 90 05:30:06 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA06033; Wed, 8 Aug 90 05:28:23 CDT
Received: by yoda.ncsa.uiuc.edu id AA06850
  (5.64+/IDA-1.3.4 for ); Wed, 8 Aug 90 02:09:16 -0500
Received: by yoda.ncsa.uiuc.edu id AA06846
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 8 Aug 90 02:09:15 -0500
Message-Id: <9008080709.AA06846@yoda.ncsa.uiuc.edu>
Date: Tue, 7 Aug 90 08:40:19 EDT
From: zaccone@sol.bucknell.edu (Rick Zaccone)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Cornucopia
Status: RO

A couple of weeks ago I asked how to produce a graph of a cornucopia.
Several people respond (thanks).  I've played around with it a bit,
and this seems to produce the best result.

<<ParametricPlot3D.m

SphericalPlot3D[Sin[theta] 1.5^phi,
{theta, -1, Pi, Pi/24},
{phi, 0, 2 Pi, Pi/24}, ViewPoint->{0, 1.8, -3.6},
Boxed -> False
]

Be patient!  It takes about 40 minutes on a Mac IIci.  It also needs a
5MB Multifinder partition.  Get rid of Pi/24 if you don't have enough
memory.  Mathematica may quietly die if it runs out of memory.

Rick Zaccone
zaccone@sol.bucknell.edu



From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Aug 14 19:46:48 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA13372
  (5.64+/IDA-1.3.4 for stevec); Tue, 14 Aug 90 19:46:47 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA06738; Tue, 14 Aug 90 19:44:59 CDT
Received: by yoda.ncsa.uiuc.edu id AA13336
  (5.64+/IDA-1.3.4 for ); Tue, 14 Aug 90 18:49:44 -0500
Received: by yoda.ncsa.uiuc.edu id AA13332
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 14 Aug 90 18:49:43 -0500
Message-Id: <9008142349.AA13332@yoda.ncsa.uiuc.edu>
Date: Sun, 12 Aug 90 21:43 EDT
From: "Lawrence M. Seiford, IEOR, UMass, (413) 545-2851."
 <SEIFORD@ecs.umass.edu>
Subject: Video course on Mathematica
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

The following may be of interest:

The Video Instructional Program of the College of Engineering at
the University of Massachusetts is offering a two day course -
"Mathematica for Engineers: Numeric, Symbolic and Graphical Computation" 
on August 15-16, 1990 from 11:00am to 5:00pm EST.
The course will be broadcast live over the NTU Satellite Network and will
provide an intensive introduction to Mathematica.

For further information, contact Merilee Hill, Video Instructional Program, 
University of Massachusetts, 
phone: (413) 545-0063
FAX:   (413) 545-1277
email:  MHILL@UMAECS.edu



From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Aug 14 20:43:33 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA13463
  (5.64+/IDA-1.3.4 for stevec); Tue, 14 Aug 90 20:43:31 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA07543; Tue, 14 Aug 90 20:41:48 CDT
Received: by yoda.ncsa.uiuc.edu id AA13325
  (5.64+/IDA-1.3.4 for ); Tue, 14 Aug 90 18:49:17 -0500
Received: by yoda.ncsa.uiuc.edu id AA13321
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 14 Aug 90 18:49:16 -0500
Message-Id: <9008142349.AA13321@yoda.ncsa.uiuc.edu>
Date: Thu, 9 Aug 90 17:38:55 CDT
From: johnsonj@phobos.mathcs.carleton.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Is N[10^-11,16] = a. 99999999999999e-12 a known bug?
Status: RO

There is a curious bug in the N[] function, involving (as far as I can tell)
only calculations at sixteen decimal places.  I did a quick check with

  Table[Table[{i, j, N[10^-i, j]}, {j, 1, 2 * i}], {i, 1, 50}]

and got errors for i = {11, 20, 25, 32, 36, 40}, all at i = 16.

Is this a bug in the most recent release?  (If so, better let Wolfram know!)
Also, is there a way around it besides avoiding the use of sixteen?  It just
so happens that CForm[N[x, 16]] is absolutely ideal for sending data to a C
program with double precision reals...

     Jonathan
     johnsonj@mathcs.carleton.edu

     Mathematica user Mike Tie, mtie@mathcs.carleton.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Aug 14 21:41:29 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA13584
  (5.64+/IDA-1.3.4 for stevec); Tue, 14 Aug 90 21:41:27 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA07785; Tue, 14 Aug 90 21:39:43 CDT
Received: by yoda.ncsa.uiuc.edu id AA13341
  (5.64+/IDA-1.3.4 for ); Tue, 14 Aug 90 18:49:51 -0500
Received: by yoda.ncsa.uiuc.edu id AA13337
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 14 Aug 90 18:49:50 -0500
Message-Id: <9008142349.AA13337@yoda.ncsa.uiuc.edu>
Date: Tue, 14 Aug 90 14:09:56 EDT
From: dmg@dash.mitre.org (David M Goblirsch)
To: steve@yoda.ncsa.uiuc.edu
Subject: Mathematica
Status: RO

[If you are interested in the applications in the message below,
please contact the sender. -smc]

Hello,

	Your name was given to me by Dr. Richard Fateman at Berkeley.
He said that you had been helpful to him in locating Mathematica
libraries. My personal interest is in signal processing; in
particular, speech coding and processing.  I am not really looking for
packages; I have written much of what I need myself.  My goal is to
find out who else is writing Mathematica stuff for speech/signal
processing who might want to share ideas.  Do you know of anyone?
Perhaps yourself?  Thanks for your time.

David M. Goblirsch
dmgob@mitre.org
(703) 883-5450

The MITRE Corporation
Washington C3I Division
7525 Colshire Drive
McLean, VA 22102-3481


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Aug 14 21:54:06 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA13618
  (5.64+/IDA-1.3.4 for stevec); Tue, 14 Aug 90 21:54:05 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA08025; Tue, 14 Aug 90 21:52:22 CDT
Received: by yoda.ncsa.uiuc.edu id AA13330
  (5.64+/IDA-1.3.4 for ); Tue, 14 Aug 90 18:49:25 -0500
Received: by yoda.ncsa.uiuc.edu id AA13326
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 14 Aug 90 18:49:24 -0500
Message-Id: <9008142349.AA13326@yoda.ncsa.uiuc.edu>
Date: Fri, 10 Aug 90 13:39:31 MDT
From: smithw@mathnx.byu.edu (William V. Smith)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Bug in Integrate?
Status: RO

This problem came up in some instructional materials being developed
here. If any of you know what's going on here let me know.  I told
the person who handed it to me, that it might be related to the rather
awkward way Mathematica handles square roots.  So, try doing
this integration problem:

In[1]:=

  a Integrate[Sqrt[(1-Cos[theta])^2+Sin[theta]^2],{theta,0,2 Pi}]

Out[1]:=

    0

(*this is incorrect*)

In[2]:=

  a NIntegrate[Sqrt[(1-Cos[theta])^2+Sin[theta]^2],{theta,0,2 Pi}]

Out[2]:=

   8. a

(*this is correct*)

Date: Fri, 10 Aug 90 23:24:01 MDT
From: smithw@mathnx.byu.edu (William V. Smith)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Another mathematica bug?

Whoops! I just got a chance to look at this one again and it appears
that NEITHER Integrate nor NIntegrate give the correct answer.  I
get 4aSqrt[2] working it out by hand.  Sorry about that.  Its been
a busy day.  Somebody want to check this?


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Aug 15 19:50:31 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA15019
  (5.64+/IDA-1.3.4 for stevec); Wed, 15 Aug 90 19:50:29 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA22003; Wed, 15 Aug 90 19:48:46 CDT
Received: by yoda.ncsa.uiuc.edu id AA14931
  (5.64+/IDA-1.3.4 for ); Wed, 15 Aug 90 18:17:47 -0500
Received: by yoda.ncsa.uiuc.edu id AA14927
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 15 Aug 90 18:17:46 -0500
Message-Id: <9008152317.AA14927@yoda.ncsa.uiuc.edu>
Date: Wed, 15 Aug 90 16:01:35 CDT
From: johnsonj@phobos.mathcs.carleton.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: The N[10^-11,16] bug: machine and version information
Status: RO

You responded to my original question with a counter question:

	"What machine and what version...?"

GOOD question.  I am using Mathematica on the NeXT, NeXT Release 1.0 (Kernel
version 1.2, Front End version 1.2).

I apologize for the oversight.


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Aug 15 20:54:22 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA15145
  (5.64+/IDA-1.3.4 for stevec); Wed, 15 Aug 90 20:54:20 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA22993; Wed, 15 Aug 90 20:52:37 CDT
Received: by yoda.ncsa.uiuc.edu id AA14936
  (5.64+/IDA-1.3.4 for ); Wed, 15 Aug 90 18:17:55 -0500
Received: by yoda.ncsa.uiuc.edu id AA14932
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 15 Aug 90 18:17:53 -0500
Message-Id: <9008152317.AA14932@yoda.ncsa.uiuc.edu>
From: wri!pea@uunet.uu.net
Date: Wed, 15 Aug 90 17:09:52 CDT
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Position Available
Status: RO

                   SOFTWARE QUALITY ASSURANCE MANAGER


     Wolfram Research, Inc. is the developer of Mathematica, a system for
doing mathematics by computer. We have an opening for a Software Quality
Assurance Manager to further develop and implement a software quality
assurance plan.

     This position requires a mathematics/computer science background, and
2-5 years experience with a software company. Management and previous SQA
experience are preferred.

     Wolfram Research, Inc. is located in Champaign, Illinois, and currently
has over 100 employees. For consideration, send resume to:

     Wolfram Research, Inc.
     100 Trade Center Drive
     Champaign, IL 61820 

     FAX: 217-398-0747
     Email: resumes@wri.com




From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Aug 16 00:33:50 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA16221
  (5.64+/IDA-1.3.4 for stevec); Thu, 16 Aug 90 00:33:49 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA26918; Thu, 16 Aug 90 00:32:03 CDT
Received: by yoda.ncsa.uiuc.edu id AA15268
  (5.64+/IDA-1.3.4 for ); Wed, 15 Aug 90 21:38:04 -0500
Received: by yoda.ncsa.uiuc.edu id AA15264
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 15 Aug 90 21:38:02 -0500
Message-Id: <9008160238.AA15264@yoda.ncsa.uiuc.edu>
Date: Wed, 15 Aug 90 10:32:05 PDT
From: decide!bobk@uunet.UU.NET (Bob Korsan)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Bug in Integrate?
Status: RO

You write

----- Begin Included Message -----

>From saxony!uunet!yoda.ncsa.uiuc.edu!mathgroup-adm Tue Aug 14 20:59:55 1990
From: uunet!mathnx.byu.edu!smithw (William V. Smith)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Bug in Integrate?

This problem came up in some instructional materials being developed
here. If any of you know what's going on here let me know.  I told
the person who handed it to me, that it might be related to the rather
awkward way Mathematica handles square roots.  So, try doing
this integration problem:

In[1]:=

  a Integrate[Sqrt[(1-Cos[theta])^2+Sin[theta]^2],{theta,0,2 Pi}]

Out[1]:=

    0

(*this is incorrect*)

In[2]:=

  a NIntegrate[Sqrt[(1-Cos[theta])^2+Sin[theta]^2],{theta,0,2 Pi}]

Out[2]:=

   8. a

(*this is correct*)

Date: Fri, 10 Aug 90 23:24:01 MDT
From: smithw@mathnx.byu.edu (William V. Smith)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Another mathematica bug?

Whoops! I just got a chance to look at this one again and it appears
that NEITHER Integrate nor NIntegrate give the correct answer.  I
get 4aSqrt[2] working it out by hand.  Sorry about that.  Its been
a busy day.  Somebody want to check this?


----- End Included Message -----

Well, you are correct, the trouble is with Sqrt. If you look at the
integrand and simplify

In[1]:=Simplify[Sqrt[(1-Cos[t])^2+Sin[t]^2]/.Sin[t]^2->1-Cos[t]^2]

Out[1]:=Sqrt[2 - 2 Cos[t]]

and then

In[2]:=Integrate[Sqrt[1-Cos[t]],t]

Out[2]:=

      -2 Sqrt[2]
-----------------------
                  2
            Sin[t]
Sqrt[1 + -------------]
                     2
         (1 + Cos[t])

If you plot this you will notice that since Mathematica
always (EVEN WHEN IT SHOULDN'T) takes the positive
square root, the result is always negative in the
interval [0,2Pi]. Thus, the integrand evaluated at
both end points is the same and subtracts to zero.
This is a MAJOR BUG in version 1.2.1 and should be
corrected immediately.

Peace/Bob

===============================================================================
|    "The range of what we think and do     | Bob Korsan                      |
|     is limited by what we fail to notice. | Decisions, Decisions!           |
|     And because we fail to notice that we | 2136 Lyon Avenue                |
|     fail to notice there is little we can | Belmont, CA 94002-1639          |
|     do to change until we notice how      | 1(415) 595-1206                 |
|     failing to notice shapes our thoughts | bobk@decide.UUCP                |
|     and deeds."                           | korsan@pa.reuter.com            |
|                 -- R. D. Laing            | {sun,uunet}!saxony!decide!bobk  |
===============================================================================


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Aug 16 05:03:21 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA16510
  (5.64+/IDA-1.3.4 for stevec); Thu, 16 Aug 90 05:03:19 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA03336; Thu, 16 Aug 90 05:01:38 CDT
Received: by yoda.ncsa.uiuc.edu id AA16469
  (5.64+/IDA-1.3.4 for ); Thu, 16 Aug 90 03:19:43 -0500
Received: by yoda.ncsa.uiuc.edu id AA16465
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 16 Aug 90 03:19:41 -0500
Message-Id: <9008160819.AA16465@yoda.ncsa.uiuc.edu>
From: wri!ab@uunet.uu.net
Date: Thu, 16 Aug 90 01:20:02 CDT
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: N[10^-11,16] 
Status: RO

Mathematica (sun4) 2.0pre-alpha (August 15, 1990)
Copyright 1988,1989,1990 Wolfram Research, Inc.

In[3]:= N[10^-11,16]

             -11
Out[3]= 1. 10

---------------
In[2]:=   Table[Table[{i, j, N[10^-i, j]}, {j, 1, 2 * i}], {i, 1, 50}]
Produced a long long output where everything was OK.


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Aug 16 05:55:53 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA16574
  (5.64+/IDA-1.3.4 for stevec); Thu, 16 Aug 90 05:55:51 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA04167; Thu, 16 Aug 90 05:54:10 CDT
Received: by yoda.ncsa.uiuc.edu id AA16477
  (5.64+/IDA-1.3.4 for ); Thu, 16 Aug 90 03:20:35 -0500
Received: by yoda.ncsa.uiuc.edu id AA16473
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 16 Aug 90 03:20:34 -0500
Message-Id: <9008160820.AA16473@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: PointSize Problem
Date: Thu, 16 Aug 90 17:26:39 +1000
From: Peter Horan <peter@cm.deakin.OZ.AU>
Status: RO

I got no reaction to ERROR #2 last week:

>Subject: Mathematica Errors 386 version 1.2

>ERROR #1:
[ This one deleted. Referred to an error in hardcopy. ]
>ERROR #2:
>When I do ListPlot[] points are not displayed unless
>PointSize -> 0.03 or larger. e.g.
>ListPlot[Point[{{x1, y1},{x2, y2},....}]] does not appear. The
>axes are correct if they are turned on. Similarly,
>ListPlot[Line[......]] works.

Peter Horan
peter@aragorn.cm.deakin.oz


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Aug 16 16:05:40 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA17070
  (5.64+/IDA-1.3.4 for stevec); Thu, 16 Aug 90 16:05:38 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA19234; Thu, 16 Aug 90 16:03:56 CDT
Received: by yoda.ncsa.uiuc.edu id AA17017
  (5.64+/IDA-1.3.4 for ); Thu, 16 Aug 90 14:28:42 -0500
Received: by yoda.ncsa.uiuc.edu id AA17013
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 16 Aug 90 14:28:41 -0500
Message-Id: <9008161928.AA17013@yoda.ncsa.uiuc.edu>
Date: Thu, 16 Aug 90 14:12:17 -0400
From: blachman%gtewd.dnet@gte.com (NELSON M. BLACHMAN)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Bug in Integrate?
Status: RO

  Using the well knwon formula for the sine of half of an angle, I notice that
Integrate[ Sqrt[(1 - Cos[theta])^2 + Sin[theta]^2 ], {theta, 0, 2 Pi}] = 
Integrate[ Sqrt[2 - 2 Cos[theta] ], {theta, 0, 2 Pi}] = 
Integrate[ 2 Sin[theta/2], {theta, 0, 2 Pi}] = 
Integrate[ 4 Sin[theta/2], {theta/2, 0, Pi}] = 
Integrate[ 4 Sin[phi], {phi, 0, Pi}] = -4 Cos[Pi] + 4 Cos[0] = 8 .

  There seems to be nothing wrong with NIntegrate.  Why does Integrate get 
the value 0??  It's troubles could be sured by a high-school course in 
trigonometry so that it might carry out the foregoing simplification.  

  A different problem:  We recently got VAX-VMS Mathematica but haven't figured 
out yet how to get its Edit...[ ] features to work; the suggestions in the 
User's Guide regarding assigning EDITOR the value EDIT/EDT, etc., don't succeed.

					Nelson M. Blachman
					blachman%gtewd.dnet@gte.com
					GTE Government Systems Corp.
					Mountain View, California


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Aug 16 23:47:04 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA17366
  (5.64+/IDA-1.3.4 for stevec); Thu, 16 Aug 90 23:47:02 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA26156; Thu, 16 Aug 90 23:45:21 CDT
Received: by yoda.ncsa.uiuc.edu id AA17337
  (5.64+/IDA-1.3.4 for ); Thu, 16 Aug 90 21:13:33 -0500
Received: by yoda.ncsa.uiuc.edu id AA17333
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 16 Aug 90 21:13:32 -0500
Message-Id: <9008170213.AA17333@yoda.ncsa.uiuc.edu>
Date: Thu, 16 Aug 90 16:22:14 PDT
From: eran@THSUN1.SLAC.STANFORD.EDU
Subject: Mathematica Help Package
To: mathgroup@yoda.ncsa.uiuc.EDU
Status: RO

Variable Symbols Inc. has just completed the development of
Mathematica Package that extends the on-line help facilities of
Mathematica. The package is designed to run under Unix.

The package provides, among other things,
  1) Complete categorization of the built-in commands in Mathematica
  2) For each built-in command in Mathematica: 
    a) Extended usage message
    b) Example(s) of usage
    c) Reference to related commands
    d) Templates for using the command
  3) Support for user notes

The package uses the same information provided by our HyperCard based
Mathematica Help Stack.

We are now looking for people to beta-test the package.
Ready for beta testing is the information relating to all the built-in
Mathematica commands starting with the letters A-C. Additional
sections of the Help Package will be made available to beta-testers in
the near future.

If you are interested, please answer the enclosed questionnaire, and
send to
	eran@thsun1.slac.stanford.edu

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

1) How long have you been using Mathematica
 a) Less than a week
 b) A week to a month
 c) A month to 3 months
 d) 3 months to a year
 e) More than a year

2) How much do you use Mathematica
 a) Less than two hours a week
 b) 2 to 8 hours a week
 c) 8 to 24 hours a week
 d) More than 24 hours a week

3) If you have used Mathematica, what have you done with it?
 a) Used interactively (built-in functions only)
 b) Used interactively (built-in functions and bundled packages)
 c) Written your own functions
 d) Written your own packages/notebooks

4) At what level of expertise would you place yourself?
 a) Novice
 b) Intermediate
 c) Expert

5) What are the things you like best about Mathematica?

6) What are the things you like least about Mathematica?

7) On what platform do you usually run Mathematica?
 a) Computer make and model?
 b) Memory?
 c) Hard-drive (how much free space is available now?)
 d) How many other users are typically using the same system?

8) Who paid for the Mathematica you are currently using?
 a) Contributed
 b) You personally
 c) A work-place budget controlled by you personally
 d) A departmental budget
 e) An institution-wide budget
 f) Bundled (NeXT or Apollo)

9) How much (to your knowledge) was paid for the copy of Mathematica
you are usually using?

10) If the help package was to suit your needs IDEALLY, how much, in
your estimate, would people around you be willing to pay for it?
 a) Less than $50
 a) $50-$100
 b) $100-$250
 c) $250-$400
 d) More than $400

11) What is your field of work?

12) What type of institute do you usually use Mathematica in?
 a) Privately
 b) University (student)
 c) University (faculty or staff)
 d) Government research institute
 e) Private company

13) How many people in your company/department use Mathematica?

14) What features would you like to see in a help package?

15) How much time do you anticipate being able to dedicate to beta
    testing?
 a) For initial study?
 b) As part of your everyday use of Mathematica?

16) Would you be interested in information about Variable Symbols
    Inc., its products and services?

17) Anything else you wanted to tell us?



From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Aug 21 02:36:03 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA00998
  (5.64+/IDA-1.3.4 for stevec); Tue, 21 Aug 90 02:36:01 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15317; Tue, 21 Aug 90 02:34:26 CDT
Received: by yoda.ncsa.uiuc.edu id AA00934
  (5.64+/IDA-1.3.4 for ); Tue, 21 Aug 90 01:18:19 -0500
Received: by yoda.ncsa.uiuc.edu id AA00930
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 21 Aug 90 01:18:17 -0500
Message-Id: <9008210618.AA00930@yoda.ncsa.uiuc.edu>
Date: Mon, 20 Aug 90 17:48:34 CDT
From: John Mitchell <mitchell@pico.uchicago.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Possible Collect bug
Status: RO


I would like to relate a recent calculation I ran across which I believe
represents a bug in Mathematica 1.2.1 (Macintosh II version).  I have
not seen this bug reported elsewhere, but it may have been.  The sample
ouput below shows a comparison of Collect with Factor on what seems like
a straightforward expression.  Note, however, that two different answers
result.  I would appreciate anyone's comments on this.

(Note that this output has been "cut and pasted" from Mathematica
into a word-processing program before transfer, explaining the
missning In[##] and Out[##] )



expr = -((-1)^(2n) y^2)/8 - ((-1)^(-1 + 2n) y^2)/8 + ((-1)^(1 + 2n) y^2)/8



       2 n  2              -1 + 2 n   2               1 + 2 n   2
-((-1)     y )         (-1)          y            (-1)         y
-------------   -     -----------------    +     -----------------
      8                      8                          8


Collect[expr,y]
 
        2 n  2
-3 (-1)     y
-------------
      8

(* This is incorrect *)


Factor[expr]

       2 n  2
-((-1)     y )
-------------
       8

(* This is correct  *)


*****************************

       John Mitchell
       Univ. of Chicago
       5735 South Ellis Ave.
       Chicago, IL  60637
       (312) 702-7253
       mitchell@pico.uchicago.edu




From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Aug 23 21:22:52 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA03436
  (5.64+/IDA-1.3.4 for stevec); Thu, 23 Aug 90 21:22:50 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA07533; Thu, 23 Aug 90 21:21:16 CDT
Received: by yoda.ncsa.uiuc.edu id AA03355
  (5.64+/IDA-1.3.4 for ); Thu, 23 Aug 90 20:17:26 -0500
Received: by yoda.ncsa.uiuc.edu id AA03351
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 23 Aug 90 20:17:25 -0500
Message-Id: <9008240117.AA03351@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Possible Collect bug 
Date: Thu, 23 Aug 90 13:33:02 +1000
From: Peter Horan <peter@cm.deakin.OZ.AU>
Status: RO

Fcc: 
- - --------

Re:
       2 n  2              -1 + 2 n   2               1 + 2 n   2
-((-1)     y )         (-1)          y            (-1)         y
-------------   -     -----------------    +     -----------------
      8                      8             

I got the same incorrect result on a 386 Compatible. I traced it to
the middle term which lost a minus sign
        
Collect[((-1)^(-1+2 n) y^2, y]

gives 
     2 n   2
 (-1)     y
------------      Wrong sign.
       8             

Peter Horan
peter@aragorn.cm.deakin.oz      


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Aug 23 22:17:36 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA03504
  (5.64+/IDA-1.3.4 for stevec); Thu, 23 Aug 90 22:17:35 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA08346; Thu, 23 Aug 90 22:16:03 CDT
Received: by yoda.ncsa.uiuc.edu id AA03370
  (5.64+/IDA-1.3.4 for ); Thu, 23 Aug 90 20:17:53 -0500
Received: by yoda.ncsa.uiuc.edu id AA03366
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 23 Aug 90 20:17:51 -0500
Message-Id: <9008240117.AA03366@yoda.ncsa.uiuc.edu>
Subject: Plotting Experimental Data
To: att!mathgroup
Date: Tue, 21 Aug 90 11:27:05 EDT
From: Avi Y. Feldblum <pruxk!ayf>
Status: RO

Hello all,

I am a novice Mathematica user, and could use some help from some of you
more experienced users out there. Here is what I am trying to do:

I have a file which contains experimental data that I've taken. I have a
mathematical function that I wish to compare and fit the data to. I can
read in the data from the file into a list. I've defined the function,
and can display a graph of the function. My problem (currently) is how
to plot the data. The x-values are N*(step variable), the y-values are
from the data file. I can generate a list of each, but I don't know how
to generate the form {{x1,y1},{x2,y2},..} that I think I need to plot
the data.

I am running on a MacIIcx. If anyone has Mathematica Notebook examples
that do anything like this I would appreciate it. If anyone is willing
to answer simple questions by email or phone, please let me know.

Thanks in advance for any help.


-- 
Avi Feldblum
ayf@pruxk.att.com   or  avi_feldblum@att.com
609-639-2474


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Aug 23 23:04:56 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA03694
  (5.64+/IDA-1.3.4 for stevec); Thu, 23 Aug 90 23:04:54 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA09096; Thu, 23 Aug 90 23:03:14 CDT
Received: by yoda.ncsa.uiuc.edu id AA03365
  (5.64+/IDA-1.3.4 for ); Thu, 23 Aug 90 20:17:45 -0500
Received: by yoda.ncsa.uiuc.edu id AA03361
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 23 Aug 90 20:17:43 -0500
Message-Id: <9008240117.AA03361@yoda.ncsa.uiuc.edu>
Date: Tue, 21 Aug 90 13:25:00 -0400
From: fink@acf5.NYU.EDU (Howard Fink)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Possible Collect bug II
Status: RO


The following are the findings of John Mitchell reporting to mathgroup
August 21.


expr = -((-1)^(2n) y^2)/8 - ((-1)^(-1 + 2n) y^2)/8 + ((-1)^(1 + 2n) y^2)/8



       2 n  2              -1 + 2 n   2               1 + 2 n   2
-((-1)     y )         (-1)          y            (-1)         y
-------------   -     -----------------    +     -----------------
      8                      8                          8


Collect[expr,y]
 
        2 n  2
-3 (-1)     y
-------------
      8

(* This is incorrect *)


Factor[expr]

       2 n  2
-((-1)     y )
-------------
       8

(* This is correct  *)


*****************************

       John Mitchell
       Univ. of Chicago
       5735 South Ellis Ave.
       Chicago, IL  60637
       (312) 702-7253
       mitchell@pico.uchicago.edu

***********************************

I tried a few things and found this:

FixedPoint[Simplify, (expr - Simplify[expr])]

0

FixedPoint[Simplify, (expr - Collect[expr,y])]

      2 n   2
  (-1)    y
 ------------
      4  
***********************************
Howard Fink
fink@acf5.nyu.edu



From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Aug 23 23:18:24 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA03720
  (5.64+/IDA-1.3.4 for stevec); Thu, 23 Aug 90 23:18:23 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA09343; Thu, 23 Aug 90 23:16:51 CDT
Received: by yoda.ncsa.uiuc.edu id AA03360
  (5.64+/IDA-1.3.4 for ); Thu, 23 Aug 90 20:17:37 -0500
Received: by yoda.ncsa.uiuc.edu id AA03356
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 23 Aug 90 20:17:36 -0500
Message-Id: <9008240117.AA03356@yoda.ncsa.uiuc.edu>
Subject: Need help with creating a List
To: mathgroup@yoda.ncsa.uiuc.edu (Mathematica Mailing List)
Date: Wed, 22 Aug 90 12:57:13 EDT
From: Avi Y. Feldblum <pruxk!ayf>
Status: RO

I am having some trouble with creating a list for plotting with
ListPlot. As I understand it, what is needed is a list of lists, where
each element of the main list is a list of two values, the x and y
positions to be plotted. In my case, the x values are just a set of
evenly spaced values, while the y values are the difference between some
data I have and a functional form for the data. What I have is:

func[x_] = "some long function"

The data is in a list called "data"

diff[x_] := data[[x]] - func[.05x]

difftable = Table[ {.05i, diff[i]}, {i, Length[data]} ]

My problem is the output of difftable. It looks like:

{{.05, {value1}}, {.01, {value2}}, ....}

What it needs to be for ListPlot to work (I think) is:

{{.05, value1}, {.01, value2}, ....}

I tried to make a test file with a simple func[x_] and just put in some
datapoints, and there it did work. So I'm confused as to when and why
mathematica is giving me {{xval1,yval1},{xval2,yval2}, ..} in one case
and {{xval1,{yval1}}, {xval2,{yval2}}, ..} in the other case.

Any ideas or suggestions?

-- 
Avi Feldblum
ayf@pruxk.att.com   or  avi_feldblum@att.com


From wri!pea@uunet.UU.NET Fri Aug 24 11:30:28 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA04693
  (5.64+/IDA-1.3.4 for stevec); Fri, 24 Aug 90 11:30:26 -0500
Return-Path: <wri!pea@uunet.UU.NET>
Received: from uunet.uu.net by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA25220; Fri, 24 Aug 90 11:31:02 CDT
Received: from wri.UUCP by uunet.uu.net (5.61/1.14) with UUCP 
	id AA25166; Fri, 24 Aug 90 12:30:33 -0400
From: wri!pea@uunet.uu.net
Received: by WRI.com (3.2/SMI-3.0DEV3)
	id AA13461; Fri, 24 Aug 90 11:28:26 CDT
Message-Id: <9008241628.AA13461@WRI.com>
Date: Fri, 24 Aug 90 11:28:23 CDT
To: steve@ncsa.uiuc.edu
Subject: Mathematica Graphics Competition
Cc: joe@uunet.UU.NET, pea@uunet.UU.NET
Status: RO


*****************************************************************************
**                                                                         ** 
**               Mathematica Graphics Competition Deadline                 ** 
**                      Extended To October 6, 1990                        ** 
**                                                                         **
*****************************************************************************


Wolfram Research Sponsors Mathematica Graphics Competition


The Competition

Wolfram Research, Inc. is sponsoring a competition to recognize
outstanding graphics generated with Mathematica in 1990. Graphics
can be two- or three-dimensional, black-and-white or color,
abstract or representational. The only criterion is that they be
produced with Mathematica.

Entries will be judged by an independent panel of leading designers
and Mathematica users.

Winning entries will be published in the full-color 1991
Mathematica Calendar and may be included in other Mathematica
material.

Competition prizes will include $1,000 for first place and free
registration at the second annual Mathematica Conference in San
Francisco, January 1991. All entries will be acknowledged, and
all entrants will receive a complimentary gift.


The Rules

All entries must be received by October 6, 1990

Entries must be submitted as Mathematica Notebooks or PostScript
files.  Electronic mail, or any standard disk or tape format is
acceptable.  All disks or tapes must be labeled with your name and
title of work.  Media will not be returned.

Each entry must be accompanied by a separate entry form (or
facsimile), and must include a short description of how it was
produced.  Give Mathematica code when possible.

By submitting an entry to the competition, you are warranting that
you are the owner of all rights associated with the entry, and you
are granting to Wolfram Research the nonexclusive right to publish
or exhibit your entry in any way.

Employees of Wolfram Research and their relatives are not eligible
to participate.
  
 
Send entries to:  
 
Mathematica Graphics Competition 
Wolfram Research, Inc. 
P.O. Box 6059 
Champaign, Illinois 61826-6059, USA 
 
Telephone: 217-398-0700 
Fax: 217-398-0747 
Email: competition@wri.com 
 


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 24 13:24:34 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA04807
  (5.64+/IDA-1.3.4 for stevec); Fri, 24 Aug 90 13:24:32 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA27320; Fri, 24 Aug 90 13:22:59 CDT
Received: by yoda.ncsa.uiuc.edu id AA04740
  (5.64+/IDA-1.3.4 for ); Fri, 24 Aug 90 12:08:26 -0500
Received: by yoda.ncsa.uiuc.edu id AA04736
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 24 Aug 90 12:08:25 -0500
Message-Id: <9008241708.AA04736@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Possible Collect bug
Date: Fri, 24 Aug 90 07:54:41 -0500
From: mds@mark.stat.purdue.edu
Status: RO

If I understand the recent messages from Howard Fink <fink@acf5.nyu.edu>,
Peter Horan <peter@aragorn.cm.deakin.oz>, and John Mitchell
<mitchell@pico.uchicago.edu>,and am not confused now :-), below is a
simple example demonstrating a problem with the Collect[] function.

	Mathematica (sun3.fpa) 1.2 (November 6, 1989) [With pre-loaded data]

	In[1]:= Collect[(-1)^(-1+2n),x]  (* note no x in first argument *)

	            2 n
	Out[1]= (-1)

Mark Senn
Purdue University
mds@pop.stat.purdue.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 24 14:30:09 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA04924
  (5.64+/IDA-1.3.4 for stevec); Fri, 24 Aug 90 14:30:07 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA28653; Fri, 24 Aug 90 14:28:36 CDT
Received: by yoda.ncsa.uiuc.edu id AA04735
  (5.64+/IDA-1.3.4 for ); Fri, 24 Aug 90 12:08:18 -0500
Received: by yoda.ncsa.uiuc.edu id AA04731
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 24 Aug 90 12:08:17 -0500
Message-Id: <9008241708.AA04731@yoda.ncsa.uiuc.edu>
From: wri!pea@uunet.uu.net
Date: Fri, 24 Aug 90 11:28:23 CDT
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica Graphics Competition
Status: RO


*****************************************************************************
**                                                                         ** 
**               Mathematica Graphics Competition Deadline                 ** 
**                      Extended To October 6, 1990                        ** 
**                                                                         **
*****************************************************************************


Wolfram Research Sponsors Mathematica Graphics Competition


The Competition

Wolfram Research, Inc. is sponsoring a competition to recognize
outstanding graphics generated with Mathematica in 1990. Graphics
can be two- or three-dimensional, black-and-white or color,
abstract or representational. The only criterion is that they be
produced with Mathematica.

Entries will be judged by an independent panel of leading designers
and Mathematica users.

Winning entries will be published in the full-color 1991
Mathematica Calendar and may be included in other Mathematica
material.

Competition prizes will include $1,000 for first place and free
registration at the second annual Mathematica Conference in San
Francisco, January 1991. All entries will be acknowledged, and
all entrants will receive a complimentary gift.


The Rules

All entries must be received by October 6, 1990

Entries must be submitted as Mathematica Notebooks or PostScript
files.  Electronic mail, or any standard disk or tape format is
acceptable.  All disks or tapes must be labeled with your name and
title of work.  Media will not be returned.

Each entry must be accompanied by a separate entry form (or
facsimile), and must include a short description of how it was
produced.  Give Mathematica code when possible.

By submitting an entry to the competition, you are warranting that
you are the owner of all rights associated with the entry, and you
are granting to Wolfram Research the nonexclusive right to publish
or exhibit your entry in any way.

Employees of Wolfram Research and their relatives are not eligible
to participate.
  
 
Send entries to:  
 
Mathematica Graphics Competition 
Wolfram Research, Inc. 
P.O. Box 6059 
Champaign, Illinois 61826-6059, USA 
 
Telephone: 217-398-0700 
Fax: 217-398-0747 
Email: competition@wri.com 
 



From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 24 15:29:26 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA05050
  (5.64+/IDA-1.3.4 for stevec); Fri, 24 Aug 90 15:29:24 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA00154; Fri, 24 Aug 90 15:27:53 CDT
Received: by yoda.ncsa.uiuc.edu id AA04871
  (5.64+/IDA-1.3.4 for ); Fri, 24 Aug 90 13:58:23 -0500
Received: by yoda.ncsa.uiuc.edu id AA04867
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 24 Aug 90 13:58:21 -0500
Message-Id: <9008241858.AA04867@yoda.ncsa.uiuc.edu>
Date: Fri, 24 Aug 90 10:40:23 PDT
From: don@kinghorn.chem.WSU.EDU (Don Kinghorn)
Subject: Re:Need help with creating a List
To: mathgroup@yoda.ncsa.uiuc.edu (Mathematica Mailing List)
Status: RO


Begin recieved message:
************************************************************************************
. . . 

I am having some trouble with creating a list for plotting with
ListPlot. As I understand it, what is needed is a list of lists, where
each element of the main list is a list of two values, the x and y
positions to be plotted. In my case, the x values are just a set of
evenly spaced values, while the y values are the difference between some
data I have and a functional form for the data. What I have is:

func[x_] = "some long function"

The data is in a list called "data"

diff[x_] := data[[x]] - func[.05x]

difftable = Table[ {.05i, diff[i]}, {i, Length[data]} ]

My problem is the output of difftable. It looks like:

{{.05, {value1}}, {.01, {value2}}, ....}

What it needs to be for ListPlot to work (I think) is:

{{.05, value1}, {.01, value2}, ....}

I tried to make a test file with a simple func[x_] and just put in some
datapoints, and there it did work. So I'm confused as to when and why
mathematica is giving me {{xval1,yval1},{xval2,yval2}, ..} in one case
and {{xval1,{yval1}}, {xval2,{yval2}}, ..} in the other case.

Any ideas or suggestions?

--Avi Feldblum
ayf@pruxk.att.com   or  avi_feldblum@att.com

***********************************************************************************
Look at your y data. I suspect that its in the form of a list of lists ( an nx1 matrix) 

and as a result your function diff is returning a vector. Try applying Flatten[]
to your y data to put it in the form {y1,y2,y3, . . .}. This should give the result
you want.

Example:
In[1]:= data=Transpose[{{1,2,3,4}}]

Out[1]= {{1}, {2}, {3}, {4}}

In[2]:= fcn[x_] := x-1/2

In[3]:= dif[x_] := data[[x]]-fcn[.05x]

In[4]:= Table[{.05i,dif[i]},{i,Length[data]}]

Out[4]= {{0.05, {1.45}}, {0.1, {2.4}}, {0.15, {3.35}}, {0.2, {4.3}}}

In[5]:= data = Flatten[data]

Out[5]= {1, 2, 3, 4}

In[6]:= Table[{.05i,dif[i]},{i,Length[data]}]

Out[6]= {{0.05, 1.45}, {0.1, 2.4}, {0.15, 3.35}, {0.2, 4.3}}

I hope this helps. (this is only one of many possible solutions)

Don Kinghorn




From mathgroup-adm@yoda.ncsa.uiuc.edu Sun Aug 26 00:31:22 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA07256
  (5.64+/IDA-1.3.4 for stevec); Sun, 26 Aug 90 00:31:20 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA06278; Sun, 26 Aug 90 00:29:51 CDT
Received: by yoda.ncsa.uiuc.edu id AA06536
  (5.64+/IDA-1.3.4 for ); Sat, 25 Aug 90 23:14:24 -0500
Received: by yoda.ncsa.uiuc.edu id AA06532
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 25 Aug 90 23:14:22 -0500
Message-Id: <9008260414.AA06532@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Graphics primitives
Date: Fri, 24 Aug 90 15:53:28 PDT
From: jacobson@cello.hpl.hp.com
Status: RO

I'm trying to make Mathematica draw custom error-bars for statistical
data.  The problem is that I can't figure out how to make Mathematica
draw little lines for ticks at the confidence limits, etc.  I want the
*position* to be in application coordinates, but the length of the
ticks to be in terms of the width of the plot.  I figured if I could
track down how Mathematica does axes, I'd be able to figure out what I
want, but the axes code seems to be hidden from users.

  -- David Jacobson



From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Aug 28 11:46:39 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA09476
  (5.64+/IDA-1.3.4 for stevec); Tue, 28 Aug 90 11:46:37 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA27964; Tue, 28 Aug 90 11:44:26 CDT
Received: by yoda.ncsa.uiuc.edu id AA09357
  (5.64+/IDA-1.3.4 for ); Tue, 28 Aug 90 10:18:11 -0500
Received: by yoda.ncsa.uiuc.edu id AA09353
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 28 Aug 90 10:18:10 -0500
Message-Id: <9008281518.AA09353@yoda.ncsa.uiuc.edu>
Date: Tue, 28 Aug 90 09:37:42 CDT
From: carl@crazyman.med.ge.com (Carl Crawford)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: eqn and tex
Status: RO

does anyone have a filter to convert mathematica's tex output to eqn?


Carl R. Crawford, Ph.D.	   Voice: 414-521-6572
GE Medical Systems	   Fax: 414-521-6575
P.O. Box 414, W-875	   Uucp: {sun!sunbird,uunet!crdgw1}!gemed!carl
Milwaukee, WI 53201	   Internet: carl@gemed.ge.com


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Aug 30 22:29:28 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA12216
  (5.64+/IDA-1.3.4 for stevec); Thu, 30 Aug 90 22:29:26 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA12028; Thu, 30 Aug 90 22:27:21 CDT
Received: by yoda.ncsa.uiuc.edu id AA12097
  (5.64+/IDA-1.3.4 for ); Thu, 30 Aug 90 21:05:19 -0500
Received: by yoda.ncsa.uiuc.edu id AA12093
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 30 Aug 90 21:05:18 -0500
Message-Id: <9008310205.AA12093@yoda.ncsa.uiuc.edu>
Date: Thu, 30 Aug 90 15:58 EDT
From: PMCGUIRE@coral.bucknell.edu
Subject: Bug in Plot
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Has anyone else noticed the plethora of vertical lines that occurs when
Mathematica executes the command    Plot[x/x,{x,1,2}]   or similar plots?
This problem seems to be machine independent.  I have tried it on a MacIIcx
and an IBM 386 machine with the same result.  Does anyone have an explanation?


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Aug 30 23:28:55 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA12301
  (5.64+/IDA-1.3.4 for stevec); Thu, 30 Aug 90 23:28:53 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA12965; Thu, 30 Aug 90 23:26:48 CDT
Received: by yoda.ncsa.uiuc.edu id AA12102
  (5.64+/IDA-1.3.4 for ); Thu, 30 Aug 90 21:05:26 -0500
Received: by yoda.ncsa.uiuc.edu id AA12098
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 30 Aug 90 21:05:25 -0500
Message-Id: <9008310205.AA12098@yoda.ncsa.uiuc.edu>
Date: Thu, 30 Aug 90 13:23:37 PDT
From: limes@cs.nps.navy.mil (Robert Limes x3216)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: mathematica
Status: RO

Steve Christianson:
I am searching for printer drivers for Mathematica graphics output ...
specifically for HP LJ and HP pen-plotters.  Wolfram can not help us;
they suggested I try to contact you.
Bob Limes
Dept. of Electrical and Computer Eng.
Naval Postgraduate School
Monterey, CA 93943
(408) 646-3216
limes@cs.nps.navy.mil


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 31 01:23:35 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA13228
  (5.64+/IDA-1.3.4 for stevec); Fri, 31 Aug 90 01:23:33 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA16421; Fri, 31 Aug 90 01:21:26 CDT
Received: by yoda.ncsa.uiuc.edu id AA12086
  (5.64+/IDA-1.3.4 for ); Thu, 30 Aug 90 21:04:59 -0500
Received: by yoda.ncsa.uiuc.edu id AA12082
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 30 Aug 90 21:04:57 -0500
Message-Id: <9008310204.AA12082@yoda.ncsa.uiuc.edu>
Date:         Wed, 29 Aug 90 14:11:57 JST
From: Hideaki Aoyama <AOYAMA@JPNRIFP>
Subject:      Mathematica
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Dear Dir,

I recently learned that you collect and distribute list of bugs in
Mathematica.  As its regular user, I would appreciate if you could
add me to the mailing list.

Although it helps my research a great deal, I suffer from its
shortcomings, wasting a few hours at a time.
A trouble I encountered recently;

         Integrate[2(1+E^(i p)), {p, 0, 2Pi}]

You may have already known this.  Mathematica does not know
the right branch.

                    Greetings,     Hideaki Aoyama
                                   Associate Professor
                                   Physics Department
                                   College of Liberal Arts and Sciences
                                   Kyoto Univesity
                                   Yoshida, Kyoto 606, JAPAN
                                   tel: 075-753-6785
                                   fax: 075-753-6804


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 31 01:32:01 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA13275
  (5.64+/IDA-1.3.4 for stevec); Fri, 31 Aug 90 01:31:59 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA16502; Fri, 31 Aug 90 01:29:53 CDT
Received: by yoda.ncsa.uiuc.edu id AA12081
  (5.64+/IDA-1.3.4 for ); Thu, 30 Aug 90 21:04:53 -0500
Received: by yoda.ncsa.uiuc.edu id AA12077
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 30 Aug 90 21:04:51 -0500
Message-Id: <9008310204.AA12077@yoda.ncsa.uiuc.edu>
Subject: oh come on!!
To: mathgroup@yoda.ncsa.uiuc.edu (mathgroup for mathematica)
Date: Tue, 28 Aug 90 19:06:03 PDT
From: Steven Warwick <sdw@hpsadsdw.hp.com>
Status: RO

Another case of "does this make sense?"

Let's experiment with Limit....

In[36]:= 1 + 1/(x+a)

             1
Out[36]= 1 + -
             x

In[37]:= Limit[%,x->Infinity]

Out[37]= 1            ********* ho hum **********

In[38]:= 1 + 1/(1+a)

               1
Out[38]= 1 + -----
             1 + x

In[39]:= Limit[%,x->Infinity]

Out[39]= 1            ************** yawn **********

In[42]:= 1 + 1/( x+a)

               1
Out[42]= 1 + -----
             a + x

In[43]:= Limit[%,x->Infinity]

Out[43]= 1       ****************  zzzzzzz  ***********

In[45]:= 1 + 1/(b x)

                1
Out[45]= 1 + -------
             a + b x

In[46]:= Limit[%,x->Infinity]

                    1
Out[46]= 1 + ----------------   ************** what???? *************
             a + b (Infinity)


                                 *** so, maybe the multiplication's **
                                 *** got mma upset **

In[47]:= 1 + 1/(b x)

              1
Out[47]= 1 + ---
             b x

In[48]:= Limit[%,x->Infinity]

Out[48]= 1                  *****  nope, just another one of those days ****
 

Is there a consistantcy problem here, or is this just
a new form of computer generated cream of wheat 
       (with the lumps like mom used to make.. )




-
Steven Warwick

Hewlett-Packard
sdw@hpsad


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 31 00:55:34 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA13116
  (5.64+/IDA-1.3.4 for stevec); Fri, 31 Aug 90 00:55:32 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15598; Fri, 31 Aug 90 00:53:23 CDT
Received: by yoda.ncsa.uiuc.edu id AA12091
  (5.64+/IDA-1.3.4 for ); Thu, 30 Aug 90 21:05:04 -0500
Received: by yoda.ncsa.uiuc.edu id AA12087
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 30 Aug 90 21:05:03 -0500
Message-Id: <9008310205.AA12087@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Tick labels
Date: Wed, 29 Aug 90 09:20:29 PDT
From: jacobson@cello.hpl.hp.com
Status: RO

In Plot[], the default tick labels for the Y axis have the trailing
zeros chopped off, then are right justified.  Here is a tty picture of
one I just did:

0.0175 +
       |
 0.015 +
       |
0.0125 +
       |
  0.01 +
       |
0.0075 +
       |
 0.005 +
       |
0.0025 +
       |
       +-------...

I'd much prefer a constant number of places past the decimal point.
Or if not that, at least line the decimal points up.  Does any one
know how to make this happen?

Thank you,
  -- David Jacobson


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 31 02:28:12 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA13416
  (5.64+/IDA-1.3.4 for stevec); Fri, 31 Aug 90 02:28:10 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA17504; Fri, 31 Aug 90 02:26:04 CDT
Received: by yoda.ncsa.uiuc.edu id AA12076
  (5.64+/IDA-1.3.4 for ); Thu, 30 Aug 90 21:04:47 -0500
Received: by yoda.ncsa.uiuc.edu id AA12072
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 30 Aug 90 21:04:45 -0500
Message-Id: <9008310204.AA12072@yoda.ncsa.uiuc.edu>
Subject: consistantcy
To: mathgroup@yoda.ncsa.uiuc.edu (mathgroup for mathematica)
Date: Tue, 28 Aug 90 16:44:09 PDT
From: Steven Warwick <sdw@hpsadsdw.hp.com>
Status: RO

This one really bugs me...


I get the results of an expression of the form:


                     I Sqrt[Pi]
Out[]=   ----------------------------------
           2    2     2
          v /(s1  + s2 )         -2     -2
         E               Sqrt[-s1   - s2  ]



I want to simplify it by giving the hint to pull oout -1 from the Sqrt..




In[] =  % /. Sqrt[ -x1_ - x2_] -> I Sqrt[x1+x2]

I get... No Change!!!

After alot of soul searching, Fullform tells me that it's really not
a Sqrt at all I'm looking at:


Out[46]//FullForm= 
 
>   Times[Complex[0, 1], Power[E, 
 
>     Times[-1, Power[Plus[Power[s1, 2], Power[s2, 2]], -1], Power[v, 2]]], 
 
>    Power[Pi, Rational[1, 2]], 
 
>    Power[Plus[Times[-1, Power[s1, -2]], Times[-1, Power[s2, -2]]], 
 
>     Rational[-1, 2]]]
      ^^^^^^^^^^^^^^^

it's a 1/Sqrt !!!

so my match expression of the form:


In[47]:=  FullForm[Sqrt[ -x1_ - x2_]]

Out[47]//FullForm= 
 
>   Power[Plus[Times[-1, Pattern[x1, Blank[]]], 
 
>     Times[-1, Pattern[x2, Blank[]]]], Rational[1, 2]]
                                        ^^^^^^^^^^^^^^


will not work..

This is totally non-intuitive. 

Let's try to coerce the Sqrt form to be positive rational in all cases!!


In[59]:= Sqrt /: 1/Sqrt[x__] := (x^Rational[1, 2])^(-1)

                                                1
TagSetDelayed::notag: Tag Sqrt not found in ---------.
                                            Sqrt[x__]

                    1               -1
Out[59]= Sqrt/: --------- := Sqrt[x]
                Sqrt[x__]


....nope....

O.K., how about Power???

In[] =  Power /: 1/Sqrt[x_] := Power[Sqrt[x],-1]


now try it:

1/Sqrt[y]

Out[]//FullForm= Power[y, Rational[-1, 2]]
                          ^^^^^^^^^^^^^^^^

Nope...


I've tried everything I can think of to get Sqrt to give me positive rational
powers but mathematica seems to say  "no way"


How about a more reasonable definition for us "Radical" pattern matchers!






--
Steven Warwick

Hewlett-Packard
sdw@hpsad


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 31 00:28:58 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA13077
  (5.64+/IDA-1.3.4 for stevec); Fri, 31 Aug 90 00:28:56 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15220; Fri, 31 Aug 90 00:26:49 CDT
Received: by yoda.ncsa.uiuc.edu id AA12071
  (5.64+/IDA-1.3.4 for ); Thu, 30 Aug 90 21:04:41 -0500
Received: by yoda.ncsa.uiuc.edu id AA12067
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 30 Aug 90 21:04:39 -0500
Message-Id: <9008310204.AA12067@yoda.ncsa.uiuc.edu>
Subject: infix inputs
To: mathgroup@yoda.ncsa.uiuc.edu (mathgroup for mathematica)
Date: Tue, 28 Aug 90 11:06:55 PDT
From: Steven Warwick <sdw@hpsadsdw.hp.com>
Status: RO

I want to define a function which has the characteristics of the
"Or" or And semantics i.e.  

In[] =   a ||| b ||| c

Out[] = ..Something useful..

I can define a function, but I must use the tilde's to indicate that
it's a function i.e.

          a ~|||~ b ~|||~ c

but I can't seem to define a alias such that 

||| maps into ~|||~ 

Clearly, mathematica has this ability since || exists

so how do I get to do it too??




--
Steven Warwick

Hewlett-Packard
sdw@hpsad


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 31 13:27:14 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA13816
  (5.64+/IDA-1.3.4 for stevec); Fri, 31 Aug 90 13:27:12 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA00557; Fri, 31 Aug 90 13:24:58 CDT
Received: by yoda.ncsa.uiuc.edu id AA13724
  (5.64+/IDA-1.3.4 for ); Fri, 31 Aug 90 12:02:47 -0500
Received: by yoda.ncsa.uiuc.edu id AA13720
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 31 Aug 90 12:02:46 -0500
Message-Id: <9008311702.AA13720@yoda.ncsa.uiuc.edu>
Date: Fri, 31 Aug 90 08:56 EDT
From: "Lawrence M. Seiford, IEOR, UMass, (413) 545-2851."
 <SEIFORD@ecs.umass.edu>
Subject: Re: Bug in Plot
To: PMCGUIRE@coral.bucknell.edu, mathgroup@yoda.ncsa.uiuc.edu
Status: RO

PMCGUIRE writes:
Has anyone else noticed the plethora of vertical lines that occurs when
Mathematica executes the command    Plot[x/x,{x,1,2}]   or similar plots?
This problem seems to be machine independent.  I have tried it on a MacIIcx
and an IBM 386 machine with the same result.  Does anyone have an explanation?

This is a result of the automatic scaling feature of Plot. If you'll use
InputForm you'll notice that not all of the y-values are exactly 1.
Adding PlotRange->{0,2} or even PlotRange->{.9,1.1} gives the line you're
looking for.

larry


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 31 14:42:18 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA13941
  (5.64+/IDA-1.3.4 for stevec); Fri, 31 Aug 90 14:42:17 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA01981; Fri, 31 Aug 90 14:40:10 CDT
Received: by yoda.ncsa.uiuc.edu id AA13729
  (5.64+/IDA-1.3.4 for ); Fri, 31 Aug 90 12:02:59 -0500
Received: by yoda.ncsa.uiuc.edu id AA13725
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 31 Aug 90 12:02:57 -0500
Message-Id: <9008311702.AA13725@yoda.ncsa.uiuc.edu>
From: ags@seaman.cc.purdue.edu (Dave Seaman)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Bug in Plot 
Date: Fri, 31 Aug 90 11:13:32 +0500
Status: RO

>Has anyone else noticed the plethora of vertical lines that occurs when
>Mathematica executes the command    Plot[x/x,{x,1,2}]   or similar plots?
>This problem seems to be machine independent.  I have tried it on a MacIIcx
>and an IBM 386 machine with the same result.  Does anyone have an explanation?

If you try Plot[x/x,{x,1,2},PlotRange->{0,2}], I think you'll find that the
plot looks normal.  The problem appears to be that x/x evaluates to something
slightly different from 1 for some x, and the automatic scaling algorithm
chooses the maximum and minimum values found for x/x. I got no tick marks or
values on the vertical axis at all, probably because the values were something
like 1 +/- 10^(-n) for some suitably large n, which wouldn't fit in the plot.

It's also interesting to compare Plot[1,{x,1,2}], which produces a horizontal
line with tick marks on the vertical axis.  Apparantly, the case max=min is a
special case, and no allowance is made for the case max-min < epsilon, for
suitably small epsilon.

Dave Seaman


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 31 15:42:45 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA14050
  (5.64+/IDA-1.3.4 for stevec); Fri, 31 Aug 90 15:42:43 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA03013; Fri, 31 Aug 90 15:40:37 CDT
Received: by yoda.ncsa.uiuc.edu id AA13719
  (5.64+/IDA-1.3.4 for ); Fri, 31 Aug 90 12:02:41 -0500
Received: by yoda.ncsa.uiuc.edu id AA13715
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 31 Aug 90 12:02:39 -0500
Message-Id: <9008311702.AA13715@yoda.ncsa.uiuc.edu>
Date: Fri, 31 Aug 90 15:53:10 +1000
From: jimr@maths.su.oz.au (Jim Richardson)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Apollo Mathematica bugs
Status: RO

We have a version of Mathematica 1.2 running on Apollo workstations.  It
identifies itself as follows:

Mathematica (Apollo SR10) 1.2 (January 5, 1990) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
with I. Rivin and D. Withoff
Copyright 1988,1989 Wolfram Research Inc.
 -- Display Manager graphics initialized -- 

Does anyone have a later version?

I am interested in particular to find out whether two Apollo-specific bugs
have been fixed in the latest version.

a)  Mathematica will not run while one is connected to another node via
the Apollo crp (create remote process) utilitity.  It prints the banner
(shown above) then dies with a segmentation fault.

b)  The postscript viewer dmps, supplied with Mathematica for use under
the Apollo Display Manager, has a bug which displaces dashed line plots
upwards.  For example, the result of

	Plot[x,{x,-3,3}, PlotStyle->Dashing[{0.01,0.01}]]

looks as if the function being plotted were y = x + 0.7 instead of y = x.
This bug is not present in the X windows postscript viewer, only the
Display Manager one.
--
Jim Richardson
Department of Pure Mathematics, University of Sydney, NSW 2006, Australia
Internet: jimr@maths.su.oz.au  Phone: +61 2 692 2232  FAX: +61 2 692 4534


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 31 15:46:37 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA14070
  (5.64+/IDA-1.3.4 for stevec); Fri, 31 Aug 90 15:46:35 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA03039; Fri, 31 Aug 90 15:44:31 CDT
Received: by yoda.ncsa.uiuc.edu id AA13880
  (5.64+/IDA-1.3.4 for ); Fri, 31 Aug 90 14:16:34 -0500
Received: by yoda.ncsa.uiuc.edu id AA13876
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 31 Aug 90 14:16:32 -0500
Message-Id: <9008311916.AA13876@yoda.ncsa.uiuc.edu>
Date: Fri, 31 Aug 90 14:10:14 -0400
From: lwyse@thalamus.bu.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: binary io
Status: RO

Is there anyway to read and write large blocks of data from
and to arrays in Mathematica analogous to fread and fwrite
in C? This would save a lot of time!

					thanks, lonce

   XXX     XXX         Lonce Wyse                                |
  X           X        Center for Adaptive Systems          \    |    /
  X           X        Boston University                     \       /
                       111 Cummington St.                   
                       Boston,MA 02215                   ----         ----
  X           X                                   
  X           X        "The best things in life              /       \
   XXX     XXX         are emergent."                       /    |    \
                                                                 |



From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 31 21:23:07 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA14456
  (5.64+/IDA-1.3.4 for stevec); Fri, 31 Aug 90 21:23:05 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA27722; Fri, 31 Aug 90 21:20:54 CDT
Received: by yoda.ncsa.uiuc.edu id AA14360
  (5.64+/IDA-1.3.4 for ); Fri, 31 Aug 90 19:53:03 -0500
Received: by yoda.ncsa.uiuc.edu id AA14356
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 31 Aug 90 19:53:02 -0500
Message-Id: <9009010053.AA14356@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Bug in plot
Date: Fri, 31 Aug 90 13:52:42 PDT
From: jacobson@cello.hpl.hp.com
Status: RO

> The problem appears to be that x/x evaluates to something
> slightly different from 1 for some x, and the automatic scaling algorithm
> chooses the maximum and minimum values found for x/x.

This is a "feature" of IEEE floating point.  x/x is not requried to
evaluate to 1.  You can collect a set of values for which this happens
with 

Select[Table[Random[],{100}],#/#-1 != 0&]

 -- David Jacobson


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 31 23:42:11 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA14754
  (5.64+/IDA-1.3.4 for stevec); Fri, 31 Aug 90 23:42:09 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA10184; Fri, 31 Aug 90 23:40:05 CDT
Received: by yoda.ncsa.uiuc.edu id AA14370
  (5.64+/IDA-1.3.4 for ); Fri, 31 Aug 90 19:53:21 -0500
Received: by yoda.ncsa.uiuc.edu id AA14366
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 31 Aug 90 19:53:20 -0500
Message-Id: <9009010053.AA14366@yoda.ncsa.uiuc.edu>
Date: Fri, 31 Aug 90 17:12:51 EDT
From: dmg@dash.mitre.org (David M Goblirsch)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: binary io
Status: RO

   Is there anyway to read and write large blocks of data from
   and to arrays in Mathematica analogous to fread and fwrite
   in C? This would save a lot of time!


I have a good way to get binary data IN to Mathematica, but not a very
good way to get it out.  The fastest way is in fact to write a C program
that reads a binary file using fread and writes ascii output to the
standard output, and read this into Mathematica through a pipe using the
Mathematica built-in function ReadList.  For example, create a C program
like the following.

NOTES: (1) This program is for short ints, which is typical of the
speech files that I work with.  If you want to read binary floats or
long ints, make the appropriate changes. (2) This is a skeleton program
FOR EXAMPLE PURPOSES ONLY and does not show all of the error checking
that I would normally do (for example, checking for a return of a NULL
pointer by fopen), so don't use this program as is without adding the
error checks.  Use at your own risk.  (3) It may even be faster to read
more than one data value at a time which is what this program does.

----------  Example C program (simplified) ---------------------------

#include "stdio.h"
main(int argc, char *argv[])
{
  short int orig_data_value;
  FILE *fopen(), *fpi;

  fpi = fopen( argv[1], "rb");
  while( fread( &orig_data_value, sizeof(short int), 1, fpi) )
    {
      printf("%d\n", orig_data_value);
    }
  fclose(fpi);

}

----------  End of Example C program  -------------

Suppose that you call the executable version of this program "convert"
and that it is in the directory /you/bin.  Now create a Mathematica
function like the following (note the space between convert and the
quote):

ReadBinaryFile[filename_String] :=
       ReadList[ StringJoin[ "!/you/bin/convert ", filename ], Number ]

Now to read your data into a list, just type

listname = ReadBinaryFile["datafilename"];

Don't forget the semi-colon unless you like watching data speed by on
your screen!

Of course, you may want to take the usual precautions of sticking this
in a Package and protecting it, etc.

On a SUN SPARC under 4.0.3, this approach takes 7 secs to read a file
with 13421 data points and 18.4 seconds to read a file with 43828 data
points. 

I do not have a good way to get binary data out.  That appears to
involve the creation the dual program to this one AND the creation of a
temporary file in the corresponding Mathematica function (ugh), so I
will be most interested in a clean way to do this.

David M. Goblirsch
dmgob@mitre.org
(703) 883-5450

The MITRE Corporation
Washington C3I Division
7525 Colshire Drive
McLean, VA 22102-3481



From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 31 23:09:46 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA14704
  (5.64+/IDA-1.3.4 for stevec); Fri, 31 Aug 90 23:09:44 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA09735; Fri, 31 Aug 90 23:07:33 CDT
Received: by yoda.ncsa.uiuc.edu id AA14355
  (5.64+/IDA-1.3.4 for ); Fri, 31 Aug 90 19:52:55 -0500
Received: by yoda.ncsa.uiuc.edu id AA14351
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 31 Aug 90 19:52:53 -0500
Message-Id: <9009010052.AA14351@yoda.ncsa.uiuc.edu>
Date: Fri, 31 Aug 90 16:22 EDT
From: PMCGUIRE@coral.bucknell.edu
Subject: Followup to Bug in Plot
To: MATHGROUP@YODA.NCSA.UIUC.EDU
Status: RO

This is a followup to my request for an explanation of what occurs when
Mathematica executes the command    Plot[x/x,{x,1,2}]  .  From the responses
(for which I thank one and all) I was able to get a clear picture of what is
happening.  On executing the command    InputForm[%]  after the plot, one can
see that  x/x is not always evaluated to 1.  Since the values are very close
to 1 the automatic scaling function compresses the scale for the range to an
interval about 1 of radius roughly 10^-18 .  Relative to this s
cale the graph
is correct and the tick marks are rubbed out of existence. To get a clear
indication of what is happening, it is worthwhile looking at the plot with the
following plot range specified:  Plot[x/x,{x,1,2},PlotRange->{.999999999999999999,1.000000000000000001}].  As was pointed out in one of the responses, it
would be more appropriate for Mathematica to make an allowance in the automatic
scaling for the case when the difference between the max and min is very very
small.  This was an eye opening example for me.  Thanks, Paul McGuire


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Aug 31 22:47:11 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA14664
  (5.64+/IDA-1.3.4 for stevec); Fri, 31 Aug 90 22:47:10 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA09368; Fri, 31 Aug 90 22:45:05 CDT
Received: by yoda.ncsa.uiuc.edu id AA14365
  (5.64+/IDA-1.3.4 for ); Fri, 31 Aug 90 19:53:11 -0500
Received: by yoda.ncsa.uiuc.edu id AA14361
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 31 Aug 90 19:53:10 -0500
Message-Id: <9009010053.AA14361@yoda.ncsa.uiuc.edu>
From: ags@seaman.cc.purdue.edu (Dave Seaman)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Bug in plot 
Date: Fri, 31 Aug 90 16:00:16 +0500
Status: RO

>This is a "feature" of IEEE floating point.  x/x is not requried to
>evaluate to 1.  You can collect a set of values for which this happens
>with 
>
>Select[Table[Random[],{100}],#/#-1 != 0&]
>
> -- David Jacobson

On the other hand, Plot[Release[x/x],{x,1,2}] gives the desired straight line,
because Release[x/x] evaluates to exactly 1 (without a decimal point).

Dave Seaman


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Sep  8 22:56:11 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA08190
  (5.64+/IDA-1.3.4 for stevec); Sat, 8 Sep 90 22:56:09 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA08595; Sat, 8 Sep 90 22:54:16 CDT
Received: by yoda.ncsa.uiuc.edu id AA08095
  (5.64+/IDA-1.3.4 for ); Sat, 8 Sep 90 21:13:09 -0500
Received: by yoda.ncsa.uiuc.edu id AA08091
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 8 Sep 90 21:13:08 -0500
Message-Id: <9009090213.AA08091@yoda.ncsa.uiuc.edu>
Subject: solve hangs on Arc Functions
To: mathgroup@yoda.ncsa.uiuc.edu (mathgroup for mathematica)
Date: Wed, 5 Sep 90 9:11:48 PDT
From: Steven Warwick <sdw@hpsadsdw.hp.com>
Status: RO

There appears to be a bug in solve in which expressions 
involving Arc Trig functions cause Mma to hang with no return...

***************** This hangs

In[3]:= ww==ArcCos[ (4-ts^2 wc^2)/ (4+ts^2 wc^2)]

                           2   2
                     4 - ts  wc
Out[3]= ww == ArcCos[-----------]
                           2   2
                     4 + ts  wc

In[4]:= Solve[%,wc]


***********  this doesn't **********



In[4]:=  Cos[wt] == (4-ts^2 wc^2)/ (4+ts^2 wc^2)

                         2   2
                   4 - ts  wc
Out[4]= Cos[wt] == -----------
                         2   2
                   4 + ts  wc

In[5]:= Solve[%,wc]

                  Sqrt[4 - 4 Cos[wt]]                Sqrt[4 - 4 Cos[wt]]
Out[5]= {{wc -> -----------------------}, {wc -> -(-----------------------)}}
                       2     2                            2     2
                Sqrt[ts  + ts  Cos[wt]]            Sqrt[ts  + ts  Cos[wt]]



**********************************


Watch out.....


--
Steven Warwick

Hewlett-Packard
sdw@hpsad


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Sep  8 23:50:39 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA08304
  (5.64+/IDA-1.3.4 for stevec); Sat, 8 Sep 90 23:50:37 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA25480; Sat, 8 Sep 90 23:48:31 CDT
Received: by yoda.ncsa.uiuc.edu id AA08100
  (5.64+/IDA-1.3.4 for ); Sat, 8 Sep 90 21:13:19 -0500
Received: by yoda.ncsa.uiuc.edu id AA08096
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 8 Sep 90 21:13:17 -0500
Message-Id: <9009090213.AA08096@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: binary io 
Date: Wed, 05 Sep 90 11:50:35 -0700
From: xinwei@jessica.stanford.edu
Status: RO

As for getting binary data out from Mathematica, one workaround
for simple functions (without control structures), is to
apply CForm[], then cut & paste the result into a C program]
to generate the data.  Of course, you might have to write a small
set of atomic C glue functions for those functions produced by CForm
which aren't in the standard C libraries.  Here's a test example
for producing binary data for a NeXT app (I stripped out the
functions originally generated by CForm, to save space.):

#include	<stdio.h>
#include	<varargs.h>
#include	<strings.h>
#include   <math.h>

#import <sys/file.h>
#import <sys/types.h>
#import <sys/stat.h>

#define FLOATSIZE	(sizeof(float))
#define NUMPOINTS	20
#define PI  	3.14159265359

main()
{
int fd;

    fd = setupfile();
     if (fd >=0)
     { 
     writepts(fd);
     close(fd);
     }
}

int setupfile()
{
int numpts;
int fd;

    fd = open("/xinwei/mobjunk.top", O_CREAT | O_RDWR, 777 );
    if (fd < 0)
    {
    	/*	char message[256];
    	sprintf(message,"Cannot open file.");
	NXRunAlertPanel(NULL,message,"OK",NULL,NULL);	*/
	return fd;
    }
     numpts = NUMPOINTS;
     write(fd, &numpts, sizeof(int));
     return fd;
}

float Sqrt(float x)
{
float xx;
	xx = (float) sqrt(x);
	return (xx);
}

float Sign(float x)
{
	return ((x < 0) ? -1.0 : 1.0) ; 
}

float Power(float x, int n)
{
float xx;
	xx = (float) pow((double) x, (double) n);
	return (xx);
}

float mob1(float t,float s)
{
     return(t);
}

float mob2(float t,float s)
{
     return (s);
}

float mob3(float t,float s)
{
     return(Power(2.7,- Power(t,2) - Power(s,2)));
}

int writepts(fd)
int fd;	/* file descriptor */
{
int i,j;
float t,s,x;
int cc;

    for (i= 0; i < NUMPOINTS; i++) {
	    for (j = 0; j < NUMPOINTS; j++) {
	    t = (i / (float) NUMPOINTS) * 1.6 - 0.8;
	    s = (j / (float) NUMPOINTS) * 2 * PI;
	    /* write  point  to file */
	    
	    x = mob1(t,s);
	    cc = write(fd,&x , FLOATSIZE);   
	    x = mob2(t,s);
	    cc = write(fd,&x , FLOATSIZE);   
	    x = mob3(t,s);
	    cc = write(fd,&x , FLOATSIZE);   
	    }
    }
}



From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Sep 19 01:58:48 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA22470
  (5.64+/IDA-1.3.4 for stevec); Wed, 19 Sep 90 01:58:46 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA10294; Wed, 19 Sep 90 01:56:42 CDT
Received: by yoda.ncsa.uiuc.edu id AA21779
  (5.64+/IDA-1.3.4 for ); Tue, 18 Sep 90 23:53:53 -0500
Received: by yoda.ncsa.uiuc.edu id AA21775
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 18 Sep 90 23:53:51 -0500
Message-Id: <9009190453.AA21775@yoda.ncsa.uiuc.edu>
Date: Thu, 13 Sep 90 15:45:13 PDT
From: limes@cs.nps.navy.mil (Robert Limes x3216)
To: mathgroup-request@yoda.ncsa.uiuc.edu
Subject: printer drivers
Status: RO

Steven Warwick:
I am searching for printer and plotter drivers for Mathematica
graphics output; specifically for HPLJ and HP pen-plotters.
Computer is Sun Sparcstation 1.
Bob Limes
Dept. of Electrical and Computer Engineering
Code EC
Naval Postgraduate School
Monterey, CA  93943
(408) 646-3216
limes@cs.nps.navy.mil


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Sep 19 02:41:39 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA22521
  (5.64+/IDA-1.3.4 for stevec); Wed, 19 Sep 90 02:41:37 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA11024; Wed, 19 Sep 90 02:39:34 CDT
Received: by yoda.ncsa.uiuc.edu id AA21784
  (5.64+/IDA-1.3.4 for ); Tue, 18 Sep 90 23:53:59 -0500
Received: by yoda.ncsa.uiuc.edu id AA21780
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 18 Sep 90 23:53:58 -0500
Message-Id: <9009190453.AA21780@yoda.ncsa.uiuc.edu>
Date:     Mon, 17 Sep 1990 12:22:45.71 GMT
From: amaro@ptifm.bitnet
Subject: Various Questions 
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

From:
                              Amaro Jose' Rica da Silva,
                              Instituto Superior Tecnico,
                              Physics Dep., Av. Rovisco Pais,
                              1096 Lisboa, PORTUGAL
                              email: AMARO@PTIFM.BITNET



I am a faculty member in the Physics Dept. of the Instituto
Superior Tecnico, I am engaged in a research project in the area of Dynamical
Systems/Cellular Automata. I have proposed here the use of Mathematica as a
general unifying basic interface for the software development related with this
project, having most particularly in mind its ability to control external
processes (e.g. data acquisition, processing and device control). Having used
Mathematica on the Macintosh only, I cannot as yet gauge this ability (no
multitasking environment) so I would like to get as much info as I can on this
before deciding on the best hardware/software combination for us.

   Some of the questions are :

-- I can't get `FontForm[expr, fontname, size]' to work on the Mac (neither
  `fontname' nor `size' are effective)! Is this to be expected?
   I have also tried `ResetMedium[file, options]' for -stdout- using the option
  `GraphicsFont ->"myfont\&size"' but that didn'd work either. Only `Define
   Style' of Axes Labels seems to work, but then every text in Graphics has the
   same font & size.

-- Adding `math.record'  path name to `init.m'  doesn't do any good, nor
   does adding a file name to the `$Echo' list in order to record input lines !
   Is this also inherent to the Mac interface ?

-- How can I produce animation of the kind you get when you open the
   ``About Mathematica''window? Is it a compiled routine, and can one add a
   function whose definition involves an independently compiled program?





From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Sep 25 03:07:45 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA00311
  (5.64+/IDA-1.3.4 for stevec); Tue, 25 Sep 90 03:07:43 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA19931; Tue, 25 Sep 90 03:05:31 CDT
Received: by yoda.ncsa.uiuc.edu id AA00114
  (5.64+/IDA-1.3.4 for ); Tue, 25 Sep 90 00:32:09 -0500
Received: by yoda.ncsa.uiuc.edu id AA00110
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 25 Sep 90 00:32:08 -0500
Message-Id: <9009250532.AA00110@yoda.ncsa.uiuc.edu>
Date: Thu, 20 Sep 90 10:33:48 EDT
From: prs@cook.whoi.edu (Peter R. Shaw)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Spherical Harmonic
Status: RO

Hi, folks,

I'm using spherical harmonics ...
I want to access Ylm for l=2, m=0. No azimuthal dependence,
so I set phi=0, and want to look at the theta dependence.

So, when I type:
SphericalHarmonicY[2,0,theta,0]

I get the satisfying result:
                          2
Sqrt[5] (-1 + 3 Cos[theta] )
----------------------------
         4 Sqrt[Pi]

BUT, when I try to access theta=0, what I get is
SphericalHarmonicY[2,0,0,0]
                                        0
General::ind: Indeterminate expression 0  encountered.

 0
0  Sqrt[5]
----------
2 Sqrt[Pi]

Am I nuts or what? Cos[0]=1, so Cos[theta]^2 = 1,
so I should get
Sqrt[5] (-1 + 3 )  
------------------
   4 Sqrt[Pi]

which evaluates to 1/2 Sqrt[5/Pi], and does not
involve anything like 0^0. None of the constants
are dependent on theta.

---------------------------------------------
Peter R. Shaw    pshaw@aqua.whoi.edu
Woods Hole Oceanographic Institution
---------------------------------------------



From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Sep 25 02:03:50 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA00237
  (5.64+/IDA-1.3.4 for stevec); Tue, 25 Sep 90 02:03:48 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA18662; Tue, 25 Sep 90 02:01:46 CDT
Received: by yoda.ncsa.uiuc.edu id AA00109
  (5.64+/IDA-1.3.4 for ); Tue, 25 Sep 90 00:32:01 -0500
Received: by yoda.ncsa.uiuc.edu id AA00105
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 25 Sep 90 00:32:00 -0500
Message-Id: <9009250532.AA00105@yoda.ncsa.uiuc.edu>
Date: Wed, 19 Sep 90 14:33 N
From: SURF203@kub.nl
To: mathgroup@yoda.ncsa.uiuc.EDU
Subject: Simplify
Status: RO

Is there a way by which MATHEMATICA can factor (simplify) expressions in which
the extracted parts contain differential operators.
For instance, we know that a substitution of u = 2 (d/dx v)/v in Burgers'
equation (d/dt u + u d/dx u + d2/dx2 u = 0) leads to an equation in which
we can extract the operator O = 2 (-1/v^2 (d/dx v) + 1/v d/dx ) such that it
becomes O (d/dt + d2/dx2)) v = 0. Also, a substitution of u = v^2 + d/dx v in
Korteweg-de Vries equation (d/dt u + u d/dx u + d3/dx3 u = 0), can be written
as (2 v + d/dx) (d/dt v + v^2 d/dx v + d3/dx3 v) = 0, which splits off the
operator O = (2 v + d/dx). Is there a way by which MATHEMATICA can single out
the operator O in the previous examples? This, presumably, requires the treat-
ment of operators as non-commuting products: i.e when D = d/dx, then
D f(x) = f(x) D + d/dx f.

I would appreciate comments on the previous!

Yours sincerely, Leo R.M. Maas



From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Sep 25 04:40:47 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA00517
  (5.64+/IDA-1.3.4 for stevec); Tue, 25 Sep 90 04:40:45 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA23014; Tue, 25 Sep 90 04:38:43 CDT
Received: by yoda.ncsa.uiuc.edu id AA00119
  (5.64+/IDA-1.3.4 for ); Tue, 25 Sep 90 00:32:18 -0500
Received: by yoda.ncsa.uiuc.edu id AA00115
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 25 Sep 90 00:32:16 -0500
Message-Id: <9009250532.AA00115@yoda.ncsa.uiuc.edu>
From: dan@chem.bu.edu (Dan Dill)
Date: Thu, 20 Sep 90 14:03:52 -0400
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Efficiency in Mathematica
Status: RO

While Mathematica allows things to be done in different ways, the procedural
way can be a real dog.

On page 104 of Volume 1, Issue 1 of The Mathematica Jounral, is written
"procedural programming is less efficient, longer and more difficult to
understand".  The following example amply demonstrates for me at least the
first two of these assertions, and, in hindsight, the third too.  The Journal
goes on to say that "sometimes it can take awhile to see how to do it.  The
time spent is almost always worth it."  I certainly did have to play around a
bit to see how to come up with a functional scheme, but it certainly was worth
it.

I have a nested list real numbers (generated by an external program and read
in with ReadList) of structure

	data = {{e1, {{m1, {u1, ..., u30}},
		      {m2, {    ...     }},
		      ...
		      {m30, {   ...     }}}},
	        ...
	        {e50, {{m1, {u1, ..., u30}},
		       {m2, {    ...     }},
		       ...
		       {m30, {   ...     }}}}}

I want to replace the elements m1, m2, ... with their unit modulus, to 8
decimal-digits precision.  

The straightforward, "traditional" way (ne = 30 and nkmat = 30)

	oldmod := Block[{i,j},
	        For[i = 1, i < ne + 1, i++,
	                For[j = 1, j < nkmat + 1, j++,
	                        data[[i,2,j,1]] =
	                                N[Mod[data[[i,2,j,1]], 1], 8]
	                ]
	        ]
	];

gives

	Timing[oldmod]

	Out[205]= {869.683 Second, Null}

A head-scratchingly less-straightforward, "functional" way

	mod[i_Integer, n_Integer] := Transpose[
		MapAt[N[Mod[#, 1], n]&, Transpose[data[[i, 2]]], {1}]
	]

gives

	Timing[data = Array[{data[[#, 1]], mod[#, 8]}&, ne];];

	Out[212]= {3.56667 Second, Null}

about 240 times faster.






From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Sep 25 04:37:37 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA00508
  (5.64+/IDA-1.3.4 for stevec); Tue, 25 Sep 90 04:37:35 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA22993; Tue, 25 Sep 90 04:35:33 CDT
Received: by yoda.ncsa.uiuc.edu id AA00129
  (5.64+/IDA-1.3.4 for ); Tue, 25 Sep 90 00:32:28 -0500
Received: by yoda.ncsa.uiuc.edu id AA00120
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 25 Sep 90 00:32:26 -0500
Message-Id: <9009250532.AA00120@yoda.ncsa.uiuc.edu>
From: Alfy_N_Riddle@cup.portal.com
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: equation manipulation
Date: Mon, 24 Sep 90 01:25:03 PDT
Status: RO

Dear Mathematica users,
  I do a fair amount of manipulating equations and am always
searching for tools to help me do this better. Since Solve
can have problems at times I have found the following set of
functions useful for manually solving an equation. All these
functions do is allow one to operate on both sides of the equals
mark at once, and format the result. This ensures a correct solution
is obtained, and is useful for tutorials.
  If anyone out there has any comments on this, or has found better
ways of doing this I would appreciate hearing from you. I will send
a summary to the net if there are enough replies.
  Sincerely, -- Alfy

=================================
EqnForm::usage=
"EqnForm[x,y] returns an equation formatted as x=y.
Mathematical operations can be performed directly on
this form and are passed to each side of the equation.
This is very useful for manual equation simplification
and tutorials. Normal[EqnForm[x,y]] returns {x,y}."

Format[EqnForm[x_,y_]] := SequenceForm[x," = ",y]

Normal[EqnForm[x_,y_]] ^= {x,y}

f_[ EqnForm[x_,y_]] ^= EqnForm[f[x],f[y]]

Times[ a_, EqnForm[x_,y_]] ^= EqnForm[a x,a y]
======================== end of functions


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Sep 25 19:27:41 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA01615
  (5.64+/IDA-1.3.4 for stevec); Tue, 25 Sep 90 19:27:39 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA11785; Tue, 25 Sep 90 19:25:40 CDT
Received: by yoda.ncsa.uiuc.edu id AA01347
  (5.64+/IDA-1.3.4 for ); Tue, 25 Sep 90 16:54:01 -0500
Received: by yoda.ncsa.uiuc.edu id AA01342
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 25 Sep 90 16:53:59 -0500
Message-Id: <9009252153.AA01342@yoda.ncsa.uiuc.edu>
Date: Tue, 25 Sep 90 09:12:05 -0700
From: fateman@ucbarpa.Berkeley.EDU (Richard Fateman)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Efficiency in Mathematica
Status: RO

I think that Dan's efficiency issue is not related to procedural
vs. functional, but a data-accessing problem.  
Repeatedly accessing the nth, (n+1)st, (n+2)nd, ... element of
a data structure by repeatedly scanning the same structure,
starting from the first location, is a real waste of time.
I think that is what the procedural version is doing.  A procedure
that explicitly takes into account the list-nature of the
structure may be just fine.

The general advice that using some built-in function (implemented
in C) in Mathematica, vs. writing your own "do loop" which will
be interpreted slowly, is reasonable, and probably contributes
somewhat to the difference in speed,  but replacing an O(n^2)
algorithm by an O(n) algorithm is usually a big win.
  -- Richard Fateman



From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Sep 25 20:12:21 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA01679
  (5.64+/IDA-1.3.4 for stevec); Tue, 25 Sep 90 20:12:19 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA12449; Tue, 25 Sep 90 20:10:18 CDT
Received: by yoda.ncsa.uiuc.edu id AA01352
  (5.64+/IDA-1.3.4 for ); Tue, 25 Sep 90 16:54:09 -0500
Received: by yoda.ncsa.uiuc.edu id AA01348
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 25 Sep 90 16:54:08 -0500
Message-Id: <9009252154.AA01348@yoda.ncsa.uiuc.edu>
Date: Tue, 25 Sep 90 09:19:51 -0700
From: ilan@Gang-of-Four.Stanford.EDU (Ilan Vardi)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Efficiency in Mathematica
Status: RO

   From: dan@chem.bu.edu (Dan Dill)
   Date: Thu, 20 Sep 90 14:03:52 -0400

   While Mathematica allows things to be done in different ways, the procedural
   way can be a real dog.

   On page 104 of Volume 1, Issue 1 of The Mathematica Jounral, is written
   "procedural programming is less efficient, longer and more difficult to
   understand".  The following example amply demonstrates for me at least the
   first two of these assertions, and, in hindsight, the third too.
   The Journal
   goes on to say that "sometimes it can take awhile to see how to do
   it.  The
   time spent is almost always worth it."  I certainly did have to
   play around a
    bit to see how to come up with a functional scheme, but it
   certainly was worth
   it.

This is basically wrong. First, there are some algorithms which don't
seem to have efficient functional implementations. A good example is
ToCycles, i.e., a program which finds the cycle decomposition of a
permutation in linear time. I thought about doing this for a long time
and I don't think it can be done though I don't know how to prove it's
impossible either. In any case I challenge anybody to do this.
 Here is a quadratic functional implementation of ToCycles. Frankly,
I think this code is rather obscure

ToCycles[a_] :=
   Select[Take[#, Length[Union[#]]]& /@
          Map[NestList[a[[#]]&, #, Length[a]] &, a],
          #[[1]] == Min[#]&] 




The second point is that Functional programming (in Mathematica
anyway) uses a lot of parallel constructs like Map which end up being
memory intensive. An iterative loop is more memory efficient.  As a
toy example, finding the sum of the first n integers directly is most
efficient as

sum[n_]:= Plus @@ Range[n]

for n < 50,000 on most computers. However, this probably won't work on
sum[10^7] so the following procedural method works by breaking it up
into smaller chunks and iterating. This seems the clearest way to do
it.


sum2[n_, k_]:= Block[{total = 0, i},
                  Do[total += Plus @@ Range[i, i + k - 1],
                     {i, 1, n, k}];
                  total + Plus @@ Range[n - Mod[n, k] + 1, n]]

On my computer sum2[10^5, 10^4] was also 10% faster than sum[10^5].

I would say that the way Mathematica was designed usually favors
functional programming, but that choice of style is a personal
decision ultimately.


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Oct  1 02:58:21 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA08967
  (5.64+/IDA-1.3.4 for stevec); Mon, 1 Oct 90 02:58:19 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA06019; Mon, 1 Oct 90 02:56:26 CDT
Received: by yoda.ncsa.uiuc.edu id AA08114
  (5.64+/IDA-1.3.4 for ); Sun, 30 Sep 90 23:14:19 -0500
Received: by yoda.ncsa.uiuc.edu id AA08110
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sun, 30 Sep 90 23:14:18 -0500
Message-Id: <9010010414.AA08110@yoda.ncsa.uiuc.edu>
From: dan@chem.bu.edu (Dan Dill)
Date: Thu, 27 Sep 90 12:56:13 -0400
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Efficiency in Mathematica.  Part 2
Status: RO

Richard (fateman@ucbarpa.Berkeley.EDU) comments that the essence of the speed
up is to have accessed, by whatever means, internal algorithms that take
advantage of the list structure of the data.

David Jacobson (jacobson@cello.hpl.hp.com) sent me a suggestion that may do
just this, in the context of "traditional" subscripting.  By itself David's
method reduced the time from 870 seconds to 9.6 seconds, only about twice as
slow as the fastest scheme I have been able to achieve.

I include David's text below, but the idea is to prevent Mathematica from
knowing it is dealing with a list until all subscripting is done:

	SetAttributes[HoldList,HoldAll];
	ne = 50; nkmat = 18; (* The values were used earlier, too *)
	oldmodhold := Block[{i,j},
        	data = Apply[HoldList, Apply[HoldList,data,4]];
	        For[i = 1, i < ne + 1, i++,
        	        For[j = 1, j < nkmat + 1, j++,
                	        data[[i,2,j,1]] =
                        	        N[Mod[data[[i,2,j,1]], 1], 8]
	                ]
        	];
	        data = Apply[List, Apply[List,data,4]];
	];

	Timing[oldmodhold;]

	Out[137]= {9.58333 Second, Null}

Recall that oldmod differs from the above by the absence of the Apply[...]
before and after the double loop, and the timing is then 870 seconds.

So David must be onto something.  Here's David's message:

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

>From jacobson@cello.hpl.hp.com Tue Sep 25 13:45:14 1990
Return-Path: <jacobson@cello.hpl.hp.com>
Received: from hplms2.hpl.hp.com by chem.bu.edu (5.61+++/JLK-4.0.3)
	id AA11645; Tue, 25 Sep 90 13:45:10 -0400
Received: from cello.hpl.hp.com by hplms2.hpl.hp.com with SMTP
	(15.11.1.3/15.5+IOS 3.20) id AA17661; Tue, 25 Sep 90 10:47:20 pdt
Received: from localhost by cello.hpl.hp.com with SMTP
	(15.11/15.5+IOS 3.14) id AA25443; Tue, 25 Sep 90 10:46:41 pdt
To: dan@chem.bu.edu (Dan Dill)
Subject: Re: Efficiency in Mathematica
In-Reply-To: Your message of "Thu, 20 Sep 90 14:03:52 PDT."
             <9009250532.AA00115@yoda.ncsa.uiuc.edu>
Date: Tue, 25 Sep 90 10:46:35 PDT
Message-Id: <25441.654284795@cello.hpl.hp.com>
From: jacobson@cello.hpl.hp.com
Status: RO

I've also noticed that programs that munge on just part of a list
using subscripting run like molassas.  I'm suspicious that a good part
of the performance problem lies in the subscript operation.  It
evaluates both arguments, and the first is the whole giant list.  So,
in principle, the whole list gets scanned on each reference to see if
there is anything that will evaluate.  Internally, Mathematica seems
to have some bunch of flags to avoid multiple evalutations, but when
you are using subscripting on the left hand side, it may clear the
flag.

I've found that the following trick will often speed such things up by
an order of magnitude.  First do this.

SetAttributes[HoldList,HoldAll]

HoldList will be a "function" that works about like List, except that
it does not evaluate its arguments.

You can easily replace the outmost List with HoldList with

Apply[HoldList,<<<the old list>>>]

Then you do all the subscripting, then let it all evaluate at one swoop
with

Apply[List,<<<the munged HoldList>>>].

In your case, you might want to use HoldList at 2 levels.

If you see fit, I'd appreciate you trying this trick and reporting to
the mathgroup what the performance was.

  -- David Jacobson



From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Oct  1 04:27:37 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA09061
  (5.64+/IDA-1.3.4 for stevec); Mon, 1 Oct 90 04:26:39 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA09092; Mon, 1 Oct 90 04:23:51 CDT
Received: by yoda.ncsa.uiuc.edu id AA08104
  (5.64+/IDA-1.3.4 for ); Sun, 30 Sep 90 23:14:02 -0500
Received: by yoda.ncsa.uiuc.edu id AA08100
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sun, 30 Sep 90 23:14:01 -0500
Message-Id: <9010010414.AA08100@yoda.ncsa.uiuc.edu>
Date:    Wed, 26 Sep 1990 10:21:41 MDT
From: MARZKE@ASUCP1.LA.ASU.EDU
Subject: Fitting data with Mathematica
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Novak at Mathematica referred me to your group for this question. If I want
to fit data to an expression which I already know the functional form of,
but which contains adjustable parameters such as the value of a magnetic
field, initial angle of a nuclear spin with respect to that field, etc.,
how do I use Mathematica to find least-squares "best" values of these
parameters to fit the data? In other words, how do I use Mathematica to
obtain non-linear, parametric, least-squares fits to experimental data?
There are large, cumbersome FORTRAN programs like CERN's MINUIT which do
this for Nuclear and Particle Physics data, I know. But one thing which is
generally lacking is a powerful, easy-to-use FIT routine of this kind
running on workstations. I have been advised by an expert on MacSyma that
one does not want to do this kind of thing with symbolic algebra programs,
because they will be very slow. My reply to that thought is that often one
needs to fit data somewhat roughly, at least, and be able to look at it
immediately on screen in the form of a plot, or do other calculations and
plots based which involve some processing of the data, etc. For these the
capabilities of the packages make up for the slowness of the calculations,
in many ways. Does your group know of any Mathematica-based approaches to
this question? The FIT command in Mathematica is far too limited.
Bob Marzke
Physics Department
Arizona State University
Bitnet: MARZKE@ASUCPS
Phone:  602-965-6197
Department Phone: 602-965-3561
FAX:    602-965-7954


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Oct  2 23:43:35 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA11947
  (5.64+/IDA-1.3.4 for stevec); Tue, 2 Oct 90 23:43:33 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA22619; Tue, 2 Oct 90 23:41:43 CDT
Received: by yoda.ncsa.uiuc.edu id AA11798
  (5.64+/IDA-1.3.4 for ); Tue, 2 Oct 90 21:11:35 -0500
Received: by yoda.ncsa.uiuc.edu id AA11794
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 2 Oct 90 21:11:34 -0500
Message-Id: <9010030211.AA11794@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: LISP/Mathematica Interface
Date: Mon, 01 Oct 90 10:00:54 +0100
From: Ron I. Herman <fed!m1rih00@uunet.UU.NET>
Status: RO

Does anyone have any information about an interface between LISP
and Mathematica?

Ron Herman



From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Oct  3 02:37:12 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA12944
  (5.64+/IDA-1.3.4 for stevec); Wed, 3 Oct 90 02:37:11 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA20775; Wed, 3 Oct 90 02:35:20 CDT
Received: by yoda.ncsa.uiuc.edu id AA11808
  (5.64+/IDA-1.3.4 for ); Tue, 2 Oct 90 21:11:48 -0500
Received: by yoda.ncsa.uiuc.edu id AA11804
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 2 Oct 90 21:11:46 -0500
Date: Tue, 2 Oct 90 21:11:46 -0500
Message-Id: <9010030211.AA11804@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.EDU
From: ONM010@de0hrz1a.bitnet
Subject: Non-linear fitting in Mathematica
Status: RO

It is indeed possible to perform non-linear fits with Mathematica,
however, it seems to be very slow indeed. Some time ago I tried a
simple 4-parameter fit involving 2 Gaussians. I first specified the
function with the parameters to be fitted max, g, s1, and s1:

f[x_]:=max ( g Exp[-1/2 x^2/s1^2] + (1-g) Exp[-1/2 x^2/s2^2] )

Then I put the 128 (experimental) data points into 2 tables:

x=Table[data[[i,1]],{i,1,ndat}]

y=Table[data[[i,2]],{i,1,ndat}]

I defined the least-squares function to be minimized:

chisq=Sum[(y[[i]]-f[x[[i]]])^2,{i,1,ndat}]

FindMinimum can be used to perform the non-linear fitting operation:

FindMinimum[chisq, {g,ginit}, {max,maxinit}, {s1,s1init}, {s2,s2init},
                   Gradient -> {D[chisq,g],
                                D[chisq,max],
                                D[chisq,s1],
                                D[chisq,s2]},
                   AccuracyGoal -> 4,
                   MaxIterations -> 50 ]

There were about 128 data points and I used initial guesses which were
close to the final parameter values at the solution. I remember that
it took over an hour to converge to a solution on a Macintosh SE/30
with 8 MB memory using the enhanced version of Mathematica 1.2.1.

For comparison, I fitted in double precision FORTRAN using NL2SOL
(Dennis JE, Gay DM, Welsch RE. An adaptive nonlinear least-squares
algorithm. ACM Trans Math Software 7:348-368, 1981) for the
minimization. I compiled with Microsoft Fortran v. 2.2 which doesn+t
even use the floating point hardware of the SE/30. The fit took about
2 or 3 seconds for the same number of datapoints and not much longer
even for worse initial parameter guesses. The above formulation of the
problem im Mathematica is not optimized for speed and probably far
from ideal. Has anybody come up with an efficient approach for
non-linear parameter fitting in Mathematica or are these long
execution times really the price one has to pay for convenience?

Best regards!

Stefan

=================================================================
  Dr. Stefan P. Mueller, Nuklearmedizin, Universitaetsklinikum,
  Hufelandstr. 55, D-4300 Essen 1, Federal Republic of Germany,
  e-mail: onm010@de0hrz1a on BITNET, FAX: <49>  (201) 723-4694,
  phone:  <49>  (201) 723-2080 or 2081 or 2032
=================================================================


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Oct  3 04:02:30 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA13141
  (5.64+/IDA-1.3.4 for stevec); Wed, 3 Oct 90 04:02:28 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA23745; Wed, 3 Oct 90 03:58:29 CDT
Received: by yoda.ncsa.uiuc.edu id AA11915
  (5.64+/IDA-1.3.4 for ); Tue, 2 Oct 90 23:30:42 -0500
Received: by yoda.ncsa.uiuc.edu id AA11911
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 2 Oct 90 23:30:41 -0500
Message-Id: <9010030430.AA11911@yoda.ncsa.uiuc.edu>
Date: Tue, 2 Oct 90 20:04:20 -0700
From: "Max G. Webb" <maxwebb@vitus.cse.ogi.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Points problem
Status: RO

Help!!!

The following code should draw some largish grey points
and a few lines. When FAIL is asserted (as indicated
by the ifdef - of course, you should also get rid of the #-lines
inserted by the c preprocessor) the POINTS disappear!!?!!

All the ifdef does is control the inclusion of the last two
line commands (while keeping correct `,' separation)

Why should these lines presence or absence control the display
of the points? It is in a _different_list_!!??
::::::cut here::::::
Show[Graphics3D[

{
  {PointSize[0.05], GrayLevel[0.5], 
   Point[{-1.367511195263215,
	   0.001195340754223037,
	   0.003139555787092553}], 
   Point[{-1.367512718901739,
	   0.001195342899414338,
	   0.001639740038943013}], 
   Point[{1.36085379675106,
	  0.002607945574256309,
	  0.00372862923999308}], 
   Point[{1.3608552544435,
	  0.00111807892934969,
	  0.003728634284214638}]
 }, 
 {
   Line[{{0., 0., 0.},
	 {-0.003327336062,
	   0.0004133633611,
	   0.0008263234388}}], 
   Line[{{-0.003327336062, 0.0004133633611, 0.0008263234388}, 
#ifdef FAIL
	 {-0.1820927732, 0.0001372407256, 0.0002758916286}}], 
   Line[{{-0.1854201093010261,
	   0.0005506040866933036,
	   0.001102215067405295}, 
	 {0., 0., 0.}}],
   Line[{{-0.1854201093010261,
	   0.0005506040866933036,
	   0.001102215067405295},
	   {-0.1820927751, 0.0001345637681, 0.0002715492562}}]
#else FAIL
	 {-0.1820927732, 0.0001372407256, 0.0002758916286}}] 
#endif FAIL
 }
}
     ]]


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Oct  3 00:37:56 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA12650
  (5.64+/IDA-1.3.4 for stevec); Wed, 3 Oct 90 00:37:53 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA26205; Wed, 3 Oct 90 00:35:52 CDT
Received: by yoda.ncsa.uiuc.edu id AA11803
  (5.64+/IDA-1.3.4 for ); Tue, 2 Oct 90 21:11:41 -0500
Received: by yoda.ncsa.uiuc.edu id AA11799
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 2 Oct 90 21:11:40 -0500
Message-Id: <9010030211.AA11799@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Fitting data with Mathematica 
Date: Mon, 01 Oct 90 08:35:06 PDT
From: jacobson@cello.hpl.hp.com
Status: RO

MARZKE@ASUCP1.LA.ASU.EDU asks

> If I want to fit data to an expression which I already know the
> functional form of, but which contains adjustable parameters such as
> the value of a magnetic field, initial angle of a nuclear spin with
> respect to that field, etc., how do I use Mathematica to find
> least-squares "best" values of these parameters to fit the data? In
> other words, how do I use Mathematica to obtain non-linear,
> parametric, least-squares fits to experimental data?


The trick is to use FindMinimum.  Develop your own function that 
expresses the goodness of fit.  The sum of squares of differences is
probably the thing to use.  Then use FindMinimum.  Here is an example

I made a list of points in "datalist" that were pairs {x,3.456
E^(2.345 x)} for 300 random values of x.  Now suppose we only knew
that the form of the functions was f[x] = a + E^(b x) and we want to
find a and b.  "fitfunction" tells how good a given a and b fit the
data.  In step 11 I invoke FindMinimum telling it to start looking
around a=3 and b=2.  

In[10]:= fitfunction[a_,b_] := Apply[Plus,Map[(#[[2]]-(a E^(b #[[1]])))^2&,
datalist]]

In[11]:= FindMinimum[fitfunction[a,b],{a,3},{b,2}]

Out[11]= {0., {a -> 3.456, b -> 2.345}}

The one catch is that I think FindMinimum will barf if it can't
differentiate to get gradient functions.  I haven't tried something
that will test this, though.

There are options to FindMinimum.  Read its description carefully.  Be
careful of the WorkingPrecision option.  It can be dangerous.  

  -- David Jacobson


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Oct  3 01:22:27 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA12739
  (5.64+/IDA-1.3.4 for stevec); Wed, 3 Oct 90 01:22:25 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15895; Wed, 3 Oct 90 01:20:18 CDT
Received: by yoda.ncsa.uiuc.edu id AA11793
  (5.64+/IDA-1.3.4 for ); Tue, 2 Oct 90 21:11:29 -0500
Received: by yoda.ncsa.uiuc.edu id AA11789
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 2 Oct 90 21:11:28 -0500
Message-Id: <9010030211.AA11789@yoda.ncsa.uiuc.edu>
Date: Mon, 1 Oct 90 09:25:09 EDT
From: prs@cook.whoi.edu (Peter R. Shaw)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Spherical Harmonic summary
Status: RO

Thanks to everyone who responded to my query about
evaluating the spherical harmonic function Ylm
for theta=0 and phi=0. 

Given the way mathematica evaluates expressions, the
most stable way to obtain this result is to use:

SphericalHarmonicY[2,0,theta,phi] /. {theta->0, phi->0}
(Several people pointed out variations of this command).

John Schmidt writes that Wolfram acknowledges the error messages
when asking for expressions like SphericalHarmonicY[2,0,0,0]
be a bug, which may get fixed in a future release.

Meanwhile, I have discovered that when I ask for the *plot*,
say, using the command:

Plot[{ SphericalHarmonicY[2,0,theta,phi] /.phi->0 },
{theta,0,Pi}]

Mathematica barfs up a few complaints, and then
goes on to draw the correct plot, presumably applying a limiting
algorithm at theta->0. 
This also happens for the simpler command:

Plot[SphericalHarmonicY[2,0,theta,0], {theta,0,Pi}] .

By the way, what I'm using all this for is to make animations of
Earth's free oscillations from an earthquake, for my class
in Geophysics. If anybody wants to see the 1st Toroidal mode
of oscillation, run this script, and then animate it (on
the Macintosh):
<<ParametricPlot3D.m
w=.3;
l:=2; m:=0;
ylm:=SphericalHarmonicY[l,m,theta,phi];
utheta:=(w/Sin[theta]) D[ylm,phi];
uphi:=-w D[ylm,theta];
Do[
A:= .2;
amp:=A Cos[tphase];
u:=theta+amp utheta; v:=phi+amp uphi;
ParametricPlot3D[
{Sin[u] Cos[v], Sin[u] Sin[v], Cos[u]},
{theta, 0, Pi, Pi/15}, {phi,0,2Pi,Pi/15},
BoxRatios->{1,1,1},
PlotRange->{{-1,1},{-1,1},{-1,1}},
ViewPoint->{2.872, 1.166, 1.356}],
{tphase,0,Pi,Pi/4}]

---------------------------------------------
Peter R. Shaw    pshaw@aqua.whoi.edu
Woods Hole Oceanographic Institution
---------------------------------------------




From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Oct  3 20:22:24 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA14307
  (5.64+/IDA-1.3.4 for stevec); Wed, 3 Oct 90 20:22:22 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA28112; Wed, 3 Oct 90 20:20:33 CDT
Received: by yoda.ncsa.uiuc.edu id AA14170
  (5.64+/IDA-1.3.4 for ); Wed, 3 Oct 90 17:47:03 -0500
Received: by yoda.ncsa.uiuc.edu id AA14166
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 3 Oct 90 17:47:02 -0500
Message-Id: <9010032247.AA14166@yoda.ncsa.uiuc.edu>
Date: Wed, 3 Oct 90 15:29:37 -0700
From: fateman@ucbarpa.Berkeley.EDU (Richard Fateman)
Subject: Re: LISP/Mathematica Interface
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO


There are several lisp systems that allow you to do virtually
anything you could do "from C"  from the lisp system.
The so-called "foreign function call" feature is reasonably
widespread.

Although you are probably not referring to this kind of
interface, I wrote a program in Common Lisp that has the
ability to read what looks just like Mathematica input
(version 1.2), and produce "FullForm" expressions in the
usual Lisp prefix form.  These can then be manipulated
in Lisp.

Thus you could (a) write a front end in Lisp to Mathematica
(or for that matter, any other program) that "looked like"
Mathematica.
  or (b) you could write a back end in Lisp that chewed on
Mathematica syntax it was fed from a mathematica front end.

or for that matter, by combining (a) and (b), you could
eliminate the need for mathematica entirely by writing in
Lisp, if you were so inclined.

-- Richard Fateman


From kirchner@cs.umn.edu Sat Oct  6 19:47:43 1990
Received: from cs.umn.edu by yoda.ncsa.uiuc.edu with SMTP id AA20570
  (5.64+/IDA-1.3.4 for stevec); Sat, 6 Oct 90 19:47:39 -0500
Received: by cs.umn.edu (5.59/1.14)
	id AA00636; Sat, 6 Oct 90 19:48:07 CDT
Date: Sat, 6 Oct 90 19:48:07 CDT
From: "Roger B. Kirchner" <kirchner@cs.umn.edu>
Message-Id: <9010070048.AA00636@cs.umn.edu>
To: kirchner@cs.umn.edu, stevec@yoda.ncsa.uiuc.edu
Subject: Re:  Problem with Function
Status: RO

Thanks you for letting me know.  We should be getting 2.0 soon.  Too
bad, though, that the problem is in all earlier versions of Mathematica.
The examples I would like to write -- with a function argument called
with Function[...] won't be portable.  (I hope you mean that 2.0 Mathematica
is being supplied with 2.0 NeXT.)
Roger

From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Oct  6 21:39:43 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA20700
  (5.64+/IDA-1.3.4 for stevec); Sat, 6 Oct 90 21:39:26 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA17432; Sat, 6 Oct 90 21:37:23 CDT
Received: by yoda.ncsa.uiuc.edu id AA20538
  (5.64+/IDA-1.3.4 for ); Sat, 6 Oct 90 18:50:51 -0500
Received: by yoda.ncsa.uiuc.edu id AA20534
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 6 Oct 90 18:50:49 -0500
Message-Id: <9010062350.AA20534@yoda.ncsa.uiuc.edu>
Date: Fri, 5 Oct 90 07:51:33 CDT
From: "Roger B. Kirchner" <kirchner@cs.umn.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Problem with Function
Status: RO

I am having the following problem on a NeXT.  Is it specific
to the NeXT or is it present in other versions of Mathematica?

In[1]:= f = Function[x, x + x^2]

                         2
Out[1]= Function[x, x + x ]

In[2]:= f'[2]

Out[2]= 5

In[3]:= g = Function[x, x - x^2]

                         2
Out[3]= Function[x, x - x ]

In[4]:= g'[2]

                          2
Out[4]= (Function[x, x - x ])'[2]

Thanks.
Roger Kirchner
rkirchne@mathcs.carleton.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Oct  6 23:00:06 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA20782
  (5.64+/IDA-1.3.4 for stevec); Sat, 6 Oct 90 22:59:56 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA24550; Sat, 6 Oct 90 22:57:57 CDT
Received: by yoda.ncsa.uiuc.edu id AA20543
  (5.64+/IDA-1.3.4 for ); Sat, 6 Oct 90 18:50:57 -0500
Received: by yoda.ncsa.uiuc.edu id AA20539
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 6 Oct 90 18:50:56 -0500
Message-Id: <9010062350.AA20539@yoda.ncsa.uiuc.edu>
Date: Fri,  5 Oct 90 17:38:02 -0400 (EDT)
From: "Douglas F. DeJulio" <dd26+@andrew.cmu.edu>
To: mathgroup@yoda.ncsa.uiuc.edu (yoda.ncsa.uiuc.edu)
Subject: MathTalk info?
Status: RO

Hello,

I'm thinking of writing my own front-end to Mathematica, because I use
a windowing system that's not widely used anywhere but at CMU.  The
only pointer I've found is a reference to a technical report called
"The MathTalk Communication Protocol" by one D. Grayson.  I haven't
been able to find a copy of this.  Was it published in a journal
somewhere?  Is it available online somewhere?  Is a description of the
protocol available from some other source?  Is there a place from
which I can order it?  Any help would be appreciated.

-- 
Doug DeJulio
dd26@andrew.cmu.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Sun Oct  7 00:23:57 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA21605
  (5.64+/IDA-1.3.4 for stevec); Sun, 7 Oct 90 00:23:42 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA27139; Sun, 7 Oct 90 00:21:52 CDT
Received: by yoda.ncsa.uiuc.edu id AA20548
  (5.64+/IDA-1.3.4 for ); Sat, 6 Oct 90 18:51:06 -0500
Received: by yoda.ncsa.uiuc.edu id AA20544
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 6 Oct 90 18:51:05 -0500
Message-Id: <9010062351.AA20544@yoda.ncsa.uiuc.edu>
Date: Sat, 6 Oct 90 12:23:53 EDT
From: myu@paul.rutgers.edu (Mike (Minjae) Yu)
To: mathgroup-request@yoda.ncsa.uiuc.edu
Subject: Question
Status: RO


 Hi, Mathematica. I am a clumsy user of Mathematica. I am wondering about
 batch mode in Mathematica under UNiX. How can I do that?
 Please answer me as soon as possible. Thank you.


                                                    Daiwoo Choi
                                                    Dept. Statistics
                                                    Hill ctr., Busch Campus
                                                    Rutger Univ.
                                                    Piscataway, NJ 08854
                                                    myu@paul.rutgers.edu

  P.S. Is there any information for Mathematica User's group?




From mathgroup-adm@yoda.ncsa.uiuc.edu Sun Oct  7 01:09:35 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA21788
  (5.64+/IDA-1.3.4 for stevec); Sun, 7 Oct 90 01:09:22 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA27848; Sun, 7 Oct 90 01:07:23 CDT
Received: by yoda.ncsa.uiuc.edu id AA20553
  (5.64+/IDA-1.3.4 for ); Sat, 6 Oct 90 18:51:15 -0500
Received: by yoda.ncsa.uiuc.edu id AA20549
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 6 Oct 90 18:51:14 -0500
Message-Id: <9010062351.AA20549@yoda.ncsa.uiuc.edu>
Date: Sat, 6 Oct 90 11:04:15 -0700
From: fateman@ucbarpa.Berkeley.EDU (Richard Fateman)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: bugs with N  ... 
Status: RO

Telling fortunes by reading N-trails?

Mathematica (sun3.68881) 1.2 (November 6, 1989) [With pre-loaded data]

(* Change $Post to look at all three attributes on display *)

In[1]:= p[x_]:= {x, Accuracy[x], Precision[x]}

In[3]:= $Post=p

.....
In[7]:= N[Sin[10^16],16,16]

Out[7]= {0.779679945161067, 16, 16}

In[9]:= N[Sin[10^16],20]
(* increasing precision decreases "Accuracy" *)
Out[9]= {0.78, 4, 4}

In[10]:= N[Sin[10^16],50]

Out[10]= {0.7796880066069787502355279540333621, 34, 34}

In[11]:= a=10^50

In[13]:= N[Sin[a],16]

Out[13]= {0.0937537918202386, 17, 16}
(* this answer is not good to 17 places. it is wrong in all places,
  and even has the wrong sign. *)

In[14]:= N[Sin[a],20]

Format::imz: Warning: Number with negative accuracy being printed as 0.
Out[14]= {0., -30, 0}
(* I think this means that Mathematica cannot determine Sin[a] within
  a range of -10^30 to +10^30.  Most people think that for real arguments
  the sine function is restricted to [-1,1] *)
In[16]:= N[Sin[a],49]

Out[16]= {0., -1, 0}

..

In[19]:= N[Sin[a],52]

Out[19]= {-0.8, 2, 2}

In[20]:= N[Sin[a],60]

Out[20]= {-0.789672493, 10, 10}

In[21]:= b=N[a,60]

Out[21]= {100000000000000000000000000000000000000000000000000., 10, 60}

(* M'ma's policy of making this number "accurate" to 10 places leads
  to foolishness. Why the location of the decimal place is so important,
  is hard to understand.  Are meters more accurate than millimeters? *)
In[22]:= Sin[b]

Out[22]= {-0.789672493, 10, 10}

In[23]:= N[Sin[b],16]

Out[23]= {-0.7896724934295026, 16, 16}

In[24]:= N[Sin[b],18]

Out[24]= {-0.789672493, 10, 10}

...
In[27]:= N[Sin[b],100]

Out[27]= {-0.789672493, 10, 10}

....
Of course some of these  anomalies are easily explained by knowing
how Mathematica "works".  That does not make them necessarily more
comforting.
  -- Richard Fateman


From mathgroup-adm@yoda.ncsa.uiuc.edu Sun Oct  7 02:04:57 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA21878
  (5.64+/IDA-1.3.4 for stevec); Sun, 7 Oct 90 02:04:45 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA28696; Sun, 7 Oct 90 02:02:49 CDT
Received: by yoda.ncsa.uiuc.edu id AA20533
  (5.64+/IDA-1.3.4 for ); Sat, 6 Oct 90 18:50:45 -0500
Received: by yoda.ncsa.uiuc.edu id AA20529
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 6 Oct 90 18:50:43 -0500
Message-Id: <9010062350.AA20529@yoda.ncsa.uiuc.edu>
Date: Thu, 4 Oct 90 00:49 EDT
From: CAMERON@midd.cc.middlebury.edu
Subject: Answer to "Points problem"
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

[[ Are members of MathGroup "MathGroupies" ?  ]]
[[ Should I say "elements of the MathGroup" ? ]]
[[ Is it abelian?  ]]

maxwebb@vitus.cse.ogi.edu (Max G. Webb) asks why some code like

   Show[Graphics3D[ pointlist, shortlinelist ]];

displays the points in pointlist, but

   Show[Graphics3D[ pointlist, longlinelist ]];

produces a display in which the points are missing.
He is falling afoul of a subtle feature of Mathematica
graphics: automatic scaling.  Consider the function

  boundingbox[x_] := Block[ {y=N[x]},
      positions = Position[y,{_?NumberQ,_?NumberQ,_?NumberQ}];
      coordinates = Apply[ (y[[##]])&, positions, {1} ];
      {Min[#],Max[#]}& /@ Transpose[coordinates]
  ]

This function takes a Graphics3D object (or list of 3D graphics
primitives) and returns a list {{xmin,xmax},{ymin,ymax},{zmin,zmax}}
indicating the ranges of x, y, and z coordinates in the object.
The original posting's values for pointlist, shortlinelist,
and longlinelist are reproduced for reference at the end of
this note.  With these values, we get

  boundingbox[pointlist]
  {{-1.367512718901739, 1.3608552544435},
  {0.00111807892934969, 0.002607945574256309},
  {0.001639740038943013, 0.003728634284214638}}

  boundingbox[shortlinelist]
  {{-0.1820927732, 0.}, {0., 0.0004133633611},
  {0., 0.0008263234388}}

  boundingbox[longlinelist]
  {{-0.1854201093010261, 0.}, {0., 0.0005506040866933036},
  {0., 0.001102215067405295}}

Note that the smallest y coordinate among the points is greater than
the largest y coordinate among the lines.  Similarly for the z coordinates.
The x range for the points encloses the x range for the lines, but is
about fourteen times as big.

Whenever Mathematica displays Graphics or Graphics3D objects,
if PlotRange->Automatic is in effect (as it is by default if no
explicit PlotRange is given) then Mathematica goes through a complicated
(and, as far as I know, completely undocumented) sequence of calculations
to decide what range of values to display along each coordinate axis.
This computation includes, essentially, an analysis of the mean and
variance of the coordinates in the graphics list, with graphics features
whose coordinates are "outliers" being rejected.  This is why, if you
ask Mathematica to do

    Plot[ Tan[x], {x,0,2Pi} ]

you get a reasonable plot, chopped off at reasonable y-coordinates.
The points "near" +/- infinity are chopped off because they are too far
from the mean y-coordinate (most points on that graph have y-coordinates
near 0; only points with x-coordinates very near Pi/2 or 3Pi/2 have
y-coordinates far from 0).

Although I don't know the details of how Mathematica decides what to keep
and what to reject, this example suggests that it gives more weight to
Line objects than to Point objects, because adding a couple of Line's
to the graphic radically changes the default scale.  At any rate,
if you do the following:

    Show[Graphics3D[{pointlist,shortlinelist}],
        PlotRange->{{-1.4,1.4},{0.,.003},{0.,.004}},
        BoxRatios->{1,1,1}
    ];

and

    Show[Graphics3D[{pointlist,longlinelist}],
        PlotRange->{{-1.4,1.4},{0.,.003},{0.,.004}},
        BoxRatios->{1,1,1}
    ];

then you override the automatic scaling, and you will get pictures that
I believe are much closer to what the original poster wanted and expected
to get.

--Cameron Smith
  Mathematica programming consultant
  CAMERON@MIDD.BITNET  --or--  cameron@midd.cc.middlebury.edu

The original posting had

  pointlist =
  {PointSize[0.05], GrayLevel[0.5],
   Point[{-1.367511195263215,
           0.001195340754223037,
           0.003139555787092553}],
   Point[{-1.367512718901739,
           0.001195342899414338,
           0.001639740038943013}],
   Point[{1.36085379675106,
          0.002607945574256309,
          0.00372862923999308}],
   Point[{1.3608552544435,
          0.00111807892934969,
          0.003728634284214638}]
  };

and

  shortlinelist =
  {
   Line[{{0., 0., 0.},
         {-0.003327336062,
           0.0004133633611,
           0.0008263234388}}],
   Line[{{-0.003327336062, 0.0004133633611, 0.0008263234388},
         {-0.1820927732, 0.0001372407256, 0.0002758916286}}]
  };

and

  longlinelist =
  {
   Line[{{0., 0., 0.},
         {-0.003327336062,
           0.0004133633611,
           0.0008263234388}}],
   Line[{{-0.003327336062, 0.0004133633611, 0.0008263234388},
         {-0.1820927732, 0.0001372407256, 0.0002758916286}}],
   Line[{{-0.1854201093010261,
           0.0005506040866933036,
           0.001102215067405295},
         {0., 0., 0.}}],
   Line[{{-0.1854201093010261,
           0.0005506040866933036,
           0.001102215067405295},
           {-0.1820927751, 0.0001345637681, 0.0002715492562}}]
  };



From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Oct 13 01:41:11 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA03736
  (5.64+/IDA-1.3.4 for stevec); Sat, 13 Oct 90 01:41:09 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA10402; Sat, 13 Oct 90 01:39:12 CDT
Received: by yoda.ncsa.uiuc.edu id AA02900
  (5.64+/IDA-1.3.4 for ); Fri, 12 Oct 90 21:26:21 -0500
Received: by yoda.ncsa.uiuc.edu id AA02890
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 12 Oct 90 21:26:04 -0500
Message-Id: <9010130226.AA02890@yoda.ncsa.uiuc.edu>
Date: Mon, 8 Oct 90 17:43:32 CDT
From: carl@crazyman.med.ge.com (Carl Crawford)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: long comments
Status: RO

it appears that mathematica does not like blank lines in the middle
of comments that stretch across a couple of lines. for example, the
following code will generate an error:

	(*
	line1

	line2
	*)

does anyone know why this happens?


Carl R. Crawford, Ph.D.	   Voice: 414-521-6572
GE Medical Systems	   Fax: 414-521-6575
P.O. Box 414, W-875	   Uucp: {sun!sunbird,uunet!crdgw1}!gemed!carl
Milwaukee, WI 53201	   Internet: carl@gemed.ge.com



From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Oct 13 05:15:23 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA04312
  (5.64+/IDA-1.3.4 for stevec); Sat, 13 Oct 90 05:15:20 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15231; Sat, 13 Oct 90 05:13:24 CDT
Received: by yoda.ncsa.uiuc.edu id AA03791
  (5.64+/IDA-1.3.4 for ); Sat, 13 Oct 90 01:58:12 -0500
Received: by yoda.ncsa.uiuc.edu id AA03787
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 13 Oct 90 01:58:11 -0500
Message-Id: <9010130658.AA03787@yoda.ncsa.uiuc.edu>
Date: Wed, 10 Oct 90 13:11 CST
From: MEZZINO@cl.uh.edu
Subject: Gear method
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

    Has anyone written a Mathematica package which implements
the Gear method for integrating stiff systems of differential equations?

Mike Mezzino, Chairman
Department of Mathematics
University of Houston - Clear Lake
2700 Bay Area Blvd.
Houston, TX 77058
mezzino@cl.uh.edu



From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Oct 13 04:26:46 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA04180
  (5.64+/IDA-1.3.4 for stevec); Sat, 13 Oct 90 04:26:44 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14526; Sat, 13 Oct 90 04:24:47 CDT
Received: by yoda.ncsa.uiuc.edu id AA02878
  (5.64+/IDA-1.3.4 for ); Fri, 12 Oct 90 21:25:32 -0500
Received: by yoda.ncsa.uiuc.edu id AA02874
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 12 Oct 90 21:25:30 -0500
Message-Id: <9010130225.AA02874@yoda.ncsa.uiuc.edu>
Date: Sat, 6 Oct 90 21:13:22 pdt
From: David Jacobson <jacobson@cello.hpl.hp.com>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Parameter passing "feature"
Status: RO

When a function has the HoldAll (or HoldFirst or HoldRest) attributes,
there are possible name conflicts between symbols in actual parameters
(arguments) and local variable declared in blocks (and I presume
iterators, but I didn't check).  See the following example

In[1]:= SetAttributes[baz,HoldAll]

In[2]:= baz[x_] := {Block[{z=3},x],x}

In[3]:= baz[1]

Out[3]= {1, 1}

In[4]:= z=1

Out[4]= 1

In[5]:= baz[z]

Out[5]= {3, 1}

I'm not sure this is a bug, but I thought it was something some of you
would like to know about.  

  -- David Jacobson

>From carl@crazyman.med.ge.com Mon Oct  8 18:04:33 1990
Received: from CRDGW1.GE.COM by yoda.ncsa.uiuc.edu with SMTP id AA23597
  (5.64+/IDA-1.3.4 for stevec); Mon, 8 Oct 90 18:04:25 -0500
Received:  by crdgw1.ge.com (5.57/GE 1.73)
	 id AA24610; Mon, 8 Oct 90 19:00:16 EDT
Received: from crazyman. by med.ge.com (3.2/SMI-3.2/bgb 8/30/89)
	id AA10422; Mon, 8 Oct 90 17:43:26 CDT
Received: by crazyman. (4.0/SMI-4.0)
	id AA00998; Mon, 8 Oct 90 17:43:32 CDT
Date: Mon, 8 Oct 90 17:43:32 CDT
From: carl@crazyman.med.ge.com (Carl Crawford)
Message-Id: <9010082243.AA00998@crazyman.>
To: mathgroup-adm@yoda.ncsa.uiuc.edu
Subject: long comments
Status: RO

it appears that mathematica does not like blank lines in the middle
of comments that stretch across a couple of lines. for example, the
following code will generate an error:

	(*
	line1

	line2
	*)

does anyone know why this happens?


Carl R. Crawford, Ph.D.	   Voice: 414-521-6572
GE Medical Systems	   Fax: 414-521-6575
P.O. Box 414, W-875	   Uucp: {sun!sunbird,uunet!crdgw1}!gemed!carl
Milwaukee, WI 53201	   Internet: carl@gemed.ge.com



From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Oct 13 03:56:35 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA04085
  (5.64+/IDA-1.3.4 for stevec); Sat, 13 Oct 90 03:56:34 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14038; Sat, 13 Oct 90 03:54:37 CDT
Received: by yoda.ncsa.uiuc.edu id AA02904
  (5.64+/IDA-1.3.4 for ); Fri, 12 Oct 90 21:26:28 -0500
Received: by yoda.ncsa.uiuc.edu id AA02887
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 12 Oct 90 21:25:56 -0500
Message-Id: <9010130225.AA02887@yoda.ncsa.uiuc.edu>
From: macg@SLCS.SLB.COM (Bill Macgregor)
Date: Wed, 10 Oct 90 14:44:39 CDT
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Flat esoterica
Status: RO


Two examples below of apparently inconsistent behavior wrt. the Flat
attribute.  Can anyone explain it?

  - Bill MacGregor

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

In[1]:= SetAttributes[f, Flat]

In[2]:= f[x_] := x

In[3]:= On[]

In[4]:= f[1]

f::trace: f[1] --> f[1].

f::trace: f[1] --> f[1].

f::trace: f[1] --> f[1].

f::trace: f[1] --> f[1].

f::trace: f[1] --> f[1].

f::trace: f[1] --> f[1].

f::trace: f[1] --> f[1].

^C

Interrupt:
        continue (or c) to continue
        show (or s) to show current operation (and then continue)
        trace (or t) to show all operations
        abort (or a) to abort current calculation
        exit (or quit) to exit program
? abort
-interrupted-

Out[4]= $Interrupted

In[5]:= Clear[f]

Clear::trace: Clear[f] --> Null.

In[6]:= f[x__] := Identity[x]

SetDelayed::trace: f[x__] := Identity[x] --> Null.

In[7]:= f[1]

f::trace: f[1] --> Identity[1].

Identity::trace: Identity[1] --> 1.

Out[7]= 1

 



From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Oct 13 03:23:14 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA03991
  (5.64+/IDA-1.3.4 for stevec); Sat, 13 Oct 90 03:23:13 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA13612; Sat, 13 Oct 90 03:21:06 CDT
Received: by yoda.ncsa.uiuc.edu id AA02883
  (5.64+/IDA-1.3.4 for ); Fri, 12 Oct 90 21:25:39 -0500
Received: by yoda.ncsa.uiuc.edu id AA02879
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 12 Oct 90 21:25:38 -0500
Message-Id: <9010130225.AA02879@yoda.ncsa.uiuc.edu>
Date: Wed, 10 Oct 90 11:50:19 CDT
From: "Roger B. Kirchner" <kirchner@cs.umn.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: On the Function problem
Status: RO

Several people have pointed out that the problem with Function is a
bug in Derivative[1] which doesn't know how to handle Subtract in
the version of Function which uses variables.  The bug seems to be in
all current versions of Mathematica.

A couple of people have observed that the problem does not exist with
the version of Function which uses slots.  This is just as good for my
purposes because I want to deemphasize variable names in function definitions.

In[1]:= f = Function[x, x^2 - x]

                     2
Out[1]= Function[x, x  - x]

In[2]:= f'[x]

                      2
Out[2]= (Function[x, x  - x])'[x]

In[3]:= g = Function[#^2 - #]

          2
Out[3]= #1  - #1 & 

In[4]:= g'[x]

Out[4]= -1 + 2 x

Roger Kirchner
rkirchne@mathcs.carleton.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Oct 13 02:37:16 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA03894
  (5.64+/IDA-1.3.4 for stevec); Sat, 13 Oct 90 02:37:15 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA11240; Sat, 13 Oct 90 02:35:17 CDT
Received: by yoda.ncsa.uiuc.edu id AA02902
  (5.64+/IDA-1.3.4 for ); Fri, 12 Oct 90 21:26:26 -0500
Received: by yoda.ncsa.uiuc.edu id AA02893
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 12 Oct 90 21:26:11 -0500
Message-Id: <9010130226.AA02893@yoda.ncsa.uiuc.edu>
Date: Mon, 8 Oct 90 14:16:06 PDT
From: decide!bobk@uunet.UU.NET (Bob Korsan)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Problem with Function (there isn't any...)
Status: RO

If you further define

In[1]:= h=Function[x,x + -x^2]

Out[1]:= Function[x, x- x^2]

In[2]:= h'[2]

Out[2]:= -3

The trick is that Subtract is not associative and hence

In[3]:= D[Funcion[x, x-x^2],x]

                             (1,0)     2            (0,1)    2
Out[3]:= Function[x, Subtract     [x, x ] + Subtract    [x, x  ] 2 x]


All in all, this is the reason why languages like APL have a different
symbol which is used for negation and for subtraction. They are different
concepts.

Peace
Bob Korsan


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Oct 16 01:54:18 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA08554
  (5.64+/IDA-1.3.4 for stevec); Tue, 16 Oct 90 01:54:16 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA21587; Tue, 16 Oct 90 01:52:22 CDT
Received: by yoda.ncsa.uiuc.edu id AA07790
  (5.64+/IDA-1.3.4 for ); Mon, 15 Oct 90 23:57:27 -0500
Received: by yoda.ncsa.uiuc.edu id AA07786
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 15 Oct 90 23:57:26 -0500
Message-Id: <9010160457.AA07786@yoda.ncsa.uiuc.edu>
From: macg@SLCS.SLB.COM (Bill Macgregor)
Date: Mon, 15 Oct 90 11:18:57 CDT
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Parameter passing "feature"
Status: RO

[in reply to a previous message from David Jacobson. -smc]

David -

    I don't think this problem is restricted to the case where 
the function is HoldFirst or HoldAll--I think it's a general problem.
In fact, when I showed this problem around the office, the Lisp people
said "Mathematica has the funarg problem; tell them to get with the
times."  This is a hoary problem for the Lisp community.

    The problem, as I understand it, is that Block variables aren't
really new symbols; they're the dynamically enclosing variable with the
values push'd at block entry and pop'd at exit.  This is an invitation
to disaster in cases like -

  f[x_] := Block[{y}, y = 2 x]

where f[y] produces an infinite loop.  In fact, to be completely safe,
you must insure that function block variables used as lhs's of Set are
distinct from all symbols in their corresponding rhs's, which may involve
the function arguments in arbitrary ways.  At first glance this is a
major violation of information hiding--the function's callers must avoid
using the function's local variables in actual arguments!

    The Mma book claims that this behavior is sometimes desirable (don't
think I believe it).  It further states (correctly) that the problem is
made less severe when f is defined in a package, and is therefore defined
context different from the one in which it normally used.

    For example, if f is defined in package FPackage, but called from
context Global on Global`y, the effect is

    f[Global`y] -> Block[{FPackage`y}, FPackage`y = 2 Global`y]

and everything is OK because the two y's are really different symbols.

    Name substitution still seems, to me at least, to be a serious design 
mistake in this case.  It's too dangerous.  Lisp abandoned it.  Forcing 
all Block variables to be truly unique symbols would seem a much better 
choice.

  - Bill MacGregor


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Oct 16 03:13:44 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA08640
  (5.64+/IDA-1.3.4 for stevec); Tue, 16 Oct 90 03:13:42 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA22897; Tue, 16 Oct 90 03:11:40 CDT
Received: by yoda.ncsa.uiuc.edu id AA07775
  (5.64+/IDA-1.3.4 for ); Mon, 15 Oct 90 23:57:04 -0500
Received: by yoda.ncsa.uiuc.edu id AA07771
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 15 Oct 90 23:57:02 -0500
Message-Id: <9010160457.AA07771@yoda.ncsa.uiuc.edu>
Date: Sat, 13 Oct 90 04:41:06 CDT
From: cook@dragonfly.wri.COM
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  Flat esoterica
Status: RO

The attribute Flat has the following effect on pattern matching:

In[67]:= SetAttributes[f,Flat]

In[68]:= f[foo]:=bar

In[69]:= f[glub, flub, foo, snoo]

Out[69]= f[glub, flub, bar, snoo]

As you can see, it uses the fact that f is Flat as permission to
interpret f[glub, flub, foo, snoo] as f[glub, flub, f[foo], snoo].

A definition like f[x_]:=x  will lead to an infinite loop when used,
since f's Flatness tells Mathematica to first look at f[x] as f[f[x]].

        Flatness of f                f[x_]:=something
f[x] -------------------> f[f[x]] ----------------------> f[something]
          ^                                                   /
          |                                                  /
           --------------------------------------------------

Basically, if f is Flat, then you should be very careful when defining rules
for f of a single argument, since every argument of f can be thought of
as having its own little f enveloping it.


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Oct 16 04:08:48 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA08725
  (5.64+/IDA-1.3.4 for stevec); Tue, 16 Oct 90 04:08:43 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA25269; Tue, 16 Oct 90 04:06:46 CDT
Received: by yoda.ncsa.uiuc.edu id AA07780
  (5.64+/IDA-1.3.4 for ); Mon, 15 Oct 90 23:57:12 -0500
Received: by yoda.ncsa.uiuc.edu id AA07776
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 15 Oct 90 23:57:11 -0500
Message-Id: <9010160457.AA07776@yoda.ncsa.uiuc.edu>
Date: Sun, 14 Oct 90 15:02 EDT
From: CAMERON@midd.cc.middlebury.edu
Subject: Parameter passing "feature" is correct!
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

David Jacobson writes:

> When a function has the HoldAll (or HoldFirst or HoldRest) attributes,
> there are possible name conflicts between symbols in actual parameters
> (arguments) and local variable declared in blocks...

Quite true.  Mathematica's evaluation strategy is (at least 80% of the
time) pure textual substitution and term-rewriting.  In the example below,
"foo[z]" causes the pattern variable "x" to match the "z" (which is not
rewritten because of the "HoldAll" attribute).  The MEANING of the ":="
is that whatever is matched by the pattern variables on the left-hand
side is substituted for those variables on the right-hand side.
Thus "foo[z]" is rewritten to "{Block[{z=3},z],z}".  After that rewriting
happens, "foo" (and its "HoldAll" attribute) are no longer part of the
expression, so further rewriting can now happen.  The first element of
the list has "z" inside a Block in which "z" has the value 3, so that
"z" rewrites to 3 (this rewriting is what it MEANS in Mathematica for
"z" to "have the value 3").  The second element is not inside a block,
so the "z" there gets rewritten according to the global rules, which
give "z" the value 1.

> I'm not sure this is a bug, ...

It's not.  I suppose you could claim that it's a "design misfeature",
but Mathematica IS DOING what it's documented to do.  This is why there
are "Contexts" in the language.  Compare the behavior of "foo" to
that of "bar" below.  Once again the "z" in "bar[z]" is not rewritten
immediately because of a "HoldAll" attribute.  But this time "bar[z]"
gets rewritten to "{Block[{Private`z=3},{z,Private`z}],{z,Private`z}}".
Now a "z" in the context "Private`" is NOT the same symbol as a
"z" in the (default) context "Global`", so the rule on "Private`z"
inside the Block does not affect the "z" that was passed in as the
argument to "bar".  The result is that of the two distinct "z"'s
inside the Block, the first one gets rewritten according to the
rules for "Global`z", so it becomes a 1, while the second gets
rewritten according to the rules for "Private`z", so it becomes a
3.  The two "z"'s in the second sublist are in the scope of the
global rules only, not inside a Block, so the first one ("Global`z")
gets rewritten to 1 as before, but the second one ("Private`z")
does not get rewritten at all, because the global rule base contains
no rules for the symbol "Private`z".

Of course, the usual way of putting symbols into a different context
than "Global`" is not to write the fully-qualified names with explicit
context prefixes, but to use "Begin[]" or "BeginPackage[]" to tell
the parser to use a different context as default until the corresponding
"End[]" or "EndPackage[]".  The parser interprets symbol names not explicitly
qualified by a context prefix as belonging to the context named by the
current value of "$Context", which is affected by "Begin[]", "BeginPackage[]",
"End[]", and "EndPackage[]".


In[1]:= SetAttributes[foo, HoldAll]

In[2]:= foo[x_] := { Block[{z=3},x], x }

In[3]:= foo[1]

Out[3]= {1, 1}

In[4]:= z=1; foo[z]

Out[4]= {3, 1}

In[5]:= SetAttributes[bar, HoldAll]

In[6]:= bar[x_] := { Block[{Private`z=3}, {x,Private`z} ], {x,Private`z} }

In[7]:= z

Out[7]= 1

In[8]:= bar[z]

Out[8]= {{1, 3}, {1, Private`z}}

In[9]:= bar[1]

Out[9]= {{1, 3}, {1, Private`z}}


I hope this explanation causes more understanding than confusion!

--Cameron Smith
  Mathematica programming consultant
  CAMERON@MIDD.BITNET  --or--  cameron@midd.cc.middlebury.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Oct 16 04:16:29 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA08745
  (5.64+/IDA-1.3.4 for stevec); Tue, 16 Oct 90 04:16:25 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA25345; Tue, 16 Oct 90 04:14:31 CDT
Received: by yoda.ncsa.uiuc.edu id AA07785
  (5.64+/IDA-1.3.4 for ); Mon, 15 Oct 90 23:57:19 -0500
Received: by yoda.ncsa.uiuc.edu id AA07781
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 15 Oct 90 23:57:18 -0500
Message-Id: <9010160457.AA07781@yoda.ncsa.uiuc.edu>
Date: Sun, 14 Oct 90 14:32:41 -0400
From: fink@acf5.NYU.EDU (Howard Fink)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica Conference attendance
Status: RO

I'd like to go, and wonder if anyone in San Francisco is attending
and would like to make some money putting me up for a few days.
Jan 11-15, 1991.
Please reply to:
fink@acf5.nyu.edu

Thanks!


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Oct 17 23:49:10 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA12442
  (5.64+/IDA-1.3.4 for stevec); Wed, 17 Oct 90 23:49:07 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA20431; Wed, 17 Oct 90 23:47:11 CDT
Received: by yoda.ncsa.uiuc.edu id AA12253
  (5.64+/IDA-1.3.4 for ); Wed, 17 Oct 90 20:44:10 -0500
Received: by yoda.ncsa.uiuc.edu id AA12249
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 17 Oct 90 20:44:08 -0500
Message-Id: <9010180144.AA12249@yoda.ncsa.uiuc.edu>
Date: Tue, 16 Oct 90 09:53:10 -0400 (EDT)
From: Michael Albert <ma1q+@andrew.cmu.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Flat esoterica
Status: RO

As noted, rules for flat functions on one variable lead to problems as
Mathematica finds that it can continually use them by nsting the
function. 
Is there any way around this? 

The examples I have in mind particularly are functions like union and
intersection (where f[x_] := x is a very desirable simplification!)

Michael Albert
Dept. of Mathematics
Carnegie Mellon University


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Oct 18 00:49:34 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA13154
  (5.64+/IDA-1.3.4 for stevec); Thu, 18 Oct 90 00:49:32 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA22660; Thu, 18 Oct 90 00:47:30 CDT
Received: by yoda.ncsa.uiuc.edu id AA12259
  (5.64+/IDA-1.3.4 for ); Wed, 17 Oct 90 20:45:45 -0500
Received: by yoda.ncsa.uiuc.edu id AA12255
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 17 Oct 90 20:45:43 -0500
Message-Id: <9010180145.AA12255@yoda.ncsa.uiuc.edu>
Date: Wed, 17 Oct 90 16:11:12 CDT
From: pea@dragonfly.wri.com
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica Conference
Status: RO


		       ---------------o0o---------------

			  1991 MATHEMATICA CONFERENCE
			     January 12-15, 1990
			  San Francisco, California

		       ---------------o0o---------------


LOCATION
Hyatt Regency Hotel, Embarcadero Center, 
San Francisco, California

TIMES

Sessions and Exhibits: 2 pm Saturday, January 12 -- 
2 pm Tuesday, January 15

On-Site Registration begins at 12 noon on Saturday, January 12

RELATED CONFERENCES IN SAN FRANCISCO
o MACWORLD Expo, January 10-13
o American Mathematical Society Meeting, January 16-19

FEATURES
o Invited Lectures
o Application Highlights Show
o Forums/Panels
o Mathematica Clinics
o Workshops
o Programming Competition
o Special Interest Groups

TUTORIALS

Elementary:
o Introduction to Mathematica  
o Introduction to Mathematica Programming
o Numeric Computation
o Algebraic Computation
o Text Manipulation
o Using Notebooks
o New Features Update

Intermediate:
o Graphics Programming 
o Data Analysis 
o Calling Programs from Mathematica
o Mathematica Programming Style
o Producing Graphics for Publication
o Mathematica Educational Labs
o Creating Mathematica Courseware

Advanced:
o Advanced Programming
o MathLink
o Mathematica Implementation
o Designing Mathematica Packages
o Networking
o Advanced New Features
o Mathematica System Administration

Other topics to be announced.

EXHIBITS
o Hardware systems  
o Compatible software  
o Books/Publications
o Mathematica services
o Training/Consulting

OTHER CONTRIBUTED MATERIAL
o Short Talks
o Computer-aided Poster Presentations  
o Teaching Laboratory Sessions
o Graphics Gallery

FEES   

Before December 14, 1990:
Regular: $275
Educational: $175
Student: $50

After December 14, 1990:
Regular: $325
Educational: $225
Student: $75
 
INFORMATION/REGISTRATION:

1991 Mathematica Conference
P.O. Box 3848
Champaign, IL 61826-3848
217-398-0700
fax: 217-398-0747
email: conf@wri.com

Deadline for conference submissions November 15, 1990

ABOUT MATHEMATICA 

Mathematica is an integrated technical computing environment, 
which performs numeric, symbolic and graphical computations,
and embodies a high-level programming language.

Developed by Wolfram Research, Inc. Mathematica is available on 
Macintosh, MS-DOS 386, workstations and larger computers.

The 1991 Mathematica Conference is intended for all current 
and prospective users of Mathematica.

Sponsored in part by Wolfram Research, Inc. 
and Addison-Wesley Publishing Company




From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Oct 23 02:50:14 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA20803
  (5.64+/IDA-1.3.4 for stevec); Tue, 23 Oct 90 02:50:12 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA00692; Tue, 23 Oct 90 02:48:21 CDT
Received: by yoda.ncsa.uiuc.edu id AA20727
  (5.64+/IDA-1.3.4 for ); Tue, 23 Oct 90 01:29:44 -0500
Received: by yoda.ncsa.uiuc.edu id AA20723
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 23 Oct 90 01:29:43 -0500
Message-Id: <9010230629.AA20723@yoda.ncsa.uiuc.edu>
Date: Thu, 18 Oct 90 18:44:11 CDT
From: cook@dragonfly.wri.com
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Flat esoterica
Status: RO

The way to get around problems when defining f[x_]=something
for flat functions f is to set the attribute OneIdentity:

In[1]:= SetAttributes[f,{Flat,OneIdentity}]

In[2]:= f[x_]:=x

In[3]:= f[f[a]]

Out[3]= a

The OneIdentity attribute tells Mathematica that it should
not waste its time wrapping single items in an f[].

cook@dragonfly.wri.com

From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Oct 23 05:40:36 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA21200
  (5.64+/IDA-1.3.4 for stevec); Tue, 23 Oct 90 05:40:34 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA04884; Tue, 23 Oct 90 05:38:44 CDT
Received: by yoda.ncsa.uiuc.edu id AA20722
  (5.64+/IDA-1.3.4 for ); Tue, 23 Oct 90 01:29:40 -0500
Received: by yoda.ncsa.uiuc.edu id AA20718
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 23 Oct 90 01:29:37 -0500
Message-Id: <9010230629.AA20718@yoda.ncsa.uiuc.edu>
Date: Thu, 18 Oct 90 17:27:22 EDT
From: Olin Sibert <wos@oxford.com>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Logical expressions in Mathematica
Status: RO

I'd like to use Mathematica for simplifying and evaluating large logical
expressions, the same way that arithmetic expressions can be manipulated.
In some casual experimenting and manual reading, I didn't see any
obvious way to do this, but I'm no Mathematica expert.  It seems like
it ought to be possible to use the pattern matching facilities for
simplification, but I thought I'd ask and see whether someone more
knowledgeable than I has already done so.

Is there an existing package that will do this, or do I need to learn
how to write my own?  Is there something other than Mathematica that I
should use instead?  It'd be especially helpful to have something that
could consider operations like XOR as primitive (i.e., worth reducing
to) in addition to AND, OR, and NOT.

Thanks.

Olin Sibert           |Internet: Sibert@Oxford.COM
Oxford Systems, Inc.  |UUCP:     uunet!oxford!sibert


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Oct 23 03:44:36 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA20893
  (5.64+/IDA-1.3.4 for stevec); Tue, 23 Oct 90 03:44:34 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA03232; Tue, 23 Oct 90 03:42:44 CDT
Received: by yoda.ncsa.uiuc.edu id AA20732
  (5.64+/IDA-1.3.4 for ); Tue, 23 Oct 90 01:29:53 -0500
Received: by yoda.ncsa.uiuc.edu id AA20728
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 23 Oct 90 01:29:51 -0500
Message-Id: <9010230629.AA20728@yoda.ncsa.uiuc.edu>
Date: Fri, 19 Oct 90 09:38:09 +0200
From: pjanhune@finsun.csc.fi
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Fit[]
Status: RO

To Bob Marzke and other Fit[] people...

Nonlinear fitting is now possible in Mathematica. I wrote a package named
NonlinearFit.m which is available from the anonymous ftp server. It uses
the Levenberg-Marquardt iterative method. The file NLFitTest.m contains
testing with Gaussian functions. There are no limitations to the fitted
model or to the dimensionality of the data.

You can send bug reports, hopes, criticism, comparisons with other methods
etc. to:

Pekka Janhunen
Finnish Meteorological Institute
Geophysics Dept.
email: pjanhune@finsun.csc.fi


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Oct 23 04:41:10 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA21004
  (5.64+/IDA-1.3.4 for stevec); Tue, 23 Oct 90 04:41:08 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA04102; Tue, 23 Oct 90 04:39:18 CDT
Received: by yoda.ncsa.uiuc.edu id AA20742
  (5.64+/IDA-1.3.4 for ); Tue, 23 Oct 90 01:30:11 -0500
Received: by yoda.ncsa.uiuc.edu id AA20738
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 23 Oct 90 01:30:09 -0500
Message-Id: <9010230630.AA20738@yoda.ncsa.uiuc.edu>
From: jdelany@sargas.ACS.CalPoly.EDU (Jim Delany)
Subject: math coprocessors
To: mathgroup@yoda.ncsa.uiuc.edu
Date: Sat, 20 Oct 90 11:30:23 PDT
Status: RO


Richard Fateman's note on the pitfalls of relying on the Motorola floating
point coprocessor prompts me to share the example I like to use:    


Mathematica (sun3.68881) 1.2 (November 6, 1989) [With pre-loaded data]
 ...

In[1]:= x = 2^100;

In[2]:= N[ Sin[x] ]

Out[2]= 0.973158

In[3]:= N[ Sin[x], 40 ]

Out[3]= -0.872183605


The difference between the hardware and software values is almost 2.
Does anyone have a sharper example?


Jim Delany   ( jdelany@cosmos.acs.calpoly.edu )

Math Department, Cal Poly, San Luis Obispo  CA  93407


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Oct 23 04:54:35 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA21023
  (5.64+/IDA-1.3.4 for stevec); Tue, 23 Oct 90 04:54:33 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA04289; Tue, 23 Oct 90 04:52:43 CDT
Received: by yoda.ncsa.uiuc.edu id AA20737
  (5.64+/IDA-1.3.4 for ); Tue, 23 Oct 90 01:30:02 -0500
Received: by yoda.ncsa.uiuc.edu id AA20733
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 23 Oct 90 01:30:01 -0500
Message-Id: <9010230630.AA20733@yoda.ncsa.uiuc.edu>
Date: Fri, 19 Oct 90 09:25:56 -0400 (EDT)
From: Michael Albert <ma1q+@andrew.cmu.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Still puzzled about Flat
Status: RO

I had tried using OneIdentity, but this still seems to cause problems,
as the following session indicates. 


In[1] := 	Clear[Int]
	Attributes[Int] = {Flat, OneIdentity, Orderless, Listable}

?Int

Out[1] =	Int
	Attributes[Int] = {Flat, Listable, OneIdentity, Orderless}

In[2]:=	Clear[x,y]
	Int[x,y]

Out[2] =	Int[x, y]

In[3]:=	Int[x_] := x

In[4]:= 	Int[a]

Out{4}=	a

In[4]:=	Int[a,b]

General::recursion: Recursion depth of 256 exceeded.
Hold[Int[a,b]]

Out[4]=	Hold[Int[a,b]]


Obviously it is trrying to do something very clever, and simplify a
function with two arguments, when the only rule it knows applies only in
the case of a single argument ... unfortunately, it doesn't seem to get
anywhere!




From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Oct 23 22:08:21 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA22602
  (5.64+/IDA-1.3.4 for stevec); Tue, 23 Oct 90 22:08:19 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA23843; Tue, 23 Oct 90 22:06:28 CDT
Received: by yoda.ncsa.uiuc.edu id AA22454
  (5.64+/IDA-1.3.4 for ); Tue, 23 Oct 90 19:50:19 -0500
Received: by yoda.ncsa.uiuc.edu id AA22450
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 23 Oct 90 19:50:18 -0500
Message-Id: <9010240050.AA22450@yoda.ncsa.uiuc.edu>
Date: Mon, 22 Oct 90  15:53:20 TST
From: DALFE@trboun.bitnet
      (Nuzhet Dalfes)
Subject: Ecology...
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Hi!
I am interested to find out about the use of Mathematica in ecological
research and/or education. I would appreciate any pointer to packages,
articles, notebooks etc.

Nuzhet Dalfes
Bogazici University
80815 Bebek Istanbul
TURKEY


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Oct 23 22:43:25 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA22729
  (5.64+/IDA-1.3.4 for stevec); Tue, 23 Oct 90 22:43:23 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA24393; Tue, 23 Oct 90 22:41:34 CDT
Received: by yoda.ncsa.uiuc.edu id AA22459
  (5.64+/IDA-1.3.4 for ); Tue, 23 Oct 90 19:50:26 -0500
Received: by yoda.ncsa.uiuc.edu id AA22455
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 23 Oct 90 19:50:25 -0500
Message-Id: <9010240050.AA22455@yoda.ncsa.uiuc.edu>
Date: Tue, 23 Oct 90 08:17:10 -0700
From: fateman@ucbarpa.Berkeley.EDU (Richard Fateman)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: math coprocessors
Status: RO

The problem is not with the math coprocessor, but the software
used by mathematica in computing range reduction.  To reduce
the range of 2^100  you need about 120 bits of Pi.  If Mathematica
is supposed to provide a seamless "mathematical" computational
environment, it should not give wrong answers and allege that they
have high Accuracy and Precision.


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Oct 23 23:42:42 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA22939
  (5.64+/IDA-1.3.4 for stevec); Tue, 23 Oct 90 23:42:40 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA06464; Tue, 23 Oct 90 23:40:41 CDT
Received: by yoda.ncsa.uiuc.edu id AA22469
  (5.64+/IDA-1.3.4 for ); Tue, 23 Oct 90 19:50:44 -0500
Received: by yoda.ncsa.uiuc.edu id AA22465
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 23 Oct 90 19:50:42 -0500
Message-Id: <9010240050.AA22465@yoda.ncsa.uiuc.edu>
Date: Tue, 23 Oct 90 11:13:54 CDT
From: gabriel@athens.ees.anl.gov (John Gabriel)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  Logical expressions in Mathematica
Status: RO

There are a number of traps in simplification of large logical expressions
by any symbolic algebra package. Of these, the biggest is that the
"obvious" elementary operators do not give rise to a Church-Rosser set
of reduction rules. I think I'm right in saying that AND and XOR give
Church Rosser rewriting rules if used alone - i.e. first turn everything
into AND and XOR and only then begin to simplify.

The rewriting algorithms in Boyer & Moore's theorem prover are the outcome
of many years of work, and perhaps you should mail a question to
boyer@cli.com before venturing too far into the jungle on your own.

For more information on rewriting, Church-Rosser, and canonical forms -
if a reduction is not canonical then it's not very useful - see Alan
Bundy's book on Computer Modelling of Mathematics or a similar title,
mine's at home so I can't quote chapter and verse.

Also, you have a Net doppelganger wos@mcs.anl.gov. People who have worked
with him have done a good deal on this, and he could probably point you
at somebody. Brian Smith, now at the Dept. of CS at U. of New Mexico
Albuquerque is also a good source of advice.

		John Gabriel (gabriel@ees.anl.gov)


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Oct 24 00:42:36 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA23691
  (5.64+/IDA-1.3.4 for stevec); Wed, 24 Oct 90 00:42:34 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA20365; Wed, 24 Oct 90 00:40:43 CDT
Received: by yoda.ncsa.uiuc.edu id AA22464
  (5.64+/IDA-1.3.4 for ); Tue, 23 Oct 90 19:50:35 -0500
Received: by yoda.ncsa.uiuc.edu id AA22460
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 23 Oct 90 19:50:34 -0500
Message-Id: <9010240050.AA22460@yoda.ncsa.uiuc.edu>
Date: Tue, 23 Oct 90 11:00:02 CDT
From: gabriel@athens.ees.anl.gov (John Gabriel)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  math coprocessors
Status: RO

I may be speaking from a position of ignorance here, because my knowledge is
several years out of date, but the computation of y=sin(x) contains
deep pitfalls even for values of x as small as small as 62.83. The point is
that for x outside [0..pi/4), multiples of pi/4 must be subtracted from x.
For x values close to n*(pi/4) this must be done with consummate skill if
work is being done in double precision, or a good deal of significance will
be lost. Cody & Waite (A Handbook for the Elementary Functions) discuss the
issue at length. So computation of sin(x) for large arguments is always
fraught with danger. For a given machine precision, there is typically a value
of x beyond which computation of sin(x) will inevitably have significant
error, and for some algorithms even x in the region of a few hundreds gives
trouble (the worst I ever saw gave noticeable error round about x=30).

More recent cases involving functions other than sin(x), investigated by
a colleague in the context of FORTRAN exonerated an INTEL floating point
co-processor, and laid the blame squarely on a compiler writer in one case,
and perhaps on the operating system in another (I don't really know about
the second case).

So, I suppose the point of all this is that you should not necessarily
blame the floating point chip. But perhaps Mathematica takes all the
appropriate precautions about argument reduction and has the proper
approximation to pi to allow the usual 2 step argument reduction to work
OK. On the other hand, if pi is simply held to working precision (no
matter how long that may be) argument reduction holds traps for the
unwary. But I would be surprised if any IEEE standard chip gave good
answers for 2^100. Good answers for 2^70 however, are not obviously ruled
out except by a much more careful examination than I have given to the
question.


	John Gabriel (gabriel@ees.anl.gov)


From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Oct 24 10:03:18 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA24198
  (5.64+/IDA-1.3.4 for stevec); Wed, 24 Oct 90 10:03:16 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA16108; Wed, 24 Oct 90 10:01:24 CDT
Received: by yoda.ncsa.uiuc.edu id AA23896
  (5.64+/IDA-1.3.4 for ); Wed, 24 Oct 90 08:04:11 -0500
Received: by yoda.ncsa.uiuc.edu id AA23892
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Wed, 24 Oct 90 08:04:09 -0500
Message-Id: <9010241304.AA23892@yoda.ncsa.uiuc.edu>
Date: Wed, 24 Oct 90 09:31:13 +0200
From: pjanhune@finsun.csc.fi
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: NonLinearFit.m
Status: RO

As a reminder...

MATHGROUP ANONYMOUS FTP SERVER
------------------------------

The mathgroup anonymous ftp server address is 128.174.20.50.
(i.e. to get there, write "ftp 128.174.20.50", give login as
"anonymous" and send your real login name as password. Then you need 
the commands cd,dir,help,quit,get.)
My packages NonlinearFit.m and NLFitTest.m are found in Symbolic/New.
Some older postings of mine are also there; you can also find them
at Symbolic/Mathematica/Packages/JANHUNEN. Everyone has write/read
permissions to the directory Symbolic/New.

[All of the packages mentioned above are in
 Symbolic/Mathematica/Packages/JANHUNEN now.
Please report problems getting these packages. -- smc]

If the ftp connection is not possible on your system, mail me
and I can mail to packages to you.



From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Oct 26 23:45:33 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA28862
  (5.64+/IDA-1.3.4 for stevec); Fri, 26 Oct 90 23:45:31 -0500
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA04203; Fri, 26 Oct 90 23:43:45 CDT
Received: by yoda.ncsa.uiuc.edu id AA28766
  (5.64+/IDA-1.3.4 for ); Fri, 26 Oct 90 22:12:02 -0500
Received: by yoda.ncsa.uiuc.edu id AA28762
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 26 Oct 90 22:12:01 -0500
Message-Id: <9010270312.AA28762@yoda.ncsa.uiuc.edu>
Date:         Fri, 26 Oct 90 17:30:07 ITA
From: Riccardo Rigon <RIGON@iveuncc.bitnet>
Subject:      Ignorance
To: Mathematica special Interest Group <MATHGROUP@yoda.ncsa.uiuc.edu>
Status: RO

Dear mathgroupers,
I have a function defined like this:
MatrixB[x_List]:=Block[{tt={x},z,i,n,zoo},
n=x[[1]]/2;
zoo=x;
z=Table[0,{i,Length[x]}];z[[2]]++;
For[i=1,i<=n-x[[2]],i++,tt=AppendTo[tt,zoo=zoo+z]];tt
]
It is probably a bad example of Mathematica programming, but anyway it
does what I want: taking as input a vector it builds an appropriate matrix.
Now it would be interesting if it accepted as input a list of vectors,
giving as result the matrix of the matrices resulting from the analisys of
each element of the input. How must I modified my code? Thank you in
advance for your help.

Riccardo Rigon
(an absolute beginner)
RIGON@iveuncc.bitnet


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Oct 29 02:29:30 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA01784
  (5.64+/IDA-1.3.4 for stevec); Mon, 29 Oct 90 02:29:29 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA08939; Mon, 29 Oct 90 02:27:46 CST
Received: by yoda.ncsa.uiuc.edu id AA01056
  (5.64+/IDA-1.3.4 for ); Sun, 28 Oct 90 23:05:26 -0600
Received: by yoda.ncsa.uiuc.edu id AA01052
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sun, 28 Oct 90 23:05:25 -0600
Message-Id: <9010290505.AA01052@yoda.ncsa.uiuc.edu>
Date: 28 Oct 90 13:40:47
From: Paul Abbott <Paul_Abbott@other.wri.com>
Subject: Logical Expressions
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

                       Subject:                               Time:1:58 PM
  OFFICE MEMO          Logical Expressions                    Date:10/28/90
The following code from Dana Scott will works well with Logical expressions. 
It relies on AlgebraicRules (which in turn uses Groebner bases).  

Format[Rep[x:_,_,_]] := x

Rep[x_, g_, p_] + Rep[y_, g_, p_] ^:= Rep[Mod[x+y /.g, p], g, p]
Rep[x_, g_, p_] + y_              ^:= Rep[Mod[x+y /.g, p], g, p]
Rep[x_, g_, p_] * Rep[y_, g_, p_] ^:= Rep[Mod[x*y /.g, p], g, p]
Rep[x_, g_, p_] * y_              ^:= Rep[Mod[x*y /.g, p], g, p]
Rep[x_, g_, p_] ^ y_              ^:= Rep[Mod[x^y /.g, p], g, p]
	

(* Rules for Boolean algebra *)

gbool = 
AlgebraicRules[{p^2 == p,q^2 == q,r^2 == r,s^2 == s,
													t^2 == t,u^2 == u,v^2 == v,w^2 == w},
																					  {w,v,u,t,s,r,q,p}];

e  = Rep[1,gbool,2];																		
 
(* The logical functions *)

and[x_,y_] := e x y;
or[x_,y_]  := e x + y + x y;
imp[x_,y_] := e + x + x y;
iff[x_,y_] := e + x + y;	

(* Examples *)

p ~imp~ q ~imp~ q ~iff~ (p ~or~ q)

(* Mathematica  verifies that "p implies q all implies q"  is equivalent to the
inclusive disjunction of p and q.  This is done by translating everything into
Boolean polynomials and this reduces to 1.  *)

(* An example of an invalid formula *)

p ~iff~ (p ~or~ q) ~iff~ (p ~and~ q)

(* No matter what truth value we give to p, this formula is false.  *)



From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Nov  1 08:49:22 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA07559
  (5.64+/IDA-1.3.4 for stevec); Thu, 1 Nov 90 08:49:19 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA20870; Thu, 1 Nov 90 08:48:06 CST
Received: by yoda.ncsa.uiuc.edu id AA07450
  (5.64+/IDA-1.3.4 for ); Thu, 1 Nov 90 02:33:31 -0600
Received: by yoda.ncsa.uiuc.edu id AA07446
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 1 Nov 90 02:33:28 -0600
Message-Id: <9011010833.AA07446@yoda.ncsa.uiuc.edu>
Date: Wed, 31 Oct 90 10:32:40 -0500
From: murison@cfacx2.harvard.edu (Marc Murison)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica on a PC
Status: RO

Hello, I am trying to get in touch with users of Mathematica on an IBM
PC compatible. Our group just had a bad experience with another product,
and we'd like some first-hand accounts before we take another financial
plunge. Could you put me in touch with PC Mathematica users, or send my
e-mail/FAX/phone info to them?

Thanks very much,
Marc A. Murison
Smithsonian Astrophysical Observatory
60 Garden Street, Mail Stop 63
Cambridge, MA  02138

Phone:  (617) 495-7079
FAX:    (617) 495-7326
SPAN:   cfarg3::murison
bitnet: murison%cfacx2@cfa.bitnet  or  pepmmu@cfaamp.bitnet


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Nov  1 09:44:06 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA07631
  (5.64+/IDA-1.3.4 for stevec); Thu, 1 Nov 90 09:43:59 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA22083; Thu, 1 Nov 90 09:42:48 CST
Received: by yoda.ncsa.uiuc.edu id AA07445
  (5.64+/IDA-1.3.4 for ); Thu, 1 Nov 90 02:33:21 -0600
Received: by yoda.ncsa.uiuc.edu id AA07441
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 1 Nov 90 02:33:19 -0600
Message-Id: <9011010833.AA07441@yoda.ncsa.uiuc.edu>
Date: 31 Oct 90 13:41 +0100
From: Robert Staerk <staerk@iam.unibe.ch>
To: <mathgroup@yoda.ncsa.uiuc.edu>
Subject: Integrate?
Status: RO

Mathematica gives a wrong answer to the following integral:

                            2 Pi
                             /
                            |                  1/2
                            |    (2 - 2 cos(x))    dx
                            |
                           /
                           0

Is this a known bug?

idefix> math
Mathematica (sun4) 1.2 (August 22, 1989) [With pre-loaded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
with I. Rivin and D. Withoff
Copyright 1988,1989 Wolfram Research Inc.
 -- Terminal graphics initialized -- 

In[1]:= Integrate[ Sqrt[2 - 2 Cos[x]], {x, 0, 2 Pi}]

Out[1]= 0

In[2]:= NIntegrate[ Sqrt[2 - 2 Cos[x]], {x, 0, 2 Pi}]

Out[2]= 8.

In[3]:= Quit
idefix> maple
    |\^/|      MAPLE V
._|\|   |/|_.  Copyright (c) 1981-1990 by the University of Waterloo.
 \  MAPLE  /   All rights reserved.  MAPLE is a registered trademark of
 <____ ____>   Waterloo Maple Software.
      |        Type ? for help.
> int( sqrt(2 - 2 * cos(x)), x=0...2*Pi );

                                       8

> done
bytes used=1447572, alloc=917336, time=8.116
idefix>

-------------------------------------------------------------------------
Robert Staerk (St\"ark)   | Laenggassstrasse 51 | Phone: +41 31 65 85 58
Institut fuer Informatik  | CH-3012 Bern        | Fax:   +41 31 65 39 65
und angewandte Mathematik | Switzerland         | <staerk@iam.unibe.ch>
-------------------------------------------------------------------------


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Nov  2 22:15:08 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA10539
  (5.64+/IDA-1.3.4 for stevec); Fri, 2 Nov 90 22:15:06 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA00866; Fri, 2 Nov 90 22:13:40 CST
Received: by yoda.ncsa.uiuc.edu id AA10427
  (5.64+/IDA-1.3.4 for ); Fri, 2 Nov 90 19:39:47 -0600
Received: by yoda.ncsa.uiuc.edu id AA10423
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 2 Nov 90 19:39:45 -0600
Message-Id: <9011030139.AA10423@yoda.ncsa.uiuc.edu>
Date: Thu, 1 Nov 90 13:52:13 -0500
From: Jack <jack@brahms.udel.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re:  Integrate?
Status: RO

Macsyma also gives the same incorrect result 0 for this integral
(version 416.48 for Sparc Computers).  That really surprised me.

jack@brahms.udel.edu



From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Nov  2 22:45:52 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA10577
  (5.64+/IDA-1.3.4 for stevec); Fri, 2 Nov 90 22:45:50 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA01251; Fri, 2 Nov 90 22:44:24 CST
Received: by yoda.ncsa.uiuc.edu id AA10422
  (5.64+/IDA-1.3.4 for ); Fri, 2 Nov 90 19:39:40 -0600
Received: by yoda.ncsa.uiuc.edu id AA10418
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 2 Nov 90 19:39:39 -0600
Message-Id: <9011030139.AA10418@yoda.ncsa.uiuc.edu>
Date: Thu, 1 Nov 90 11:32:07 -0500
From: sg04%harvey@gte.com (Steven Gutfreund)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: surface-fit
Status: RO


Does anyone have a surface fit routine for mathematica?
I need to obtain a surface based on a regular x-y
grid of points from a data set of points that are
scattered on the x-y plane (but fairly smooth in
the z dimension).

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Yechezkal Shimon Gutfreund		 		  sgutfreund@gte.com
GTE Laboratories, Waltham MA			    harvard!bunny!sgutfreund
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Nov  2 23:47:08 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA10742
  (5.64+/IDA-1.3.4 for stevec); Fri, 2 Nov 90 23:47:06 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA02255; Fri, 2 Nov 90 23:45:27 CST
Received: by yoda.ncsa.uiuc.edu id AA10417
  (5.64+/IDA-1.3.4 for ); Fri, 2 Nov 90 19:39:22 -0600
Received: by yoda.ncsa.uiuc.edu id AA10413
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 2 Nov 90 19:39:20 -0600
Message-Id: <9011030139.AA10413@yoda.ncsa.uiuc.edu>
Date: Wed, 31 Oct 90 10:32:40 -0500
From: murison@cfacx2.harvard.edu (Marc Murison)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Mathematica on a PC
Status: RO


Hello, I am trying to get in touch with users of Mathematica on an IBM
PC compatible. Our group just had a bad experience with another product,
and we'd like some first-hand accounts before we take another financial
plunge. Could you put me in touch with PC Mathematica users, or send my
e-mail/FAX/phone info to them?

Thanks very much,
Marc A. Murison
Smithsonian Astrophysical Observatory
60 Garden Street, Mail Stop 63
Cambridge, MA  02138

Phone:  (617) 495-7079
FAX:    (617) 495-7326
SPAN:   cfarg3::murison
bitnet: murison%cfacx2@cfa.bitnet  or  pepmmu@cfaamp.bitnet


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Nov  3 00:30:08 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA11505
  (5.64+/IDA-1.3.4 for stevec); Sat, 3 Nov 90 00:30:06 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA04210; Sat, 3 Nov 90 00:28:06 CST
Received: by yoda.ncsa.uiuc.edu id AA10432
  (5.64+/IDA-1.3.4 for ); Fri, 2 Nov 90 19:39:55 -0600
Received: by yoda.ncsa.uiuc.edu id AA10428
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 2 Nov 90 19:39:54 -0600
Message-Id: <9011030139.AA10428@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: getting Limit[] to evaluate
Date: Thu, 01 Nov 90 15:00:00 PST
From: jacobson@cello.hpl.hp.com
Status: RO

I wanted to compute the following definite integral, where b > 0

	In[1]:= Integrate[x (1-x)^b,{x,0,1}]

	Limit::nlm: Could not find definite limit.

	                                       1 + b           2 + b
	          1       1             (1 - x)         (1 - x)
	Out[1]= ----- - ----- + Limit[-(------------) + ------------, x -> 1]
	        1 + b   2 + b              1 + b           2 + b


The problem is that it doesn't know that b is not -1 or -2.  In this
particular case, I can see "by inspection" that the Limit[...] term
evaluates to zero, but how can I get Mathematica to do this itself?

  -- David Jacobson



From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Nov  3 01:07:17 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA11594
  (5.64+/IDA-1.3.4 for stevec); Sat, 3 Nov 90 01:07:06 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA04830; Sat, 3 Nov 90 01:05:40 CST
Received: by yoda.ncsa.uiuc.edu id AA10437
  (5.64+/IDA-1.3.4 for ); Fri, 2 Nov 90 19:40:02 -0600
Received: by yoda.ncsa.uiuc.edu id AA10433
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 2 Nov 90 19:40:01 -0600
Message-Id: <9011030140.AA10433@yoda.ncsa.uiuc.edu>
From: ccetinka@symcom.math.uiuc.edu (Cetin Cetinkaya)
Subject: rootfind problem...
Date: Fri, 2 Nov 90 02:00:03 GMT
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO


Hi;

Could anybody tell me what I am doing wrong in the following Mathematica
session:

In[22]:= f[x_]:=NIntegrate[Sin[s],{s,0,x}]

In[23]:= FindRoot[f[y]==0,{y,-1}]

NIntegrate::lim: Numerical integration limits {s, 0, y} are not invalid.

NIntegrate::lim: Numerical integration limits {s, 0, s} are not invalid.

NIntegrate::vars: 
   Integration range specification #2 is not of the form {x, xmin, xmax}.

FindRoot::jnotnum: 
   Partial derivative of function 1 w.r.t. variable 1 is not numerical at 
                             (0.,1.)
    {-1.}={0., 0., NIntegrate       [Sin[s], {s, 0., -1.}]}
    . Try giving two starting values for each variable.

Out[23]= FindRoot[NIntegrate[Sin[s], {s, 0, y}] == 0, {y, -1}]

In[24]:= f[3]

Out[24]= 1.98999

Thank You,

C.Cetinkaya


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Nov  3 01:49:48 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA11778
  (5.64+/IDA-1.3.4 for stevec); Sat, 3 Nov 90 01:49:46 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA05475; Sat, 3 Nov 90 01:48:19 CST
Received: by yoda.ncsa.uiuc.edu id AA10447
  (5.64+/IDA-1.3.4 for ); Fri, 2 Nov 90 19:43:37 -0600
Received: by yoda.ncsa.uiuc.edu id AA10443
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 2 Nov 90 19:43:36 -0600
Message-Id: <9011030143.AA10443@yoda.ncsa.uiuc.edu>
Date: Fri, 2 Nov 90 13:52:39 EST
From: pkane@Kodak.COM (Paul Kane)
To: mma@isr01.kodak.com
Subject: two dimensional NIntegrate
Status: RO

Here is a question for the mathgroup :

I am an advanced amateur with respect to Mathematica. Lately
I have been trying to do some integrals involving first order
Bessel functions. I am interested in integrands that look like
this :

(BesselJ[1,(a Sqrt[x^2 + y^2])] / (a Sqrt[x^2 + y^2]) ) g[x],

where g[x] is some (one-dimensional) smooth, well-behaved function.

I wish to perform a two dimensional numerical integration on
this, over a reasonably large domain. If g[x] had polar symmetry,
I could reduce this to a one dimensional integration and use
NIntegrate over one dimension - I have done this and it works
just fine, and finishes within 60 seconds.

But now if the integrand no longer has polar symmetry,
I am forced to do a 2D integration in rectangular coordinates. The
problem is that it takes **forever**, even over one quadrant in xy
space.  We're talking hours - in fact,
I've never had the patience to wait longer than 160 minutes, so I
don't know if it ever converges on an answer, let alone the right
answer.

I have played with the NIntegrate parameters (AccuracyGoal, etc.),
but to no avail. My suspicion is that the program is going nuts
trying to track the rapidly oscillating Bessel function at larger
values of the argument. (This is a classic problem in numerical
Hankel transforms, also). My next move was going to be to try
some asymptotic approximations for BesselJ[1, ], but before I
do that, what do you folks think? Has anyone out there done this
before?

Thanks in advance for any help ... you can mail to pkane@Kodak.COM
and I will post a summary of the answers, if any come in!

Paul J. Kane
Eastman Kodak Co.
Photographic Research Labs
Rochester,NY 14650-1717
(716)-477-1895
(pkane@Kodak.COM)



From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Nov  3 00:59:58 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA11564
  (5.64+/IDA-1.3.4 for stevec); Sat, 3 Nov 90 00:59:53 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA04687; Sat, 3 Nov 90 00:58:24 CST
Received: by yoda.ncsa.uiuc.edu id AA10442
  (5.64+/IDA-1.3.4 for ); Fri, 2 Nov 90 19:40:12 -0600
Received: by yoda.ncsa.uiuc.edu id AA10438
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 2 Nov 90 19:40:10 -0600
Message-Id: <9011030140.AA10438@yoda.ncsa.uiuc.edu>
Date: Fri, 2 Nov 90 18:21:48 +0100
From: Harald Hanche-Olsen <hanche@imf.unit.no>
To: <mathgroup@yoda.ncsa.uiuc.edu>
Subject: Integrate?
Status: RO

Robert Staerk <staerk@iam.unibe.ch> writes ...

   Mathematica gives a wrong answer to the following integral:

			       2 Pi
				/
			       |                  1/2
			       |    (2 - 2 cos(x))    dx
			       |
			      /
			      0

   Is this a known bug?

   In[1]:= Integrate[ Sqrt[2 - 2 Cos[x]], {x, 0, 2 Pi}]

   Out[1]= 0

This is apparently caused by Mathematicas attempts at being clever
about things like complex square roots, branch cuts and the like.
Yes, it is known.  And some people think Mathematica is brain-dead
because of it.  Myself, I haven't decided yet.  I keep alternating
between Mathematica and Maple, just like you seem to do...

- Harald Hanche-Olsen <hanche@imf.unit.no>
  Division of Mathematical Sciences
  The Norwegian Institute of Technology
  N-7034 Trondheim, NORWAY


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Nov  3 21:16:01 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA12321
  (5.64+/IDA-1.3.4 for stevec); Sat, 3 Nov 90 21:15:59 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15204; Sat, 3 Nov 90 21:14:27 CST
Received: by yoda.ncsa.uiuc.edu id AA12150
  (5.64+/IDA-1.3.4 for ); Sat, 3 Nov 90 17:51:59 -0600
Received: by yoda.ncsa.uiuc.edu id AA12146
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 3 Nov 90 17:51:58 -0600
Message-Id: <9011032351.AA12146@yoda.ncsa.uiuc.edu>
Date: Fri, 2 Nov 1990 18:14 PST
From: "Mr. Mathematica Man" <LWRIGHT@HMCVAX.CLAREMONT.EDU>
Subject: One-sided limits
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

How can someone find a ONE-SIDED limit?  For example, finding the limit as
x->0+ and as x->0-.  The zero case can be fudged by substituting (1/x) for
every occurrence of x and then using directional +/- Infinity.  How can one do
this for the non-zero case?

Thanks,
Lyle Wright
Mathematica Developer
Harvey Mudd College
Claremont, CA 91711
lwright@hmcvax.claremont.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Nov  3 21:40:21 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA12367
  (5.64+/IDA-1.3.4 for stevec); Sat, 3 Nov 90 21:40:19 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA17552; Sat, 3 Nov 90 21:38:56 CST
Received: by yoda.ncsa.uiuc.edu id AA12155
  (5.64+/IDA-1.3.4 for ); Sat, 3 Nov 90 17:52:08 -0600
Received: by yoda.ncsa.uiuc.edu id AA12151
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 3 Nov 90 17:52:07 -0600
Message-Id: <9011032352.AA12151@yoda.ncsa.uiuc.edu>
Date: Sat, 3 Nov 90 12:26 +0800
From: "Mike Reid, Physics, Hong Kong University" <MFREID@hkucc.bitnet>
Subject: RE : Integrate?
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Well, if we are going to quote Macsyma, I note that REDUCE
doesn't integrate the expression at all (it's rare that
REDUCE is wrong in my experience, but in many cases like this
not being wrong is not quite helpful enough).

If you do the indefinite integral with  Mathematica you'll find that it is
singular at Pi(!?) but has the value -4 at the end-points, so
is consistent with the definite integral (no surprise there).  Is this a
clue?

Mike Reid.  mfreid@hkucc.bitnet


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Nov  3 22:48:23 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA12489
  (5.64+/IDA-1.3.4 for stevec); Sat, 3 Nov 90 22:48:20 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA18466; Sat, 3 Nov 90 22:46:55 CST
Received: by yoda.ncsa.uiuc.edu id AA12145
  (5.64+/IDA-1.3.4 for ); Sat, 3 Nov 90 17:51:53 -0600
Received: by yoda.ncsa.uiuc.edu id AA12141
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Sat, 3 Nov 90 17:51:52 -0600
Message-Id: <9011032351.AA12141@yoda.ncsa.uiuc.edu>
Date: Fri, 2 Nov 1990 18:10 PST
From: "Mr. Mathematica Man" <LWRIGHT@HMCVAX.CLAREMONT.EDU>
Subject: Limit[Sum[...,{n,1,Infinity}], n->Infinity]
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Here is my dilemma.  I am trying to model things like Reimann sums and other
techniques for approximating the area underneath a curve.

Here is a sample scenario.

|                                       |
|----|----|----|----|----|----|----|----|
0                   1                   2

We have some interval (in this case, [0,2]) that we are concerned with.  It is
divided into n sections.  Say we are interested in the function f(x) = x^3.

So we want to find the area under the graph of x^3 from x=0 to 2.

If we subdivide the interval [0,2] into n equal subintervals, then

dx = 2/n and xi = 0 + i(2/n) = 2i/n

Therefore,

Sum[f(xi)dx,{i,1,n}] = Sum[(xi)^3 dx, {i,1,n}] =

Sum[(2i/n)^3 (2/n), {i,1,n}] = 16/(n^4) Sum[i^3,{i,1,n}]

*** The problem is that Mathematica cannot proceed from this last step.  It
also doesn't seem like it can factor out irrelevant terms.

Mathematica gives me the following:

Sum[(16 i^3)/(n^4),{i,1,n}]

*** The BIGGER problem is that we are unable to get a limit of this sum as n
goes to infinity.  If you attempt to do it, Mathematica will give you several
screens full of garbage.

Induction tells us that it is ((n^2)(n+1)^2)/4.   
Consequently our limit is 4.

Is there some way to handle limits of infinite sums?
Is there some way to use a lookup table for special cases?
What is Mathematica actually doing when it is computing the limit and/or sums?
What about numerically approximating?

Any help would be greatly appreciated since so many things are represented as a
limit of an infinite sum.

Thanks,
Lyle Wright
Mathematica Developer
Harvey Mudd College
Claremont, CA 91711
lwright@hmcvax.claremont.edu


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Nov  5 14:47:23 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA15662
  (5.64+/IDA-1.3.4 for stevec); Mon, 5 Nov 90 14:47:18 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA00201; Mon, 5 Nov 90 14:45:52 CST
Received: by yoda.ncsa.uiuc.edu id AA15022
  (5.64+/IDA-1.3.4 for ); Mon, 5 Nov 90 10:34:16 -0600
Received: by yoda.ncsa.uiuc.edu id AA15018
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 5 Nov 90 10:34:14 -0600
Message-Id: <9011051634.AA15018@yoda.ncsa.uiuc.edu>
Date:         Mon, 05 Nov 90 11:42:06 ITA
From: Riccardo Rigon <RIGON@iveuncc.bitnet>
Subject:      binary trees (and Map ?)
To: Mathematica special Interest Group <MATHGROUP@yoda.ncsa.uiuc.edu>
Status: RO

Dear mathgroupers,
is to build all the binary trees with a given number of leaves, n.
The total number of internal arcs is n-1 as can be proven by induction.
The thing can be solved recursively, being a binary tree with n leaves
the union of a left tree with n-i leaves and a right tree with i leaves.
For my purposes every binary tree with n leaves can be parametrized by a
sequence of 2n-1 letters, for instance of n-1 `i` for internal arcs,and n `l`
for the leaves as follow: we start at the root and follow the tree left-hand
puttingin the sequence an i when we meet an internal arc or an l in the case of
leaves. When we meet for the second time the same arc we do not add anything.
The math code suitable for the operation could be:
Tree[n_]:=Block[{i,ka},ka=Table[Flatten[{i,Tree[n-i],Tree[i]}],{i,n}];ka]
Tree[1]:=l
The problem is that when n=4 the result gives two elements ( a matrix ) and
the body of the Table statement do not work.
My solution should involve the use if the Map function and the first step
would be the merging of two sequenceces like these:
{{1,2,3},{4,5,6}} and {{a,b,c},{d,e,f}}
in:
{{1,2,3,a,b,c},{1,2,3,d,e,f},{4,5,6,a,b,c},{4,5,6,d,e,f}}.
My solution to this problem is to use a double Map statement:
first[x_,y_List]:=Map[Join[x,#],y]  (* x is a simple array *)
second[xx_,yy_]:=Map[first[#,yy],xx]
which is not a very good (if any) solution.
Subsequent step should be the change of the body in the approriate way.
Does somebody would so kind to help me, for the first (tree`s) problem and/or
for the second (merging matrix)? Thank you in advance.
Riccardo Rigon
bitnet: Rigon@iveuncc
internet: Rigon@iveuncc.unive.it


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Nov  5 13:50:44 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA15460
  (5.64+/IDA-1.3.4 for stevec); Mon, 5 Nov 90 13:50:42 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA28281; Mon, 5 Nov 90 13:49:17 CST
Received: by yoda.ncsa.uiuc.edu id AA15033
  (5.64+/IDA-1.3.4 for ); Mon, 5 Nov 90 10:34:32 -0600
Received: by yoda.ncsa.uiuc.edu id AA15029
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 5 Nov 90 10:34:30 -0600
Message-Id: <9011051634.AA15029@yoda.ncsa.uiuc.edu>
Date: Mon, 5 Nov 90 09:13 EST
From: Steve Buyske <BUYSKES@lafayett.bitnet>
Subject: Product rule and Cross[]
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

        I must be stupid, but I can't figure out how to provide a pattern
to Mathematica so that, given

        D[Cross[u[t],v[t]],t]
it will give
        Cross[u[t], v'[t]] - Cross[v[t], u'[t]]
instead of
               (0,1)                                    (1,0)
        v'[t] Cross     [u[t], v[t]] + u'[t] Cross     [u[t], v[t]]

        Now I can write a pattern that would work for this particular
case, of course, but it fails with something like
        D[w[t] . Cross[u[t], v[t]],t]
because it gets to my pattern to late in the process.

        Can anyone out there help me?





Steve Buyske                    uucp    : rutgers!lehi3b15!lafcol!buyskes
Mathematics Department          Bitnet  : BUYSKES@LAFAYETT
Lafayette College
Easton, PA  18042



From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Nov  5 13:04:12 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA15279
  (5.64+/IDA-1.3.4 for stevec); Mon, 5 Nov 90 13:04:10 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA26293; Mon, 5 Nov 90 13:02:42 CST
Received: by yoda.ncsa.uiuc.edu id AA15012
  (5.64+/IDA-1.3.4 for ); Mon, 5 Nov 90 10:34:03 -0600
Received: by yoda.ncsa.uiuc.edu id AA15008
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 5 Nov 90 10:33:59 -0600
Message-Id: <9011051633.AA15008@yoda.ncsa.uiuc.edu>
Date: Sun, 4 Nov 90 20:53:14 GMT
From: duncan@smogland.janet.ucla.edu (Phil Duncan)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: mathematica question
Status: RO

  I am new to the world of Mathematica.  I hope this is an appropriate
question for this mail alias.

  I am looking into the possibility of using Mathematica for
an application that combines graph manipulation and linear
programming.  It appears that linear programming routines do
not come standard with Mathematica.  Does anyone know of
a package for linear programming, Simplex or otherwise?

  Please send replies to duncan@janet.ucla.edu or
			 !(uunet,ucbvax,rutgers)!seas.ucla.edu!duncan

  All suggestions will be greatly appreciated.

					Phil Duncan


From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Nov  5 12:05:08 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA15138
  (5.64+/IDA-1.3.4 for stevec); Mon, 5 Nov 90 12:05:03 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA24669; Mon, 5 Nov 90 12:03:39 CST
Received: by yoda.ncsa.uiuc.edu id AA15027
  (5.64+/IDA-1.3.4 for ); Mon, 5 Nov 90 10:34:24 -0600
Received: by yoda.ncsa.uiuc.edu id AA15023
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 5 Nov 90 10:34:22 -0600
Message-Id: <9011051634.AA15023@yoda.ncsa.uiuc.edu>
Date: Mon, 5 Nov 90 14:18:40 +0100
From: wsgbfs@win.tue.nl (F. Simons)
To: mathgroup-adm@yoda.ncsa.uiuc.edu
Subject: mathematica bug
Status: RO

For about a year I am reading the Mathematica messages on usenet,
and since some months I have also subscribed to the Mathematica
newsgroup.

Particularly this newsgroup very much attributes to my knowledge
of Mathematica, so I very much appreciate the work you are doing
for this newsgroup.

At the end of September I sent you a message about a bug in
Mathematica, which I have not seen being mentioned so far. This
message was meant as a contribution to the Mathematica newsgroup,
but as far as I could see it was not distributed there.

I send you this message once again (separately), in the hope that
it might be interesting for the readers of the newsgroup. If I am
using an incorrect e-mail address, please can you inform me on the
correct address?

Thank you very much in advance,


Fred Simons
Eindhoven University of Technology
Department of Mathematics and Computing Science
P.O.Box 513
NL - 5600 MB Eindhoven
wsgbfs@win.tue.nl




From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Nov  5 15:24:42 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA15852
  (5.64+/IDA-1.3.4 for stevec); Mon, 5 Nov 90 15:24:40 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA01628; Mon, 5 Nov 90 15:23:11 CST
Received: by yoda.ncsa.uiuc.edu id AA15039
  (5.64+/IDA-1.3.4 for ); Mon, 5 Nov 90 10:34:49 -0600
Received: by yoda.ncsa.uiuc.edu id AA15034
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 5 Nov 90 10:34:47 -0600
Message-Id: <9011051634.AA15034@yoda.ncsa.uiuc.edu>
Date: Mon, 5 Nov 90 11:09:51 EST
From: shenkin@avogadro.barnard.columbia.edu (Peter S. Shenkin)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Problems with graphics using Mathematica on a Personal Iris
Status: RO

I've just installed Mathematica, which I purchased from SGI with my 4D-25TG.
Using the default GL graphics window, ("-- GL graphics installed --"),
a window is put up when I try to "Plot[ Sin[x], {x,0,10}]", but the window 
contains gibberish;  it's clearly trying to plot something, but there are 
ascii characters (plot labels) scattered here an there over the screen, a 
few line segments that are trying to be the plot, etc.  "ps -ef" from a
shell reveals that indeed glps is running.  If I override use of GL by
"<<4Sight.m", then I get good results, but of course then I'm not using GL.
"<<GL.m" reinstates the original problem.

I've called Wolfram associates, and they're working on it, but I thought
I'd post to this list also, to see if anyone's encountered and overcome
this difficulty.

I'm running Irix 3.2.1 and Mathematica 1.2, "For Silicon Graphics Personal
Iris".  There is no problem with loading the program or with numerical
calculations, just with plotting using GL.

	-P.

************************f*u*cn*rd*ths*u*cn*gt*a*gd*jb**************************
Peter S. Shenkin, Department of Chemistry, Barnard College, New York, NY  10027
(212)854-1418     shenkin@avogadro.barnard.columbia.edu   shenkin@cunixf.BITNET
***"In scenic New York... where the third world is only a subway ride away."***
--
************************f*u*cn*rd*ths*u*cn*gt*a*gd*jb**************************
Peter S. Shenkin, Department of Chemistry, Barnard College, New York, NY  10027
(212)854-1418     shenkin@avogadro.barnard.columbia.edu   shenkin@cunixf.BITNET
***"In scenic New York... where the third world is only a subway ride away."***



From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Nov  6 20:11:04 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA18045
  (5.64+/IDA-1.3.4 for stevec); Tue, 6 Nov 90 20:11:02 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA16229; Tue, 6 Nov 90 20:09:41 CST
Received: by yoda.ncsa.uiuc.edu id AA17776
  (5.64+/IDA-1.3.4 for ); Tue, 6 Nov 90 17:04:37 -0600
Received: by yoda.ncsa.uiuc.edu id AA17772
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 6 Nov 90 17:04:36 -0600
Message-Id: <9011062304.AA17772@yoda.ncsa.uiuc.edu>
Date: 5 Nov 90 23:42:00 EDT
From: "WILLIAM M. GOLDING" <golding@ccf1.nrl.navy.mil>
Subject: Integrate?
To: "mathgroup" <mathgroup@yoda.ncsa.uiuc.edu>
Status: RO



		In a previous posting concerning this integration
flaw in Mathematica which Robert Staerk recently brought up,

	Integrate[Sqrt[2-2 Cos[x]],{x,0,2 Pi}]  =?= 0

Jeffrey Golden  mentions an integral which he has just been able
to get Macsyma to do correctly. The integral he mentions is

	Integrate[Sqrt[x + 1/x -2],{x,0,1}] = 4/3  .

Jeff says that Macsyma used to give the result as -4/3, which by the
way is what Mathematica gives. I just wanted to point out the similarity
between these two integrals. If in the second integral x is replaced by
e^(i x) the first integral is almost obtained except for a phase factor
and for the integration contour which I don't quite know how to interpret
at the moment. Anyways I just thought I'd mention the connection
since Jeff implied that the second form has been corrected in Macsyma.


					Mike Golding
					Email golding@ccf.nrl.navy.mil





From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Nov  6 19:25:06 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA17997
  (5.64+/IDA-1.3.4 for stevec); Tue, 6 Nov 90 19:25:04 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15595; Tue, 6 Nov 90 19:23:43 CST
Received: by yoda.ncsa.uiuc.edu id AA17781
  (5.64+/IDA-1.3.4 for ); Tue, 6 Nov 90 17:06:36 -0600
Received: by yoda.ncsa.uiuc.edu id AA17777
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 6 Nov 90 17:06:35 -0600
Message-Id: <9011062306.AA17777@yoda.ncsa.uiuc.edu>
From: Steve Maybank <steve@gec-rl-hrc.co.uk>
Date: Tue, 6 Nov 90 08:38:20 GMT
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Integrate
Status: RO

re. the result

In[1] := Integrate[Sqrt[2-2 Cos[x]], {x, 0, 2 Pi}]

Out[1] := 0

the problem seems to be with the square root. In the range 0 to Pi
the plus sign is taken, but in the range Pi to 2 Pi the minus
sign is taken.





From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Nov  6 21:17:48 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA18202
  (5.64+/IDA-1.3.4 for stevec); Tue, 6 Nov 90 21:17:45 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA17274; Tue, 6 Nov 90 21:16:22 CST
Received: by yoda.ncsa.uiuc.edu id AA17786
  (5.64+/IDA-1.3.4 for ); Tue, 6 Nov 90 17:06:45 -0600
Received: by yoda.ncsa.uiuc.edu id AA17782
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 6 Nov 90 17:06:44 -0600
Message-Id: <9011062306.AA17782@yoda.ncsa.uiuc.edu>
Date: Tue, 6 Nov 90 10:33:34 +0100
From: wsgbfs@win.tue.nl (F. Simons)
To: mathgroup-adm@yoda.ncsa.uiuc.edu
Subject: mathematica bug
Status: RO

While preparing a demonstration with Mathematica, I discovered a
bug in version 1.2 that did not occur in version 1.1. I wrote to
WRI twice, but did not get any reaction.

The bug has to do with SeriesData. Multiplication works fine, but
the power function produces results of too low degree, as shown
by the following example.

Mathematica (MS-DOS 386/7) 1.2 (September 27, 1989) [With pre-lo-
aded data]
by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
   S. Omohundro, D. Ballman and J. Keiper
with I. Rivin, D. Withoff and T. Sherlock
Copyright 1988,1989 Wolfram Research Inc.

In[1]:= a = x^2 + x^3 + O[x]^4

         2    3       4
Out[1]= x  + x  + O[x]

In[2]:= a^3

            4
Out[2]= O[x]

In[3]:= a*a*a

         6      7       8
Out[3]= x  + 3 x  + O[x]

The following definitions in the file debug.m help:

     Unprotect[ SeriesData ]

     SeriesData /: Power[ SeriesData[ a_, b_, c_, d_, e_, f_ ],
       n_Integer?Positive ] := Times[ Power[ SeriesData[ a, b, c,
       d, e, f ], n-1 ], SeriesData[ a, b, c, d, e, f ] ] /;
       OddQ[ n ] && (n > 1)
     
     SeriesData /: Power[ SeriesData[ a_, b_, c_, d_, e_, f_ ],
       n_Integer?Positive ] := Times[ Power[ SeriesData[ a, b, c,
       d, e, f ], n/2 ], Power[ SeriesData[ a, b, c, d, e, f ],
       n/2 ] ] /; EvenQ[ n]

Loading this file results in two error messages, probably
due to the fact that SeriesData is not a Mathematica function.
But it fixes the bug:

In[4]:= <<debug.m

SeriesData::bsd:
   SeriesData encountered arguments SeriesData[a_, b_, c_, d_, e_,
f_].

SeriesData::bsd:
   SeriesData encountered arguments SeriesData[a_, b_, c_, d_, e_,
f_].

In[5]:= a^3

         6      7       8
Out[5]= x  + 3 x  + O[x]

Though I have not seen it mentioned somewhere, I suppose this bug
must be known for a long time. Is there a better way to fix it?
Any comments are welcome.


Fred Simons
Eindhoven University of Technology
Department of Mathematics and Computing Science
P.O.Box 513
NL - 5600 MB Eindhoven
wsgbfs@win.tue.nl




From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Nov  6 22:11:52 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA18313
  (5.64+/IDA-1.3.4 for stevec); Tue, 6 Nov 90 22:11:51 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA18052; Tue, 6 Nov 90 22:10:30 CST
Received: by yoda.ncsa.uiuc.edu id AA17771
  (5.64+/IDA-1.3.4 for ); Tue, 6 Nov 90 17:04:28 -0600
Received: by yoda.ncsa.uiuc.edu id AA17767
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 6 Nov 90 17:04:26 -0600
Message-Id: <9011062304.AA17767@yoda.ncsa.uiuc.edu>
Date: 5 Nov 90 16:07:00 EDT
From: "WILLIAM M. GOLDING" <golding@ccf1.nrl.navy.mil>
Subject: Integrate?
To: "mathgroup" <mathgroup@yoda.ncsa.uiuc.edu>
Status: RO


	We've seen that Mathematica gives incorrectly a result of zero
for this one particular integral,

		Integrate[Sqrt[2-2 Cos[x]],{x,0,2 Pi}] .	 

Because the Sqrt function has a branch cut along the negative real axis,
and it seems likely that Mathematica would try to do the trigonometric
integral in the complex plane thereby encountering the cut at x or "theta"
equal to Pi, I translated the integrand from x = Pi to x = 0 and 
integrated from -Pi to Pi thinking that this might make it easier for mma
to deal with the cut.  That is I tried the integral

		Integrate[Sqrt[2+2 Cos[x]],{x,-Pi, Pi}] .

This integral is also returned incorrectly as zero. The second integrand is
obtained from the first by letting x go to x - Pi.
	
	Next it seemed reasonable to look at the two integrals over the same
region of integration. That is

		Integrate[Sqrt[2-2 Cos[x]],{x,0, Pi}] => 4

		Integrate[Sqrt[2+2 Cos[x]],{x,0, Pi}] => - 4

The two integrals should be identical. The only difference between the
two integrands is that the first is monotonically increasing and the 
second is monotonically decreasing. Is this the cause of the sign error?
It seems that mma is taking perfectly good symmetric functions and making
them antisymmetric by multiplying by +1 if going uphill and multiplying
by -1 if going downhill.
 
	There is another integral which shows a similar behaviour ,

		Integrate[ Sqrt[ Sec[x]-1 ],{x,0, Pi/2}] => 1.76275

		Integrate[ Sqrt[ Sec[x]-1 ],{x,- Pi/2,0}] => - 1.76275

That is we get a positive result on the uphill side and a negative result on
the downhill side. In each of these integrals, if you use the second order
series expansion of the trigonometric function in place of the trig function,
this sign flipping phenomenon appears to go away and for a small range chosen
symmetrically about the symmetry axis the integrate function returns a correct
non-zero result. This seems to imply that mma will likely have trouble of the
of the above sort with integrands of the form 

		Sqrt[ Function[ any trig function ]]

where Function is non-negative in the range of integration   
and where the integration is taken through a complete period of the trig
functions involved. 

	I would like to hear of any functions in the above form that mma
can handle correctly, and also if anyone can explain why Mathematica
should have problems with integrals of the above form.


					Thanks

					Mike Golding

					Email golding@ccf.nrl.navy.mil

 		




From mathgroup-adm@yoda.ncsa.uiuc.edu Wed Nov  7 00:07:13 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA19225
  (5.64+/IDA-1.3.4 for stevec); Wed, 7 Nov 90 00:07:11 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA10950; Wed, 7 Nov 90 00:05:23 CST
Received: by yoda.ncsa.uiuc.edu id AA18240
  (5.64+/IDA-1.3.4 for ); Tue, 6 Nov 90 21:22:18 -0600
Received: by yoda.ncsa.uiuc.edu id AA18236
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 6 Nov 90 21:22:17 -0600
Message-Id: <9011070322.AA18236@yoda.ncsa.uiuc.edu>
Date: 6 Nov 90 22:00:00 EST
From: "WILLIAM M. GOLDING" <golding@ccf4.nrl.navy.mil>
Subject: Integrate?
To: "mathgroup" <mathgroup@yoda.ncsa.uiuc.edu>
Status: RO


		In a previous posting concerning this integration
flaw in Mathematica which Robert Staerk recently brought up,

	Integrate[Sqrt[2-2 Cos[x]],{x,0,2 Pi}]  =?= 0

Jeffrey Golden  mentions an integral which he has just been able
to get Macsyma to do correctly. The integral he mentions is

	Integrate[Sqrt[x + 1/x -2],{x,0,1}] = 4/3  .

Jeff says that Macsyma used to give the result as -4/3, which by the
way is what Mathematica gives. I just wanted to point out the similarity
between these two integrals. If in the second integral x is replaced by
E^(I x) the first integral is almost obtained except for a phase factor
and for the integration contour which I don't quite know how to interpret
at the moment. Anyways I just thought I'd mention the connection
since Jeff implied that the second form has been corrected in Macsyma.


					Mike Golding
					Email golding@ccf.nrl.navy.mil





From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Nov  9 01:56:26 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA23266
  (5.64+/IDA-1.3.4 for stevec); Fri, 9 Nov 90 01:56:24 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA09717; Fri, 9 Nov 90 01:54:58 CST
Received: by yoda.ncsa.uiuc.edu id AA22513
  (5.64+/IDA-1.3.4 for ); Thu, 8 Nov 90 22:50:24 -0600
Received: by yoda.ncsa.uiuc.edu id AA22509
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 8 Nov 90 22:50:23 -0600
Message-Id: <9011090450.AA22509@yoda.ncsa.uiuc.edu>
From: "Keith R. Slavin" <keith@videovax.tv.tek.com>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Input accuracy
Date: Wed, 07 Nov 90 12:45:18 PST
Status: RO

I have recently been trying to get mathematica to accept an input of GIVEN
accuracy, ie: Foo[1.3,25] implies 1.300000000000000000000000, ie: 25 digit
precision according to the Precision[] function, otherwise the
OUTPUT accuracy suffers due to the 'machine accuracy' assumed for '1.3'. The
only way I have found to do this is to use Rationalize[1.3,10^-25], and
use 13/10 in my calculations to arbitrary precision, but
Rationalize[] assumes an input of machine accuracy too, so

Rationalize[0.9999999999999999999,10^-25]

gives 1

which is not adequate for 25-digit processing!

Any ideas?

Thanks,

Keith Slavin,
Tektronix,
Beaverton,Or.
(503) 627-4907
keith@videovax.tv.tek.com


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Nov  9 03:08:39 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA23354
  (5.64+/IDA-1.3.4 for stevec); Fri, 9 Nov 90 03:08:37 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA10901; Fri, 9 Nov 90 03:07:06 CST
Received: by yoda.ncsa.uiuc.edu id AA22528
  (5.64+/IDA-1.3.4 for ); Thu, 8 Nov 90 22:50:45 -0600
Received: by yoda.ncsa.uiuc.edu id AA22524
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 8 Nov 90 22:50:43 -0600
Message-Id: <9011090450.AA22524@yoda.ncsa.uiuc.edu>
Date:         Thu, 08 Nov 90 17:30:17 ITA
From: Riccardo Rigon <RIGON@iveuncc.bitnet>
Subject:      Retry on tree and Map
To: Mathematica special Interest Group <MATHGROUP@yoda.ncsa.uiuc.edu>
Status: RO

I apologize if you have just received this mail, but it seems it was not
completely delivered. Further I did some errors which I have now corrected.

Dear mathgroupers,
my problem
is to build all the binary trees with a given number of leaves, n.
The thing then can be solved recursively, being a binary tree with n leaves
the union of a left tree with n-i leaves and a right tree with i leaves.
In every binary tree with n leaves, the total number of internal arcs is n-1
as it can be proven by induction.
Hence   every binary tree with n leaves can be parametrized by a
sequence of 2n-1 letters, for instance of n-1 `i` for internal arcs,and n `l`
for the leaves as follow: we start at the root and follow the tree left-hand
putting in the sequence an i when we meet an internal arc or an l in the
case of leaves.
( draw the tree and follow it beginning from the left of the root and turn
when you meet the beginning of a leaf.
In this way the total distance covered equals two times the total lenght
of the tree. Every arc is in fact followed two times: on the left and on the
left )
When we meet for the second time the same arc we do not add anything.
The Mathematica  code suitable for the operation could be:

Tree[n_]:=Block[{i,ka},ka=Table[Flatten[{i,Tree[n-i],Tree[i]}],{i,n}];ka]
Tree[1]:=i

The problem is that when n=4 the result gives two elements ( a matrix ) and
the body of the Table statement do not work as one would.
My solution should involve the use if the Map function and the first step
would be the merging of two sequenceces like these:

{{1,2,3},{4,5,6}} and {{a,b,c},{d,e,f}}
in:
{{1,2,3,a,b,c},{1,2,3,d,e,f},{4,5,6,a,b,c},{4,5,6,d,e,f}}.

My solution to this `Map` problem is to use a double Map statement:

first[x_,y_List]:=Map[Join[x,#]&,y]  (* x is a simple array *)
second[xx_,yy_]:=Flatten[Map[first[#,yy]&,xx]

which is not a very good solution.  (How one can do this in one
single statement ?)
Subsequent steps should be the change of the body in the approriate way.
Thew solution should sound like this:
....
aa=Tree[n-i];bb=Tree[i];
sol[aa_,bb_]:= Block[{apple,melon}, melon=Insert[aa,i,1];
               apple=second[melon,bb]
               ]
but because I am first looking for the solution of the first problem
I have not tried it till now (Does the recursion still work?)
Does someone would so kind to help me ?
Thank you in advance.

Riccardo Rigon
bitnet: Rigon@iveuncc
internet: Rigon@iveuncc.unive.it

P.S. Probably my questions are tedious and/or obvious, but I am a beginner
with not people with whom discuss.Thank you again.


From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Nov  9 04:44:35 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA23472
  (5.64+/IDA-1.3.4 for stevec); Fri, 9 Nov 90 04:44:33 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA12343; Fri, 9 Nov 90 04:43:10 CST
Received: by yoda.ncsa.uiuc.edu id AA22523
  (5.64+/IDA-1.3.4 for ); Thu, 8 Nov 90 22:50:37 -0600
Received: by yoda.ncsa.uiuc.edu id AA22519
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 8 Nov 90 22:50:36 -0600
Message-Id: <9011090450.AA22519@yoda.ncsa.uiuc.edu>
Date: 7 Nov 90 21:48:00 EDT
From: "WILLIAM M. GOLDING" <golding@ccf1.nrl.navy.mil>
Subject: Integrate ???
To: "mathgroup" <mathgroup@yoda.ncsa.uiuc.edu>
Status: RO


	Hi there,

		Sorry, to keep bringing up this integrate point but its 
been nagging at me. I agree with everyone that mathematica is doing the 
definite integral by doing the indefinite integral and evaluating at 
0 and 2 Pi. The problem is that it's doing the indefinite integral
incorrectly. It's not totally incorrect, the integral is legit for the range
0 to Pi but negative of the right answer for the range Pi to 2 Pi.
I don't know how important this is in the whole scheme of things but
it sure makes me aware that one has to take with a few grains of 
salt the results obtained from a symbolics package. Obviously the integral
could be done over the two ranges separately and pieced together, but 
when the program comes back and tells you its got the answer I want to be
able to believe it. Anyways here is the original problem an how I think
it should be solved.

	Integrate[Sqrt[2-2 Cos[x]],{x,0,2 Pi}]

simplify the integrand

	2-2 Cos[x] = 2 - Exp[I x] - Exp[-I x]

		   = - [ Exp[I x/2]- Exp[-I x/2] ]^2

		   = - 4 I^2 Sin[x/2]^2

		   =  4 Sin[x/2]^2

We want the square root of this last expression so we get

	Sqrt[ 2-2 Cos[x] ] = Sqrt[ 4 Sin[x/2]^2 ]

			   = Abs [ 2 Sin[x/2] ]

In general,  we have to include the absolute value sign here because 
we might not know the range of the integration variable. That is assuming
x to be real, and there is no reason in this case not to assume x to be
real, we have taken the positve sqrt of number which is definitely >= 0,
and we require the result to be on the positive branch of our square root
function. For example, suppose x = 3 Pi then if we exclude the absolute
value sign we get

	Sqrt[ 4 Sin[3 Pi/2]^2] = 2 Sin[3 Pi/2]

			       = 2 (-1)

			       = - 2

but the Sqrt function must be >= 0 if we're going to stay on the positive 
branch, so the absolute value sign is necessary in the general case. 

Actually, with the integrand in this form and limiting x to the 
range  0 to 2 Pi as for our special case the Abs is not needed since

		2 Sin[x/2] = 2 Abs[ Sin[x/2] ]  0 <= x <= 2 Pi    .

			
Thus we should be able to calculate the indefinte integral from

	Integrate[ Sqrt[2-2 Cos[x]] ,x] = Integral[ 2 Sin[x/2] ,x]

				= -4 Cos[x/2]

			only for   0<= x <= 2 Pi  .

To find the definite integral as in the original problem we get

	Integrate[Sqrt[2-2 Cos[x]],{x,0,2 Pi}] =

                                                 | 2 Pi
				= ( -4 Cos[x/2] )| 
                                                 | 0

				= -4 ( Cos[Pi] - Cos[0] )

				= -4 (   -1    -   1 )

				=  8

And this is the correct result at last. 


The result that Mathematica gives for the indefinite integral is 


In[1]:= Integrate [Sqrt[ 2-2 Cos[x]] , x ]

                  -4
Out[1]= -----------------------
                          2
                    Sin[x]
        Sqrt[1 + -------------]
                             2
                 (1 + Cos[x])


By using a little algebra and trigonometry you can show that this last result 
is the same as ours in the range  0 to Pi , and the negative of ours in 
the range pi to 2 Pi . That is


The indefinite integral that mathematica produces is equivalent to

	-4 Cos[x/2]   0 <= x <= Pi   (Identical to our result except
					our range is 0 to 2 Pi)

	 4 Cos[x/2]   Pi <= x <= 2 Pi

So we evaluate this at 0 and get -4 then we evaluate at 2 Pi and get -4 
take the difference and the result is zero which is what mathematica has
been getting. Notice that this function is continuous at x=Pi, but has
discontinuous slope at x = Pi. Is it unreasonable for the integral of a
continuous function to have discontinuous slope within the integration
range. And if so might this be used as a clue to expect an error in the
integration algorithm.


The thing that bothers me about all this is that it is possible to get
an integral that covers the whole integration range and seems reasonable,
without mathematica once mentioning that there might be a problem with
what we are doing.


Here is an example of the neglect of the range applicability that I thought
interesting.


In[2]:= Sqrt[Sin[x]^2]

Out[2]= Sin[x]    Seems like a reasonable result but what about 



In[3]:= Integrate[Sqrt[Sin[x]^2] , x ]

Out[3]= -Cos[x]

In[4]:= Quit

In[1]:= Sqrt[Sin[x]^2]

Out[1]= Sin[x]       Seems like a reasonable result but what about 
			x = 3 Pi/2


In[2]:= Integrate[Sqrt[Sin[x]^2] , x]

Out[2]= -Cos[x]       It decided that Sin[x] was what I really wanted
			to integrate


In[3]:= Integrate[Sqrt[Sin[x]^2],{x,0,Pi}]

Out[3]= 2                This is right !!!

In[4]:= Integrate[Sqrt[Sin[x]^2],{x,Pi,2 Pi}]

Out[4]= -2		 This is wrong !!

In[5]:=  Integrate[Sqrt[Sin[x]^2],{x,0,2 Pi}]

Out[5]= 0		 This is wrong !

In[6]:= I Quit






From mathgroup-adm@yoda.ncsa.uiuc.edu Fri Nov  9 01:19:31 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA23234
  (5.64+/IDA-1.3.4 for stevec); Fri, 9 Nov 90 01:19:29 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA09089; Fri, 9 Nov 90 01:18:03 CST
Received: by yoda.ncsa.uiuc.edu id AA22518
  (5.64+/IDA-1.3.4 for ); Thu, 8 Nov 90 22:50:31 -0600
Received: by yoda.ncsa.uiuc.edu id AA22514
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 8 Nov 90 22:50:29 -0600
Message-Id: <9011090450.AA22514@yoda.ncsa.uiuc.edu>
From: "Keith R. Slavin" <keith@videovax.tv.tek.com>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Bernoulli numbers.
Date: Wed, 07 Nov 90 14:49:43 PST
Status: RO


I noticed (by way of erroneous results) that although NBernoulliB[n,m] is
faster than N[BernoulliB[n],m], it is WRONG for n=0 (it gives 0.5 instead
of 1). Users beware!

Keith Slavin
Tektronix TV division,
(503) 627 4907
keith@videovax.tv.tek.com



From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Nov 10 01:49:30 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA25438
  (5.64+/IDA-1.3.4 for stevec); Sat, 10 Nov 90 01:49:28 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA02535; Sat, 10 Nov 90 01:48:10 CST
Received: by yoda.ncsa.uiuc.edu id AA24630
  (5.64+/IDA-1.3.4 for ); Fri, 9 Nov 90 23:14:42 -0600
Received: by yoda.ncsa.uiuc.edu id AA24626
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 9 Nov 90 23:14:40 -0600
Message-Id: <9011100514.AA24626@yoda.ncsa.uiuc.edu>
Date: Fri, 09 Nov 90 01:29:18 
From: randy@sparc.ncpa.olemiss.edu (Randy Zagar)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Problems converting clipboard to Illustrator format
Status: RO

Have a slight problem I would like to ask about.  I just made a
10201 point DensityGraphics object that I would like to put into
Adobe Illustrator 88.  I'm using Mathematica v1.2 on a Mac-2 with a 
color screen and Illustrator 88 v1.6.

I selected the cell with the graphics, copied it, and did the 
"Convert Clipboard" menu item.  Illustrator couldn't sucessfully read an
EPSF document created by Mathematica.  When I created a v1.1 Illustrator 
file all I got was the axes bounding the plot.  None of the data 
appeared in the Illustrator window. 

My question is this:  Am I having a stone-age version conflict, or am I 
close enough to the cutting edge to have found a _real_ bug ?  Has 
anyone had success getting Mathematica graphics into Illustrator 88 ?

Please reply by direct E-mail as I'm not yet on this list.

Thanks ahead of time,

Randy Zagar                     National Center for Physical Acoustics
Phone: (601)-232-5614           Colisium Drive
FAX:   (601)-232-7494           University of Mississippi
                                University, MS 38677

p.s.  Is there an archive site for this group ?


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Nov 10 01:06:46 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA25384
  (5.64+/IDA-1.3.4 for stevec); Sat, 10 Nov 90 01:06:44 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA01918; Sat, 10 Nov 90 01:05:26 CST
Received: by yoda.ncsa.uiuc.edu id AA24640
  (5.64+/IDA-1.3.4 for ); Fri, 9 Nov 90 23:16:05 -0600
Received: by yoda.ncsa.uiuc.edu id AA24636
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 9 Nov 90 23:16:04 -0600
Message-Id: <9011100516.AA24636@yoda.ncsa.uiuc.edu>
Date: Fri, 9 Nov 90 05:55:30 PST
From: jdelany@sargas.ACS.CalPoly.EDU (Jim Delany)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Integrate???
Status: RO


Dear Mr. Golding

Sqrt is a real weak point in Mathematica.  Any computation using it is
in doubt.  Apparently WRI has a corporate policy that Sqrt[x^2] is x. It
reminds me of the story of the state legislature the passed a law
decreeing that pi equals three.

In[1]:= Sqrt[ x^2 ] === x
 
Out[1]= True
 
In[2]:= Simplify[ Sqrt[8] - 2^(3/2) ]
 
                     3/2 
Out[2]= 2 Sqrt[2] - 2 

Jim Delany  ( jdelany@nike.calpoly.edu )
Math Department
Cal Poly, San Luis Obispo  CA  93407



From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Nov 10 03:24:07 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA25595
  (5.64+/IDA-1.3.4 for stevec); Sat, 10 Nov 90 03:24:05 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA04019; Sat, 10 Nov 90 03:22:42 CST
Received: by yoda.ncsa.uiuc.edu id AA24635
  (5.64+/IDA-1.3.4 for ); Fri, 9 Nov 90 23:14:48 -0600
Received: by yoda.ncsa.uiuc.edu id AA24631
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 9 Nov 90 23:14:47 -0600
Message-Id: <9011100514.AA24631@yoda.ncsa.uiuc.edu>
Date: Fri, 9 Nov 90 08:20:50 EST
From: pkane@Kodak.COM (Paul Kane)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: 2D NIntegrate
Status: RO


Hello again,

I didn't get many replies to my 2D NIntegrate dilemma, but I did
get a couple that I thought others would find interesting. The problem,
in case you've deleted it from your memories, was that a two dimensional
numerical integration, involving Bessel functions, was taking a prohibitively
long time to execute.

Paul Abbott of wri suggested :

>  One suggestion (which I have not tried in the 2 dimensional case) is that the
>  option Method->DoubleExponential may help for rapidly oscillating functions
>  
>  DoubleExponential is a choice for the option Method
>     of NIntegrate. Method -> DoubleExponential causes
>     a doubly exponentially convergent algorithm to be
>     used.

This was interesting to me since this option is not in the Mathematica
book or the Reference Guide Updates (1.2) that I have. mma seemed to
know about the option, although unfortunately it did not have any impact
on the results.

A colleague of mine at Kodak offered this :

>  I was going to suggest that you simply generate a 2-D array of the bessel function, J1(x)/x and a vector representing the other function and simply 
>  
>  Apply[Plus, matrix . vector];

>  where matrix has the J1(x)/x values and vector has the other function. In a nut shell, this is what I do for hankel transforms. (NOTE the . means DOT PRODUCT)

In fact, I have done this in the past (at his suggestion) and it does run
in an acceptable length of time. Of course, one must be careful about integrands
that have singularities. Although this is not a very satisfying solution to the 
NIntegrate problem, it does get the job done, and
usually I am dealing with well-behaved functions.

Still another suggestion was to write a C or FORTRAN program. A good idea,
since specialized code in C or FORTRAN will probably run faster in any case.
But it would be nice to have mma do the job, since it would spare me the
time involved to write my own code. After all, that's why I bought mma
in the first place, among other reasons.

Thanks to all who responded.


Paul J. Kane
Eastman Kodak Co.
Photographic Research Labs
Rochester,NY 14650-1717
(716)-477-1895
(pkane@Kodak.COM)


From mathgroup-adm@yoda.ncsa.uiuc.edu Sat Nov 10 02:52:14 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA25540
  (5.64+/IDA-1.3.4 for stevec); Sat, 10 Nov 90 02:52:11 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA03375; Sat, 10 Nov 90 02:50:54 CST
Received: by yoda.ncsa.uiuc.edu id AA24645
  (5.64+/IDA-1.3.4 for ); Fri, 9 Nov 90 23:16:14 -0600
Received: by yoda.ncsa.uiuc.edu id AA24641
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Fri, 9 Nov 90 23:16:13 -0600
Message-Id: <9011100516.AA24641@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Input accuracy 
Date: Fri, 09 Nov 90 09:10:49 PST
From: jacobson@cello.hpl.hp.com
Status: RO

Keith Slavin, writes:

> I have recently been trying to get mathematica to accept an input of GIVEN
> accuracy, ie: Foo[1.3,25] implies 1.300000000000000000000000, ie: 25 digit
> precision according to the Precision[] function, otherwise the
> OUTPUT accuracy suffers due to the 'machine accuracy' assumed for
> '1.3'. 
> ... 
> Any ideas?

Yes, this does it.  (I've called it PNum instead of Foo.)
The first definition accepts a string input, so you would write:
PNum["1.3",25].  For easier input when rationalize would work, I added
the second definition, which takes a number and calls Rationalize.
The third is just there so it works on integers as well.

 PNum[st_String, n_] := \
    SetPrecision[ToExpression[StringJoin[st, 
       Apply[StringJoin, Table["0", {Max[n, Precision[1.] + 5]}]]]], n]
   
  PNum[x_Real, n_] := \
    SetPrecision[N[Rationalize[x], Max[n, Precision[1.] + 5]], n]
   
  PNum[x_Integer, n_] := SetPrecision[N[x, Max[n, Precision[1.] + 5]], n]

Big floats are extremely dangerous in Mathematica.  Caveat Emptor!
(There are many iterative calculations that ratchet down the precision
by 1 each iteration, and Mathematica uses the precision to determine
the number of bits in the representation.  So when you are done you
have a totally meaningless result.  Mathematica also has some bugs
that let the precision get too big, so don't trust what you get.  If
you can live with their accuracy/precision, machine numbers are much
safer.)

  -- David Jacobson



From mathgroup-adm@yoda.ncsa.uiuc.edu Mon Nov 12 21:12:33 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA29346
  (5.64+/IDA-1.3.4 for stevec); Mon, 12 Nov 90 21:12:31 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA17388; Mon, 12 Nov 90 21:11:16 CST
Received: by yoda.ncsa.uiuc.edu id AA29160
  (5.64+/IDA-1.3.4 for ); Mon, 12 Nov 90 18:40:21 -0600
Received: by yoda.ncsa.uiuc.edu id AA29156
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Mon, 12 Nov 90 18:40:20 -0600
Message-Id: <9011130040.AA29156@yoda.ncsa.uiuc.edu>
Date: Mon, 12 Nov 90 09:20:41 +0200
From: pjanhune@finsun.csc.fi
Subject: Definite Integrals etc.
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

About Integrate[ Sqrt[2 - 2 Cos[x]], {x, 0, 2 Pi}]:

If you load the package Calculus/DefiniteIntegrate.m before integrating, you
at least get a lot of error messages (and the wrong answer 0). I've found
the package DefiniteIntegrate.m useful, because it warns you if something
is likely to be going wrong.

About NIntegrate:

Paul J. Kane has had problems with two-dimensional NIntegrate. His example
contained Bessel functions. But there seems to be problems even with very
simple polynomial functions as the following example shows:

In[1]:= NIntegrate[x^2+y^2,{x,-1,1},{y,-1,1}]  (* this is fine *)

Out[1]= 2.66667

In[2]:= NIntegrate[x^4+y^2,{x,-1,1},{y,-1,1}]  (* problems! *)

NIntegrate::conv:
   Numerical integral failed to reach specified accuracy after 7
     recursive subdivisions near -1. for variable number 1.

NIntegrate::conv:
   Numerical integral failed to reach specified accuracy after 7
     recursive subdivisions near -0.999999 for variable number 1.

NIntegrate::conv:
   Numerical integral failed to reach specified accuracy after 7
     recursive subdivisions near -0.999985 for variable number 1.

General::stop: Further output of NIntegrate::conv
     will be suppressed during this calculation.
^C
Interrupt:
        continue (or c) to continue
        show (or s) to show current operation (and then continue)
        trace (or t) to show all operations
        abort (or a) to abort current calculation
        exit (or quit) to exit program
? a

Out[2]= $Interrupted

In[3]:= Integrate[x^4+y^2,{x,-1,1},{y,-1,1}]
  (* I interrupted after about 30 seconds on a Sun-4. Both integrals, of course,
     exits and can be calculated exactly: *)

        32
Out[3]= --
        15

In[4]:= Integrate[x^2+y^2,{x,-1,1},{y,-1,1}]

        8
Out[4]= -
        3


 I think there is a real bug in the two-dimensional NIntegrate. One-dimensional NIntegrate
 works so well that this kind of behavior cannot be otherwise understood.


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Nov 13 16:54:46 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA02081
  (5.64+/IDA-1.3.4 for stevec); Tue, 13 Nov 90 16:54:43 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA13497; Tue, 13 Nov 90 16:55:28 CST
Received: by yoda.ncsa.uiuc.edu id AA01376
  (5.64+/IDA-1.3.4 for ); Tue, 13 Nov 90 15:05:37 -0600
Received: by yoda.ncsa.uiuc.edu id AA01372
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 13 Nov 90 15:05:35 -0600
Message-Id: <9011132105.AA01372@yoda.ncsa.uiuc.edu>
Date: Fri, 9 Nov 90 13:45:29 PST
From: van-bc!mdivax1!kenward (Gary Kenward)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Problem with Complement?
Status: RO

Why does the Complement function reverse lists under some circumstances?

	In[37]:= Complement[{Null,1,2,3,4,5}, {Null}]

	Out[37]= {1, 2, 3, 4, 5}

	In[38]:= Complement[{Null,1,1/2,1/3,1/4,1/5}, {Null}]

    	          1  1  1  1
	Out[38]= {-, -, -, -, 1}
  	          5  4  3  2

van-bc!mdivax1!kenward (Gary Kenward)

From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Nov 13 17:42:54 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA02380
  (5.64+/IDA-1.3.4 for stevec); Tue, 13 Nov 90 17:42:51 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA14239; Tue, 13 Nov 90 17:43:38 CST
Received: by yoda.ncsa.uiuc.edu id AA01371
  (5.64+/IDA-1.3.4 for ); Tue, 13 Nov 90 15:05:28 -0600
Received: by yoda.ncsa.uiuc.edu id AA01367
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 13 Nov 90 15:05:26 -0600
Message-Id: <9011132105.AA01367@yoda.ncsa.uiuc.edu>
From: "Keith R. Slavin" <keith@videovax.tv.tek.com>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: NIntegrate
Date: Tue, 13 Nov 90 08:54:40 PST
Status: RO

To help with numerical integration of expressions like:

NIntegrate[x^4+y^2,{x,-1,1},{y,-1,1}]

try increasing the MaxRecursion depth to allow it to go down more
subdivision depths to reach its required accuracy goal. eg: use:

NIntegrate[x^4+y^2,{x,-1,1},{y,-1,1},MaxRecursion->10]

This works just fine.

Keith Slavin
Tektronix Inc,
Beaverton Or,
(503) 627 4907




From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Nov 13 18:55:23 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA02525
  (5.64+/IDA-1.3.4 for stevec); Tue, 13 Nov 90 18:55:21 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15314; Tue, 13 Nov 90 18:56:09 CST
Received: by yoda.ncsa.uiuc.edu id AA01361
  (5.64+/IDA-1.3.4 for ); Tue, 13 Nov 90 15:05:14 -0600
Received: by yoda.ncsa.uiuc.edu id AA01357
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 13 Nov 90 15:05:12 -0600
Message-Id: <9011132105.AA01357@yoda.ncsa.uiuc.edu>
Date: Tue, 13 Nov 90 09:25:34 EST
From: Jim_Wendel@ub.cc.umich.edu
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: logical expressions
Status: RO

This is about Paul Abbott's note of 10/28, logical expressions.
The second example, supposedly of an invalid formula, is incorrect,
in the sense that the formula evaluates to q for every p, not to false;
this is readily checked by doing a truth-table by hand.
Furthermore, what is the role of the quantity e=Rep[1,gbool,2}?
It evaluates to 1, so why not just use 1, or nothing at all in multiplicative
environments, e.g. and[x_,y_]:=x y, rather than e x y?


From mathgroup-adm@yoda.ncsa.uiuc.edu Tue Nov 13 19:37:59 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA02637
  (5.64+/IDA-1.3.4 for stevec); Tue, 13 Nov 90 19:37:57 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA15849; Tue, 13 Nov 90 19:38:44 CST
Received: by yoda.ncsa.uiuc.edu id AA01366
  (5.64+/IDA-1.3.4 for ); Tue, 13 Nov 90 15:05:20 -0600
Received: by yoda.ncsa.uiuc.edu id AA01362
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Tue, 13 Nov 90 15:05:18 -0600
Message-Id: <9011132105.AA01362@yoda.ncsa.uiuc.edu>
Date: Mon, 12 Nov 90 22:56:30 +0100
From: Markus Lautenbacher <Markus.Lautenbacher@ds0.cip.physik.tu-muenchen.de>
Subject: User defined aliases
To: mathgroup@yoda.ncsa.uiuc.edu
Status: RO

Hi mathgroup readers,

perhaps some of you can give me a little advice on the following
problem:
I have defined a function `OperatorProduct' which I want to transform
via pattern matching in something else on the right hand side of
several transformation rules, e.g.

OperatorProduct[a_,b_] := f[a,b]

(What is actually on the right hand side doesn't matter for the
problem I describe here.)  Now, `OperatorProduct' is a quite
descriptive but also long name and I wanted to have something shorter.
Since `Alias[]' tells you that `*' is just an alias for `Times' I
tried `<>::=OperatorProduct' (I used `<>' is still unused) in order to
allow for typing just `a <> b' instead of `OperatorProduct[a,b]'.

However, Mathematica refused to accept this alias. Trying several
versions like `<>::=~OperatorProduct~" and likewise forms didn't work
either. Somehow Mathematica seems to resolve `<>' to the mathematical
`less' and `greater' relations instead of a new combined symbol `<>'.
What worked was `op::=OperatorProduct' with a usage like e.g. 
`a ~op~ b' but that is not excatly what I wanted.

Does anybody know whether aliases like `*' are hard wired in
Mathematica or is there a simple way to get my `<>' to work.  The
important point is that I want to define a new kind of valid _input_
format for the user defined function `OperatorProduct'. If it just
were for formatting the output of `OperatorProduct' the `Infix'
function (p. 278 MathBook) would of course do the job.

Thanks in advance,
                  MARKUS


+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
#   MARKUS E. LAUTENBACHER,                                               #
#      office:  Technical University Munich, Physics Department           #
#               Theoretical Physics T31, WD-8046 Garching, FRG            #
#               phone: 0049/89/3209-2398                                  #
#               INTERNET: lauten@ds0.cip.physik.tu-muenchen.de            #
#      private: Gohrenstr. 4/319, WD-8000 Muenchen 19, FRG                #    
#-------------------------------------------------------------------------#
#   SIR ERNEST RUTHERFORD:  `Science is physics, and the rest is          #
#                            stamp collecting'                            #
#   Surely Rutherford (1871-1937) knew nothing about computers! ;-)       #
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Nov 15 21:28:29 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA03284
  (5.64+/IDA-1.3.4 for stevec); Thu, 15 Nov 90 21:28:26 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA24409; Thu, 15 Nov 90 21:29:15 CST
Received: by yoda.ncsa.uiuc.edu id AA03188
  (5.64+/IDA-1.3.4 for ); Thu, 15 Nov 90 20:09:27 -0600
Received: by yoda.ncsa.uiuc.edu id AA03184
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 15 Nov 90 20:09:26 -0600
Message-Id: <9011160209.AA03184@yoda.ncsa.uiuc.edu>
Date: Thu, 15 Nov 90 16:35:22 -0500
From: sg04%harvey@gte.com (Steven Gutfreund)
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Follow-up request
Status: RO

Has anyone written any B-Spline code for mathematica?

In particular I am looking for Uniform or non-Uniform (NURB)
patches for surface data.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Yechezkal Shimon Gutfreund		 		  sgutfreund@gte.com
GTE Laboratories, Waltham MA			    harvard!bunny!sgutfreund
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


From mathgroup-adm@yoda.ncsa.uiuc.edu Thu Nov 15 22:28:39 1990
Received: from newton.ncsa.uiuc.edu by yoda.ncsa.uiuc.edu with SMTP id AA03342
  (5.64+/IDA-1.3.4 for stevec); Thu, 15 Nov 90 22:28:37 -0600
Return-Path: <mathgroup-adm@yoda.ncsa.uiuc.edu>
Received: from yoda.ncsa.uiuc.edu by newton.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA25227; Thu, 15 Nov 90 22:29:28 CST
Received: by yoda.ncsa.uiuc.edu id AA03168
  (5.64+/IDA-1.3.4 for ); Thu, 15 Nov 90 20:08:48 -0600
Received: by yoda.ncsa.uiuc.edu id AA03164
  (5.64+/IDA-1.3.4 for /usr/lib/sendmail -odq -oi -fmathgroup-adm@yoda.ncsa.uiuc.edu mathgroup-out); Thu, 15 Nov 90 20:08:46 -0600
Message-Id: <9011160208.AA03164@yoda.ncsa.uiuc.edu>
To: mathgroup@yoda.ncsa.uiuc.edu
Subject: Re: Problem with Complement? 
Date: Tue, 13 Nov 90 14:03:45 PST
From: jacobson@cello.hpl.hp.com
Status: RO

> Why does the Complement function reverse lists under some circumstances?

It sorts lists into a canonical order (aka "standard order").  See the
description of Complement on page 607 and the description of Order on
page 660.  "Canonical order has several properties.  Smaller numbers
of a particular type come first.  Symbols are ordered
lexicographically according to the textual names.  Strings are ordered
lexicographically.  Shorted expressions come first."

  -- David Jacobson


