#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 1 (of 2)."
# Contents:  Copyright Examples Examples/ComplexTest.m
#   Examples/CoverPage.m Examples/FixedPoints.ex Examples/MyReadList.m
#   Examples/Numerical.m Examples/OptionUse.m
#   Examples/ParametricPlots.ex Examples/Polyhedra.ex Examples/README
#   MANIFEST README RMPackages RMPackages/AlgExp.m RMPackages/Atoms.m
#   RMPackages/Collatz.m RMPackages/Constants.m RMPackages/Newton.m
#   RMPackages/Package1.m RMPackages/Package2.m RMPackages/Package3.m
#   RMPackages/PrimePi.m RMPackages/RandomWalk.m
#   RMPackages/SwinnertonDyer.m RMPackages/Tensors.m
#   RMPackages/VectorCalculus.m Utilities Utilities/ExpandIt.m
#   Utilities/FilterOptions.m Utilities/GetNumber.m
#   Utilities/PrintTime.m Utilities/SessionLog.m Utilities/ShowTime.m
#   Utilities/Until.m Utilities/WrapHold.m
# Wrapped by maeder@arcturus on Thu Nov  9 10:05:42 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Copyright' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Copyright'\"
else
echo shar: Extracting \"'Copyright'\" \(366 characters\)
sed "s/^X//" >'Copyright' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman Maeder
X
X    This collection is copyright 1989 by Roman Maeder.
X    It may be copied in its entirety for non-profit purposes only.
X    Sale, other than for the direct cost of media, is prohibited.
X
X *********************************************************************)
END_OF_FILE
if test 366 -ne `wc -c <'Copyright'`; then
    echo shar: \"'Copyright'\" unpacked with wrong size!
fi
# end of 'Copyright'
fi
if test ! -d 'Examples' ; then
    echo shar: Creating directory \"'Examples'\"
    mkdir 'Examples'
fi
if test -f 'Examples/ComplexTest.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Examples/ComplexTest.m'\"
else
echo shar: Extracting \"'Examples/ComplexTest.m'\" \(450 characters\)
sed "s/^X//" >'Examples/ComplexTest.m' <<'END_OF_FILE'
Xf[z_] := Indeterminate /; Abs[z] < 10.^-3                 (* Indeterminate near 0      *)
Xf[z_] := 10^100 /; Abs[z-2] < 10.^-3                      (* very large near 2         *)
Xf[z_] := DirectedInfinity[-2-I] /; Abs[z-(-2+I)] < 10.^-3 (* infinite near -2+I        *)
Xf[z_] := DirectedInfinity[] /; Abs[z-(2-2I)] < 10.^-3     (* ComplexInfinity near 2-2I *)
Xf[z_] := z                                                (* identity elsewhere        *)
END_OF_FILE
if test 450 -ne `wc -c <'Examples/ComplexTest.m'`; then
    echo shar: \"'Examples/ComplexTest.m'\" unpacked with wrong size!
fi
# end of 'Examples/ComplexTest.m'
fi
if test -f 'Examples/CoverPage.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Examples/CoverPage.m'\"
else
echo shar: Extracting \"'Examples/CoverPage.m'\" \(1382 characters\)
sed "s/^X//" >'Examples/CoverPage.m' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
XNeeds["RMPackages`NewParametricPlot3D`"]
XNeeds["Utilities`PlotUtilities`"]
X
Xt0 = 0.001; t1 = N[ Pi - t0 ]
Xdt = (t1 - t0)/36; dp = N[ Pi/20 ]
Xplotrange = {{-2, 3}, {-2.5, 2.5}, {-1.5, 1.5}}
X
Xpart[t0_, phi0_, phi1_] := Block[{theta, phi},
X	SphericalPlot3D[{Sin[theta] (2+Cos[phi/2]),
X	                 FaceForm[ColorCircle[phi/2, 1], ColorCircle[phi/2, 0.7]]},
X	                {theta, t0, t1, dt}, {phi, phi0, phi1, dp},
X	                PlotRange -> plotrange, DisplayFunction -> Identity]
X	]
X
Xcoverpage := Block[{glist},
X	glist = {part[t0, 0, 3Pi/2],     part[Pi/2, 3Pi/2, 4Pi/2],
X	         part[t0, 4Pi/2, 7Pi/2], part[Pi/2, 7Pi/2, 8Pi/2]};
X	Show[ glist, Boxed -> False, RenderAll -> True, Lighting -> False,
X	      DisplayFunction -> $DisplayFunction ]
X	]
END_OF_FILE
if test 1382 -ne `wc -c <'Examples/CoverPage.m'`; then
    echo shar: \"'Examples/CoverPage.m'\" unpacked with wrong size!
fi
# end of 'Examples/CoverPage.m'
fi
if test -f 'Examples/FixedPoints.ex' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Examples/FixedPoints.ex'\"
else
echo shar: Extracting \"'Examples/FixedPoints.ex'\" \(1292 characters\)
sed "s/^X//" >'Examples/FixedPoints.ex' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
XNeeds["RMPackages`Newton`"]
XNeeds["Utilities`Until`"]
X
X
X(* Golden Ratio, slow *)
X
Xb075in2 := (x = N[1, 20]; Until[ x=1+1/x, x==1+1/x ]; x)
X
X(* Sqrt[2] with intermediate steps *)
X
Xb083in2 := (r = 2; x = N[1, 40]; Do[ x = (x + r/x)/2; Print[x], {7}])
X
X(* Sqrt[2] with Nest[] *)
X
Xb084in5 := Nest[ (# + r/#)/2&, N[1, 40], 7 ]
X
X
X(* Sqrt[2] with FixedPoint *)
X
Xb084in7 := (r = 2; FixedPoint[ (# + r/#)/2&, N[1, 40] ])
X
X
X(* fixed point of Cos[], slow *)
X
Xb084in9 := FixedPoint[ Cos, N[1/2, 40] ]
X
X(* fixed point of Cos[], Newton's method *)
X
Xb086in2 := NewtonFixedPoint[ Cos, N[1, 40] ]
X
X(* Golden Ratio, Newton's method *)
X
Xb086in3 := NewtonFixedPoint[ 1 + 1/#&, N[2, 20] ]
X
END_OF_FILE
if test 1292 -ne `wc -c <'Examples/FixedPoints.ex'`; then
    echo shar: \"'Examples/FixedPoints.ex'\" unpacked with wrong size!
fi
# end of 'Examples/FixedPoints.ex'
fi
if test -f 'Examples/MyReadList.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Examples/MyReadList.m'\"
else
echo shar: Extracting \"'Examples/MyReadList.m'\" \(292 characters\)
sed "s/^X//" >'Examples/MyReadList.m' <<'END_OF_FILE'
XMyReadList[fileName_String, thing_:Expression] :=
X	Block[{file, expr, list = {}},
X		file = OpenRead[fileName];
X		If[ Head[file] =!= String, Return[list] ];
X		While[ True,
X			expr = Read[file, thing];
X			If[ expr === EndOfFile, Break[] ];
X			AppendTo[list, expr]
X		];
X		Close[file];
X		list
X	]
END_OF_FILE
if test 292 -ne `wc -c <'Examples/MyReadList.m'`; then
    echo shar: \"'Examples/MyReadList.m'\" unpacked with wrong size!
fi
# end of 'Examples/MyReadList.m'
fi
if test -f 'Examples/Numerical.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Examples/Numerical.m'\"
else
echo shar: Extracting \"'Examples/Numerical.m'\" \(124 characters\)
sed "s/^X//" >'Examples/Numerical.m' <<'END_OF_FILE'
XN[f[x_], prec_:(Precision[1.0])] := Nf[x, prec]
X
XNf[x_, prec_:(Precision[1.0])] := {x, prec} (* numerical code goes here *)
END_OF_FILE
if test 124 -ne `wc -c <'Examples/Numerical.m'`; then
    echo shar: \"'Examples/Numerical.m'\" unpacked with wrong size!
fi
# end of 'Examples/Numerical.m'
fi
if test -f 'Examples/OptionUse.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Examples/OptionUse.m'\"
else
echo shar: Extracting \"'Examples/OptionUse.m'\" \(419 characters\)
sed "s/^X//" >'Examples/OptionUse.m' <<'END_OF_FILE'
XBeginPackage["OptionUse`"]
X
Xg::usage = "g[n, options...] serves as an example for using options."
X
XOpt1::usage = "Opt1 is an option of g[]."
X
XOpt2::usage = "Opt2 is another option of g[]."
X
XOptions[g] = {Opt1 -> val1, Opt2 -> val2}
X
XBegin["`Private`"]
X
Xg[ n_, opts___Rule ] :=
X	Block[ {opt1, opt2},
X		opt1 = Opt1 /. {opts} /. Options[g];
X		opt2 = Opt2 /. {opts} /. Options[g];
X		{n, opt1, opt2}
X	]
X
XEnd[]
X
XEndPackage[]
END_OF_FILE
if test 419 -ne `wc -c <'Examples/OptionUse.m'`; then
    echo shar: \"'Examples/OptionUse.m'\" unpacked with wrong size!
fi
# end of 'Examples/OptionUse.m'
fi
if test -f 'Examples/ParametricPlots.ex' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Examples/ParametricPlots.ex'\"
else
echo shar: Extracting \"'Examples/ParametricPlots.ex'\" \(1275 characters\)
sed "s/^X//" >'Examples/ParametricPlots.ex' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
XNeeds["RMPackages`NewParametricPlot3D`"]
X
X(* rotated parabola *)
X
Xb042in3 := CylindricalPlot3D[ r^2, {r, 0, 1}, {phi, 0, 2Pi} ]
X
X(* cut out degenerate torus *)
X
Xb042in5 := SphericalPlot3D[ Sin[theta]^2, {theta, 0, Pi}, {phi, 0, 3Pi/2} ]
X
X(* hyperboloid *)
X
Xb050in6 := CylindricalPlot3D[ 1.5 Sqrt[1 + r^2], {r, 0, 2}, {phi, 0, 2Pi} ]
X
X(* catenoid *)
X
Xb101in9 := ParametricPlot3D[ {Cosh[z] Cos[phi], Cosh[z] Sin[phi], z},
X                             {z, -2, 2}, {phi, 0, 2Pi}, Boxed -> False ]
X
X(* spherical harmonic Y[3, 1] *)
X
Xy31 = Abs[ N[SphericalHarmonicY[3, 1, theta, 0]] ]
X
Xb120in5 := SphericalPlot3D[ y31, {theta, 0, Pi, Pi/24}, {phi, 0, 2Pi} ]
END_OF_FILE
if test 1275 -ne `wc -c <'Examples/ParametricPlots.ex'`; then
    echo shar: \"'Examples/ParametricPlots.ex'\" unpacked with wrong size!
fi
# end of 'Examples/ParametricPlots.ex'
fi
if test -f 'Examples/Polyhedra.ex' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Examples/Polyhedra.ex'\"
else
echo shar: Extracting \"'Examples/Polyhedra.ex'\" \(1288 characters\)
sed "s/^X//" >'Examples/Polyhedra.ex' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
XNeeds["Graphics`Polyhedra`"]
X
X(* intersection of icosahedron and dodecahedron *)
X
Xb093in9 := Show[ {Polyhedron[Icosahedron], Polyhedron[Dodecahedron]},
X                 Boxed -> False ]
X
X(* WRI's stellated icosahedron *)
X
Xicosa = Polyhedron[Icosahedron]
Xdodeca = Polyhedron[Dodecahedron]
X
Xb095in3 := Show[ Stellate[ icosa ] ]
X
X(* great dodecahedron *)
X
Xb095in4 := Show[ Stellate[ icosa, 1/Sqrt[2.0] ], Boxed -> False ]
X
X(* small stellated dodecahedron *)
X
Xb096in6 := Show[ Stellate[ dodeca, Sqrt[5.0] ], Boxed -> False ]
X
X(* great stellated dodecahedron *)
X
Xb096in7 := Show[ Stellate[icosa, 3], Boxed -> False ]
X
X(* See BookPictures.m for the great icosahedron! *)
END_OF_FILE
if test 1288 -ne `wc -c <'Examples/Polyhedra.ex'`; then
    echo shar: \"'Examples/Polyhedra.ex'\" unpacked with wrong size!
fi
# end of 'Examples/Polyhedra.ex'
fi
if test -f 'Examples/README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Examples/README'\"
else
echo shar: Extracting \"'Examples/README'\" \(874 characters\)
sed "s/^X//" >'Examples/README' <<'END_OF_FILE'
XApart from the example packages developed in the book, this directory
Xalso contains files that contain some of the live Mathematica
Xcomputations in the book, grouped according to the package used.  The
Xexamples are presented in the style explained in subsection 5.6.3.  For
Xexample, the computations involving complex maps (Chapter 1) are in the
Xfile ComplexMap.ex.
X
XEach computation is of the form bPPPinN, where PPP is the page number,
Xand N is the input line number.  There is one difference to the
Xcomputations in the book:  All the computations are done with the final
Xversion of a package, not with one of the intermediate developments, as
Xin the book.
X
XTo reproduce the computations, simply read in the file and then
Xevaluate one of the symbols defined.  The packages and utilities from
Xthis distribution need to be available, see the README in the parent
Xdirectory.
END_OF_FILE
if test 874 -ne `wc -c <'Examples/README'`; then
    echo shar: \"'Examples/README'\" unpacked with wrong size!
fi
# end of 'Examples/README'
fi
if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MANIFEST'\"
else
echo shar: Extracting \"'MANIFEST'\" \(1622 characters\)
sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
X   File Name		Archive #	Description
X-----------------------------------------------------------
X Copyright                  1	
X Examples                   1	
X Examples/BookPictures.m    2	
X Examples/ComplexMap.ex     2	
X Examples/ComplexTest.m     1	
X Examples/CoverPage.m       1	
X Examples/FixedPoints.ex    1	
X Examples/MyReadList.m      1	
X Examples/Numerical.m       1	
X Examples/OptionUse.m       1	
X Examples/ParametricPlots.ex  1	
X Examples/Polyhedra.ex      1	
X Examples/README            1	
X MANIFEST                   1	This shipping list
X README                     1	
X RMPackages                 1	
X RMPackages/AlgExp.m        1	
X RMPackages/Atoms.m         1	
X RMPackages/Collatz.m       1	
X RMPackages/ComplexMap.m    2	
X RMPackages/Constants.m     1	
X RMPackages/MakeFunctions.m  2	
X RMPackages/NewParametricPlot3D.m  2	
X RMPackages/Newton.m        1	
X RMPackages/Package1.m      1	
X RMPackages/Package2.m      1	
X RMPackages/Package3.m      1	
X RMPackages/PrimePi.m       1	
X RMPackages/RandomWalk.m    1	
X RMPackages/ReIm.m          2	
X RMPackages/RungeKutta.m    2	
X RMPackages/Skeleton.m      2	
X RMPackages/Struve.m        2	
X RMPackages/SwinnertonDyer.m  1	
X RMPackages/Tensors.m       1	
X RMPackages/TrigSimplification.m  2	
X RMPackages/VectorCalculus.m  1	
X Utilities                  1	
X Utilities/ExpandIt.m       1	
X Utilities/FilterOptions.m  1	
X Utilities/GetNumber.m      1	
X Utilities/PlotUtilities.m  2	
X Utilities/PrintTime.m      1	
X Utilities/SessionLog.m     1	
X Utilities/ShowTime.m       1	
X Utilities/Transcript.m     2	
X Utilities/Until.m          1	
X Utilities/WrapHold.m       1	
END_OF_FILE
if test 1622 -ne `wc -c <'MANIFEST'`; then
    echo shar: \"'MANIFEST'\" unpacked with wrong size!
fi
# end of 'MANIFEST'
fi
if test -f 'README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(1958 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
XThis is the main directory for the distribution of Mathematica Software
Xthat goes with
X
XRoman Maeder,
X	"Programming in Mathematica", Addison-Wesley, 1989,
X	ISBN 0-201-51002-2
X
XAppendix B of this book contains an index of all these packages.
X
XThe RMPackages subdirectory contains major packages developed in the
Xbook.  The Utilities subdirectory contains smaller programs that are
Xused inside some of the packages or that you can import into your own
Xpackages.
X
XFor easiest use, this main directory should be on your Mathematica
Xsearch path. Add the following to your init.m:
X
X	AppendTo[ $Path, "PATHNAME" ]
X
Xwhere PATHNAME is the full path name of this main directory.
XYou may also drop the utilities into the standard Mathematica
Xdistribution (mathdir/Packages/Utilities) and move RMPackages
Xinto mathdir/Packages. No addition to $PATH is necessary in this case.
X
XThe Examples subdirectory contains some examples from the book.
X
XThe text of the files is not a verbatim copy of the packages reproduced
Xin the book. They have been edited for system dependencies and maybe a
Xlast minute bug or two. Package contexts are now generally of the form
X"RMPackages`Package`" or "Utilities`Package`", so they can be found
Xwith the above addition to $Path.
X
XRemember: you need Version 1.2 of Mathematica!
X
XThis collection is copyright 1989 by Roman Maeder, see the separate
Xcopyright notice. The individual programs carry copyright notices, too,
Xwhich govern the copying of individual files from this collection.
X
XThere is also a Notebook version of this collection, useful on the
XMacintosh and the NeXT computer.
X
XMacintosh and MS-DOS versions of this collection are also available
Xon floppy disks from
X
X    Wolfram Research, Inc.
X    PO Box 6059
X    Champaign, IL 61826-6059
X    
X    (217) 398-0700
X
XWolfram Research, Inc. acts as distributor of the Macintosh and MS-DOS
Xversions only and does not answer any questions related to this software.
X
XEnjoy,
X
XRoman Maeder
END_OF_FILE
if test 1958 -ne `wc -c <'README'`; then
    echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test ! -d 'RMPackages' ; then
    echo shar: Creating directory \"'RMPackages'\"
    mkdir 'RMPackages'
fi
if test -f 'RMPackages/AlgExp.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'RMPackages/AlgExp.m'\"
else
echo shar: Extracting \"'RMPackages/AlgExp.m'\" \(1108 characters\)
sed "s/^X//" >'RMPackages/AlgExp.m' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
XAlgExpQ::usage = "AlgExpQ[expr] returns true if expr is an algebraic expression."
X
XBegin["Private`"]
X
XSetAttributes[AlgExpQ, Listable]
X
XAlgExpQ[ _Integer ]  = True
XAlgExpQ[ _Rational ] = True
XAlgExpQ[ c_Complex ] = AlgExpQ[Re[c]] && AlgExpQ[Im[c]]
XAlgExpQ[ _Symbol ]   = True
X
XAlgExpQ[ a_ + b_ ] := AlgExpQ[a] && AlgExpQ[b]
XAlgExpQ[ a_ * b_ ] := AlgExpQ[a] && AlgExpQ[b]
XAlgExpQ[ a_ ^ b_Integer ]  := AlgExpQ[a]
XAlgExpQ[ a_ ^ b_Rational ] := AlgExpQ[a]
X
XAlgExpQ[_] = False
X
XEnd[]
XNull
END_OF_FILE
if test 1108 -ne `wc -c <'RMPackages/AlgExp.m'`; then
    echo shar: \"'RMPackages/AlgExp.m'\" unpacked with wrong size!
fi
# end of 'RMPackages/AlgExp.m'
fi
if test -f 'RMPackages/Atoms.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'RMPackages/Atoms.m'\"
else
echo shar: Extracting \"'RMPackages/Atoms.m'\" \(985 characters\)
sed "s/^X//" >'RMPackages/Atoms.m' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
XExplode::usage = "Explode[expr] turns an expression into
X	a list of characters that make up its name."
X
XIntern::usage = "Intern[charlist] turns a list of characters into an expression."
X
XBegin["`Private`"]
X
XExplode[atom_] := Characters[ ToString[InputForm[atom]] ]
X
XIntern[l:{_String..}] := ToExpression[ StringJoin @@ l ]
X
XEnd[]
X
XProtect[Explode, Intern]
X
XNull
END_OF_FILE
if test 985 -ne `wc -c <'RMPackages/Atoms.m'`; then
    echo shar: \"'RMPackages/Atoms.m'\" unpacked with wrong size!
fi
# end of 'RMPackages/Atoms.m'
fi
if test -f 'RMPackages/Collatz.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'RMPackages/Collatz.m'\"
else
echo shar: Extracting \"'RMPackages/Collatz.m'\" \(933 characters\)
sed "s/^X//" >'RMPackages/Collatz.m' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
Xlength[n_Integer?Positive] :=
X	Block[{i=1, m=n}, While[m != 1, m = If[OddQ[m], 3m+1, m/2]; i++];i ]
Xlength[_] = 0
X
Xmax[low_] :=
X	Block[{m=0, n=0, i=low, j},
X		While[ True,
X			j = length[i];
X			If[j > m, m = j; n = i; Print["length[", n, "] = ", m] ];
X			i++;
X			If[ Mod[i, 100] == 0, Print["i = ", i] ]
X		]
X	]
END_OF_FILE
if test 933 -ne `wc -c <'RMPackages/Collatz.m'`; then
    echo shar: \"'RMPackages/Collatz.m'\" unpacked with wrong size!
fi
# end of 'RMPackages/Collatz.m'
fi
if test -f 'RMPackages/Constants.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'RMPackages/Constants.m'\"
else
echo shar: Extracting \"'RMPackages/Constants.m'\" \(1298 characters\)
sed "s/^X//" >'RMPackages/Constants.m' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
XBeginPackage["RMPackages`Constants`"]
X
XConstants::usage = "Constants.m defines rules for approximate arithmetic with the
X	mathematical constants Pi, Degree, GoldenRatio, E, EulerGamma and Catalan."
X
XBegin["`Private`"]
X
XconstantList = {Pi, Degree, GoldenRatio, E, EulerGamma, Catalan}
X
Xprotected = Unprotect[Release[constantList]]
X
XDefineRules[const_Symbol] := (
X	const/: const + r_ := N[const, Accuracy[r]] + r /; Accuracy[r] < Infinity;
X	const/: const * r_ := N[const, Precision[r]] * r /; Precision[r] < Infinity;
X	const/: const ^ r_ := N[const, Precision[r]] ^ r /; Precision[r] < Infinity
X	)
X
XDefineRules /@ constantList
X
XProtect[Release[protected]]
X
XEnd[]
X
XEndPackage[]
END_OF_FILE
if test 1298 -ne `wc -c <'RMPackages/Constants.m'`; then
    echo shar: \"'RMPackages/Constants.m'\" unpacked with wrong size!
fi
# end of 'RMPackages/Constants.m'
fi
if test -f 'RMPackages/Newton.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'RMPackages/Newton.m'\"
else
echo shar: Extracting \"'RMPackages/Newton.m'\" \(1647 characters\)
sed "s/^X//" >'RMPackages/Newton.m' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
XBeginPackage["RMPackages`Newton`"]
X
XNewtonZero::usage = "NewtonZero[expr, x, x0] finds a zero of expr as a function of x
X	using the initial guess x0 to start the iteration. NewtonZero[f, x0] finds
X	a zero of the function f. The recursion limit determines the
X	maximum number of iteration steps that are performed."
X
XNewtonFixedPoint::usage = "NewtonFixedPoint[f, x0] finds a fixed point
X	of the function f using the initial guess x0 to start the iteration."
X
XNewton::noconv = "Iteration did not converge in `1` steps."
X
XBegin["`Private`"]
X
XNewtonZero[expr_, x_, x0_] := NewtonZero[ Function[x, expr], x0 ]
X
XNewtonZero[f_, x0_] :=
X	Block[{res, x0a, prec = Precision[x0], fp = f'},
X		x0a = SetPrecision[x0, prec + 10];
X		res = FixedPoint[(# - f[#]/fp[#])&, x0a, $RecursionLimit];
X		x0a = f[res];
X		If [ Accuracy[x0a] - Precision[x0a] < prec,
X			Message[Newton::noconv, $RecursionLimit] ];
X		N[res, prec]
X	]
X
XNewtonFixedPoint[f_, x0_] := NewtonZero[(f[#] - #)&, x0]
X
XEnd[]
X
XProtect[ NewtonZero, NewtonFixedPoint]
X
XEndPackage[]
END_OF_FILE
if test 1647 -ne `wc -c <'RMPackages/Newton.m'`; then
    echo shar: \"'RMPackages/Newton.m'\" unpacked with wrong size!
fi
# end of 'RMPackages/Newton.m'
fi
if test -f 'RMPackages/Package1.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'RMPackages/Package1.m'\"
else
echo shar: Extracting \"'RMPackages/Package1.m'\" \(50 characters\)
sed "s/^X//" >'RMPackages/Package1.m' <<'END_OF_FILE'
XBeginPackage["RMPackages`Package1`"]
XEndPackage[]
END_OF_FILE
if test 50 -ne `wc -c <'RMPackages/Package1.m'`; then
    echo shar: \"'RMPackages/Package1.m'\" unpacked with wrong size!
fi
# end of 'RMPackages/Package1.m'
fi
if test -f 'RMPackages/Package2.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'RMPackages/Package2.m'\"
else
echo shar: Extracting \"'RMPackages/Package2.m'\" \(50 characters\)
sed "s/^X//" >'RMPackages/Package2.m' <<'END_OF_FILE'
XBeginPackage["RMPackages`Package2`"]
XEndPackage[]
END_OF_FILE
if test 50 -ne `wc -c <'RMPackages/Package2.m'`; then
    echo shar: \"'RMPackages/Package2.m'\" unpacked with wrong size!
fi
# end of 'RMPackages/Package2.m'
fi
if test -f 'RMPackages/Package3.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'RMPackages/Package3.m'\"
else
echo shar: Extracting \"'RMPackages/Package3.m'\" \(50 characters\)
sed "s/^X//" >'RMPackages/Package3.m' <<'END_OF_FILE'
XBeginPackage["RMPackages`Package3`"]
XEndPackage[]
END_OF_FILE
if test 50 -ne `wc -c <'RMPackages/Package3.m'`; then
    echo shar: \"'RMPackages/Package3.m'\" unpacked with wrong size!
fi
# end of 'RMPackages/Package3.m'
fi
if test -f 'RMPackages/PrimePi.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'RMPackages/PrimePi.m'\"
else
echo shar: Extracting \"'RMPackages/PrimePi.m'\" \(1062 characters\)
sed "s/^X//" >'RMPackages/PrimePi.m' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
XPrimePi::usage = "PrimePi[x] returns the number of primes <= x."
X
XAttributes[PrimePi] = {Listable}
X
XBegin["`Private`"]
X
XPrimePi[x_] := 0 /; x < 2
X
XPrimePi[x_] :=
X	Block[{`li, `n0, `n1, `m, `nx = N[x]},
X		li = LogIntegral[nx];
X		n0 = Floor[li - LogIntegral[Sqrt[nx]]];
X		n1 = Ceiling[li];
X		While[ n1-n0 > 1,
X			m = Floor[(n0+n1)/2];                 (* midpoint *)
X			If[ Prime[m] <= nx, n0 = m, n1 = m ]
X		];
X		n0
X	] /; x >= 2
X
XEnd[]
XNull
END_OF_FILE
if test 1062 -ne `wc -c <'RMPackages/PrimePi.m'`; then
    echo shar: \"'RMPackages/PrimePi.m'\" unpacked with wrong size!
fi
# end of 'RMPackages/PrimePi.m'
fi
if test -f 'RMPackages/RandomWalk.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'RMPackages/RandomWalk.m'\"
else
echo shar: Extracting \"'RMPackages/RandomWalk.m'\" \(1122 characters\)
sed "s/^X//" >'RMPackages/RandomWalk.m' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
XBeginPackage["RMPackages`RandomWalk`"]
X
XRandomWalk::usage = "RandomWalk[n] plots a random walk of length n."
X
XBegin["`Private`"]
X 
XRandomWalk[n_Integer] :=
X	Block[{loc = {0.0, 0.0}, dir, points = Table[0, {n+1}], range = N[{0, 2Pi}]},
X		points[[1]] = loc;
X		Do[
X			dir = Random[Real, range];
X			loc += {Cos[dir], Sin[dir]};
X			points[[i]] = loc,
X		   {i, 2, n+1}];
X		Show[ Graphics[{Point[{0,0}], Line[points]}],
X		      Framed->True, AspectRatio->1 ]
X	]
X
XEnd[]
X
XProtect[ RandomWalk ]
X
XEndPackage[]
END_OF_FILE
if test 1122 -ne `wc -c <'RMPackages/RandomWalk.m'`; then
    echo shar: \"'RMPackages/RandomWalk.m'\" unpacked with wrong size!
fi
# end of 'RMPackages/RandomWalk.m'
fi
if test -f 'RMPackages/SwinnertonDyer.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'RMPackages/SwinnertonDyer.m'\"
else
echo shar: Extracting \"'RMPackages/SwinnertonDyer.m'\" \(1011 characters\)
sed "s/^X//" >'RMPackages/SwinnertonDyer.m' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
XSwinnertonDyerP::usage =
X	"SwinnertonDyerP[n, var] gives the minimal polynomial
X	of the sum of the squareroots of the first n primes."
X
XBegin["`Private`"]
X
XSwinnertonDyerP[n_Integer?Positive, x_] :=
X	Block[{arglist, poly, i},
X		arglist = Outer[Times, Table[Sqrt[Prime[i]], {i, n}], {-1, 1}];
X		poly = Outer[Plus, {x}, Sequence @@ arglist];
X		Expand[Times @@ Flatten[poly]]
X	]
X
XEnd[]
XNull
END_OF_FILE
if test 1011 -ne `wc -c <'RMPackages/SwinnertonDyer.m'`; then
    echo shar: \"'RMPackages/SwinnertonDyer.m'\" unpacked with wrong size!
fi
# end of 'RMPackages/SwinnertonDyer.m'
fi
if test -f 'RMPackages/Tensors.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'RMPackages/Tensors.m'\"
else
echo shar: Extracting \"'RMPackages/Tensors.m'\" \(1286 characters\)
sed "s/^X//" >'RMPackages/Tensors.m' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
XBeginPackage["RMPackages`Tensors`"]
X
Xui::usage = "ui[index] denotes an upper index in a tensor."
Xli::usage = "li[index] denotes a lower index in a tensor."
XTensor::usage = "Tensor[h][indices] denotes a tensor h with index list indices."
X
XBegin["`Private`"]
X
XFormat[ Tensor[t_][ind___] ] :=
X	Block[{indices},
X		indices = {ind} /. {ui->Superscript, li->Subscript};
X		SequenceForm[t, Sequence @@ indices]
X	] 
X
XFormat[ Tensor[t_][ind___], TeXForm ] :=
X	Block[{indices},
X		indices = {ind} /. {ui->Superscript, li->Subscript};
X		indices = Transpose[{Table["{}", {Length[indices]}], indices}];
X		SequenceForm[t, Sequence @@ Flatten[indices, 1]]
X	] 
X
XEnd[]
X
XEndPackage[]
END_OF_FILE
if test 1286 -ne `wc -c <'RMPackages/Tensors.m'`; then
    echo shar: \"'RMPackages/Tensors.m'\" unpacked with wrong size!
fi
# end of 'RMPackages/Tensors.m'
fi
if test -f 'RMPackages/VectorCalculus.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'RMPackages/VectorCalculus.m'\"
else
echo shar: Extracting \"'RMPackages/VectorCalculus.m'\" \(1471 characters\)
sed "s/^X//" >'RMPackages/VectorCalculus.m' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
XBeginPackage["RMPackages`VectorCalculus`"]
X
XDiv::usage = "Div[v, varlist] computes the divergence of
X	the vectorfield v w.r.t. the given variables in Cartesian coordinates."
X
XLaplacian::usage = "Laplacian[s, varlist] computes the Laplacian of
X	the scalar field s w.r.t. the given variables in Cartesian coordinates."
X
XGrad::usage = "Grad[s, varlist] computes the gradient of s
X	w.r.t. the given variables in Cartesian coordinates."
X
XJacobianMatrix::usage = "JacobianMatrix[flist, varlist] computes the Jacobian of
X	the functions flist w.r.t. the given variables."
X
XBegin["`Private`"]
X
XDiv[v_List, var_List] := Inner[D, v, var, Plus]
X
XGrad[s_, var_List] := D[s, #]& /@ var
X
XLaplacian[s_, var_List] := Div[ Grad[s, var], var]
X
XJacobianMatrix[f_List, var_List] := Outer[D, f, var]
X
XEnd[]
X
XProtect[ Div, Laplacian, Grad, JacobianMatrix ]
X
XEndPackage[]
END_OF_FILE
if test 1471 -ne `wc -c <'RMPackages/VectorCalculus.m'`; then
    echo shar: \"'RMPackages/VectorCalculus.m'\" unpacked with wrong size!
fi
# end of 'RMPackages/VectorCalculus.m'
fi
if test ! -d 'Utilities' ; then
    echo shar: Creating directory \"'Utilities'\"
    mkdir 'Utilities'
fi
if test -f 'Utilities/ExpandIt.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Utilities/ExpandIt.m'\"
else
echo shar: Extracting \"'Utilities/ExpandIt.m'\" \(211 characters\)
sed "s/^X//" >'Utilities/ExpandIt.m' <<'END_OF_FILE'
XExpandIt::usage = "ExpandIt[e] expands all numerators and denominators in e."
X
XBegin["`Private`"]
X
XExpandIt[x_Plus] := ExpandIt /@ x
XExpandIt[x_] := Expand[ Numerator[x] ] / Expand[ Denominator[x] ]
X
XEnd[]
XNull
END_OF_FILE
if test 211 -ne `wc -c <'Utilities/ExpandIt.m'`; then
    echo shar: \"'Utilities/ExpandIt.m'\" unpacked with wrong size!
fi
# end of 'Utilities/ExpandIt.m'
fi
if test -f 'Utilities/FilterOptions.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Utilities/FilterOptions.m'\"
else
echo shar: Extracting \"'Utilities/FilterOptions.m'\" \(992 characters\)
sed "s/^X//" >'Utilities/FilterOptions.m' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
XBeginPackage["Utilities`FilterOptions`"]
X
XFilterOptions::usage = "FilterOptions[symbol, options...] returns a sequence
X	of those options that are valid options for symbol."
X
XBegin["`Private`"]
X
XFilterOptions[ command_Symbol, opts___ ] :=
X	Block[{keywords = First /@ Options[command]},
X		Sequence @@ Select[ {opts}, MemberQ[keywords, First[#]]& ]
X	]
X
XEnd[]
XEndPackage[]
END_OF_FILE
if test 992 -ne `wc -c <'Utilities/FilterOptions.m'`; then
    echo shar: \"'Utilities/FilterOptions.m'\" unpacked with wrong size!
fi
# end of 'Utilities/FilterOptions.m'
fi
if test -f 'Utilities/GetNumber.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Utilities/GetNumber.m'\"
else
echo shar: Extracting \"'Utilities/GetNumber.m'\" \(325 characters\)
sed "s/^X//" >'Utilities/GetNumber.m' <<'END_OF_FILE'
XGetNumber[prompt_String, predicate_:(True&)] :=
X	Block[{answer},
X		While[ True,
X			answer = Input[prompt];
X			If[ NumberQ[answer] && predicate[answer], Break[] ];  (* good   *)
X			If[ answer === EndOfFile, Break[] ];                  (* escape *)
X			Print["Please enter a number that satisfies ", predicate]
X		];
X		answer
X	]
END_OF_FILE
if test 325 -ne `wc -c <'Utilities/GetNumber.m'`; then
    echo shar: \"'Utilities/GetNumber.m'\" unpacked with wrong size!
fi
# end of 'Utilities/GetNumber.m'
fi
if test -f 'Utilities/PrintTime.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Utilities/PrintTime.m'\"
else
echo shar: Extracting \"'Utilities/PrintTime.m'\" \(294 characters\)
sed "s/^X//" >'Utilities/PrintTime.m' <<'END_OF_FILE'
XPrintTime::usage = "PrintTime[expr] prints the time it takes
X	to evaluate expr and returns the result of the evaluation."
X
XBegin["`Private`"]
X
XSetAttributes[PrintTime, HoldAll]
X
XPrintTime[expr_] :=
X	Block[{`timing},
X		timing = Timing[expr];
X		Print[ timing[[1]] ];
X		timing[[2]]
X	]
X
XEnd[]
XNull
END_OF_FILE
if test 294 -ne `wc -c <'Utilities/PrintTime.m'`; then
    echo shar: \"'Utilities/PrintTime.m'\" unpacked with wrong size!
fi
# end of 'Utilities/PrintTime.m'
fi
if test -f 'Utilities/SessionLog.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Utilities/SessionLog.m'\"
else
echo shar: Extracting \"'Utilities/SessionLog.m'\" \(485 characters\)
sed "s/^X//" >'Utilities/SessionLog.m' <<'END_OF_FILE'
XOpenLog::usage = "OpenLog[filename] starts logging all input and output to filename."
XCloseLog::usage = "CloseLog[] closes the logfile opened by OpenLog[]."
X
XBegin["`Private`"]
X
Xlogfile=""
X
XOpenLog[filename_String] := (
X	logfile = OpenWrite[filename];
X	If[ Head[logfile] =!= String, Return[] ];
X	AppendTo[$Echo, logfile];
X	AppendTo[$Output, logfile];
X	)
X
XCloseLog[] := (
X	$Echo = Complement[$Echo, {logfile}];
X	$Output = Complement[$Output, {logfile}];
X	Close[logfile];
X	)
X
XEnd[]
XNull
END_OF_FILE
if test 485 -ne `wc -c <'Utilities/SessionLog.m'`; then
    echo shar: \"'Utilities/SessionLog.m'\" unpacked with wrong size!
fi
# end of 'Utilities/SessionLog.m'
fi
if test -f 'Utilities/ShowTime.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Utilities/ShowTime.m'\"
else
echo shar: Extracting \"'Utilities/ShowTime.m'\" \(1576 characters\)
sed "s/^X//" >'Utilities/ShowTime.m' <<'END_OF_FILE'
X(*********************************************************************
X
X	Copyright 1989 by Roman E. Maeder
X	
X	Adapted from
X	Roman E. Maeder: Programming in Mathematica, Addison-Wesley, 1989.
X
X	Permission is hereby granted to make copies of this file for
X	any purpose other than direct profit, or as part of a
X	commercial product, provided this copyright notice is left
X	intact.  Sale, other than for the cost of media, is prohibited.
X	
X	Permission is hereby granted to reproduce part or all of
X	this file, provided that the source is acknowledged.
X
X *********************************************************************)
X
X
XShowTime::usage = "On[ShowTime] turns timing info on. Off[ShowTime] turns it off again.
X	The time taken for each command is printed before the result (if any)."
X
XBegin["ShowTime`"]
X
X`oldPre =.        (* user's value of $Pre *)
X`ison = False     (* whether ShowTime is currently turned on *)
X
XAttributes[ShowTime] = HoldFirst
X
XShowTime::twice = "ShowTime is already on."
XShowTime::off = "ShowTime is not in effect."
X
XShowTime[expr_] :=
X	Block[{`timing},
X		Block[{$Pre = oldPre},
X			timing = Timing[ oldPre[expr] ];
X			Print[ timing[[1]] ];
X			oldPre = If[ ValueQ[$Pre], $Pre, Identity ];
X		];
X		If[ !ison, $Pre = oldPre ];  (* turn it off again *)
X		timing[[2]]
X	]
X
XShowTime/: On[ShowTime] := (
X	If[ ison,
X		Message[ShowTime::twice],
X	(* else *)
X		oldPre = If[ ValueQ[$Pre], $Pre, Identity ];
X		$Pre = ShowTime;
X		ison = True
X	]; )
X
XShowTime/: Off[ShowTime] := (
X	If[ ison,
X		ison = False,
X	(* else *)
X		Message[ShowTime::off]
X	]; )
X
XEnd[]
X
XOn[ShowTime]
END_OF_FILE
if test 1576 -ne `wc -c <'Utilities/ShowTime.m'`; then
    echo shar: \"'Utilities/ShowTime.m'\" unpacked with wrong size!
fi
# end of 'Utilities/ShowTime.m'
fi
if test -f 'Utilities/Until.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Utilities/Until.m'\"
else
echo shar: Extracting \"'Utilities/Until.m'\" \(210 characters\)
sed "s/^X//" >'Utilities/Until.m' <<'END_OF_FILE'
XUntil::usage = "Until[body, test] evaluates body until test becomes true."
X
XBegin["`Private`"]
X
XAttributes[Until] = {HoldAll}
X
XUntil[body_, test_] := Block[ {`t}, For[ t=False, !t, t=test, body ] ]
X
XEnd[]
XNull
END_OF_FILE
if test 210 -ne `wc -c <'Utilities/Until.m'`; then
    echo shar: \"'Utilities/Until.m'\" unpacked with wrong size!
fi
# end of 'Utilities/Until.m'
fi
if test -f 'Utilities/WrapHold.m' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Utilities/WrapHold.m'\"
else
echo shar: Extracting \"'Utilities/WrapHold.m'\" \(225 characters\)
sed "s/^X//" >'Utilities/WrapHold.m' <<'END_OF_FILE'
XWrapHold::usage = "WrapHold[expr] wraps Hold[] around the head
X	and the elements of expr without evaluating them."
X
XSetAttributes[WrapHold, HoldAll]
X
XWrapHold[expr_] :=
X	Map[ Hold, MapAt[Hold, Hold[expr], {1, 0}], {2}] [[1]]
END_OF_FILE
if test 225 -ne `wc -c <'Utilities/WrapHold.m'`; then
    echo shar: \"'Utilities/WrapHold.m'\" unpacked with wrong size!
fi
# end of 'Utilities/WrapHold.m'
fi
echo shar: End of archive 1 \(of 2\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked both archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0


