What's New in Version 2
- To: mathgroup at yoda.ncsa.uiuc.edu
- Subject: What's New in Version 2
- From: pea
- Date: Thu, 31 Jan 91 16:55:37 CST
- Cc: joe, pea
New Features in Version 2.0 These notes describe new features in the kernel of Mathematica Version 2.0 that were not in Version 1.0. Incompatibilities between Versions 1.0 and 2.0 are indicated below by *. Particularly important enhancements are indicated by exclamation points (!). Page references are to the second edition of Stephen Wolfram's book "Mathematica: A System for Doing Mathematics by Computer". Some of the features described below were already present in Mathematica Versions 1.1 or 1.2. MATHEMATICAL FUNCTIONS ====================== . Sign has been generalized to handle complex numbers. See pages 550 and 604. . Random has been speeded up for the case of real numbers. (It now uses a Fibonacci generator in this case; it continues to use a cellular automaton generator for integers.) See page 552. * GCD now handles numbers only. PolynomialGCD has been added to handle polynomials. See pages 553 and 598. . PrimePi[x] gives the number of primes less than x. See page 554. . FactorInteger has been greatly speeded up. A package is now provided for factoring with elliptic curves. See page 554. . The option GaussianIntegers has been added for FactorInteger and PrimeQ, allowing factoring of complex integers. See page 556. . The functions ClebschGordan, ThreeJSymbol, and SixJSymbol have been added for computing rotational coupling coefficients. See page 561. * The trigonometric functions Csc, Sec, and Cot are now handled explicitly, and are not automatically written in terms of Sin, Cos and Tan. * The hyperbolic functions Sinh, etc., are now handled explicitly, and are not automatically written in terms of Exp, etc. * Principal roots are now used for all fractional powers. Thus (-8)^(1/3) is now converted to 2 (-1)^(1/3), rather than to -2. See page 564. . The evaluation of Pi, EulerGamma and Catalan to arbitrary precision has been speeded up. See page 566. . The computation of Bessel, Airy and related functions has been speeded up, particularly for machine-precision arguments. The computation of all hypergeometric functions has been made more robust. . AiryBi, AiryAiPrime, and AiryBiPrime have been added. See page 570. . SinIntegral and CosIntegral have been added. See pages 570 and 571. . Erfc has been added. See page 570. . The functions RiemannSiegelTheta and RiemannSiegelZ have been added. See page 571. . JacobiZeta has been added, and EllipticTheta, EllipticThetaPrime and EllipticPi have been completed. See page 580. . A standard package giving common statistical distributions has been added. See page 586. NUMERICAL OPERATIONS ==================== ! A compiler for numerical expressions has been added, making their evaluation much faster. With the option setting Compiled->True, the compiler is automatically invoked in various numerical and graphical functions. You can explicitly create CompiledFunction objects using the function Compile. See page 312. * The functions IntegerDigits and RealDigits have been added, for giving lists of digits in numbers. See page 537. (These functions supersede the function Digits provided in Version 1.2.) . MantissaExponent gives the mantissa and exponent of a number, in any base. See page 538. . MachineNumberQ has been added to test for machine numbers. The global variables $MachinePrecision, $MachineEpsilon, $MinMachineNumber and $MaxMachineNumber give parameters of machine arithmetic on your particular computer system. See page 545. . SetPrecision and SetAccuracy have been added, to allow the precision and accuracy for arbitrary-precision numbers to be changed. (These functions were already present in Version 1.1.) See page 544. . Interpolation gives an InterpolatingFunction which represents interpolation of data. See page 676. . InterpolatingPolynomial gives an exact polynomial fit to data. See page 675. . Fourier and InverseFourier have been generalized to allow data with any number of dimensions. They also allow data with arbitrary precision. See page 682. . Numerical operations on functions have been made more efficient and robust. * NIntegrate, NSum and NProduct now have a PrecisionGoal option as well as AccuracyGoal. Other options to these functions have also been slightly rearranged. . NSolve has been added to give numerical solutions to polynomial equations in the form returned by Solve. It extends the Version 1.0 function NRoots. ! NDSolve has been added for finding numerical solutions to systems of ordinary differential equations. See page 696. ! ConstrainedMin, ConstrainedMax and LinearProgramming have been added for solving linear programming problems. See page 705. LINEAR ALGEBRA ============== . Numerical linear algebra has been made much more efficient. . MatrixPower and MatrixExp have been added. See page 659. . A Modulus option has been added for Inverse. See page 663. . QRDecomposition and SchurDecomposition have been added. See page 665. ALGEBRA ======= . Solve can now solve some equations involving exponential, logarithms and trigonometric functions. (This functionality was already present in Version 1.2.) See page 612. . InverseFunction has been added, to represent inverse functions which can be returned by Solve. (Already present in Version 1.2.) See page 612. . GroebnerBasis gives the Grobner basis for a list of polynomials. (This function was already present in Version 1.2.) See page 622. * Power does not automatically rewrite expressions of the form (ab)^c and (a^b)^c. The function PowerExpand has been added to do this. See page 592. . Expand and related functions now take a second argument which is a pattern specifying which parts of an expression should be expanded. See pages 592 and 595. * PolynomialGCD and PolynomialLCM have been added. GCD no longer works on polynomials. (The functions PolynomialGCD and PolynomialLCM were already present in Version 1.2.) See page 598. * PolynomialMod has been added to reduce polynomials with respect to one or several moduli. Mod no longer reduces coefficients in polynomials. See pages 598 and 602. . FactorTerms now takes a second argument to specify which variables should appear in terms that are factored out. See page 598. . Factor and related functions now take the option GaussianIntegers which allows factoring in terms of polynomials with complex number coefficients. See page 600. . Expand, Factor and related functions now take the option Trig. With the setting Trig -> True, transformations are made for trigonometric functions. See page 603. . ComplexExpand transforms expressions, using explicit assumptions about whether symbolic variables are real or complex. See page 604. CALCULUS ======== . Integrate has been considerably extended. It now incorporates the complete Risch algorithm for indefinite integration, as well as algorithms for definite integration based on generalized hypergeometric functions. Version 2.0 may give results for some integrals in a different form from Versions 1.0 or 1.2. See page 632. ! DSolve has been added for finding symbolic solutions to ordinary differential equations. See page 637. (Dsolve existed in Version 1.2, but has been much extended in Version 2.0.) . InverseSeries now allows two arguments to be given, so that the value of the series and the name of the expansion variable need not be the same. See page 644. . Limit has been much extended. The option Direction has been added to allow for directional limits. Limit can now return RealInterval objects. See page 646. . Series has been extended to handle many kinds of special functions. (Already done in Version 1.2.) . Residue has been added. (This function was already present in Version 1.2.) See page 648. GRAPHICS ======== . ParametricPlot3D has been added as a built-in function to allow parametric curves and surfaces to be generated in three dimensions. (ParametricPlot3D was given in a package in Version 1.2.) See page 168. . GraphicsArray has been added to allow a plot to be built up from several subplots. See page 146. . Surfaces generated by Plot3D, etc., can now be combined using Show. See page 449. . Conversions can now be done between all types of graphics. See page 448. . Options now takes a second argument which specifies the particular option whose value is to be given. FullOptions gives the explicit value used for an option even if its setting is Automatic. See page 398. . FullGraphics gives a complete graphics object containing the explicit graphics primitives for axes and other elements specified by graphics options. See page 398. * The graphics primitive CellArray has been renamed Raster. The new graphics primitive RasterArray has been added, to allow an array of graphics directives, rather than an array of levels, to be specified. See page 405. . The graphics primitives Circle and Disk have been added. See page 404. . Rectangle now allows a second argument, which can be any graphics object. The graphics object is rendered within the specified rectangle. This allows subplots to be drawn in a flexible way. . The graphics directive Hue has been added, to allow specification of colors in hue, saturation and brightness as well as red, green and blue. See page 407. . AbsolutePointSize, AbsoluteThickness and AbsoluteDashing have been added to allow sizes of graphics objects to be specified in absolute units, independent of the overall size of a plot. See page 409. . The options Background and DefaultColor have been added to allow overall colors for plots to be specified. See page 412. . The options Prolog and Epilog have been added to allow graphics primitives to be specified for rendering before or after the main part of a plot. See page 412. . The option PlotRegion has been added to allow margins around plots to be specified. See page 414. * The option Axes now allows only the settings True and False in both two and three dimensions. AxesOrigin specifies the origin to use for axes in two dimensions. AxesStyle specifies the style in which axes should be rendered. See page 418. . New settings for the Ticks option have been added, to allow labels and styles for ticks to be given, and to allow tick specifications to be given automatically by a function. See page 420. * The option Framed has been removed. Frame has been added, to allow axes to be given on a frame around a plot. Details of the frame can be specified using the options FrameStyle, FrameLabel, FrameTicks and RotateLabel. See page 422. . The option GridLines has been added, to allow grid lines to be drawn in two-dimensional plots. * ContourPlot and ContourGraphics have been modified so that by default they shade the regions between contour lines. This can be prevented by setting the option ContourShading -> False. See page 151. * ContourPlot and ContourGraphics now do not by default generate smooth contours. Smooth contours can usually be produced by setting the option ContourSmoothing -> Automatic. See page 153. . The option ColorFunction has been added for surface, contour and density plots to allow color maps to be specified. See page 425. * The option Contours for contour plots gives the total number of contours to use, or a list of the contour values. This option supersedes the options ContourLevels and ContourSpacing in Version 1. See page 427. . The three-dimensional graphics primitive Cuboid has been added. See page 430. . Hidden surface elimination has been made substantially faster for complex three-dimensional graphics. * The default setting for the option Lighting in Plot3D has been changed to True. See page 436. . The options ViewCenter and ViewVertical have been added to allow a wider range of possible orientations for three-dimensional graphics to be used. See page 443. . The three-dimensional graphics directive SurfaceColor has been added to allow reflection properties of surfaces to be specified. See page 458. . Axes on three-dimensional plots can now have labels and tick marks. (Supported in Version 1.2). See page 461. . The option FaceGrids has been added for three-dimensional graphics. See page 463. . The graphics primitive PostScript has been added to allow verbatim PostScript code to be given. See page 465. * The mechanism for specifying fonts for text in graphics has been changed. The option DefaultFont is now available in all graphics functions, with a default value given by the global variable $DefaultFont. All fonts available on a particular PostScript system can now be accessed from Mathematica. See page 468. . Text in graphics can now be written vertically, as well as horizontally. See page 470. . Text is now supported in three-dimensional graphics. See page 471. . The graphics directive CMYKColor has been added to allow color specifications to be given in a form directly suitable for color printing. See page 472. * The option PlotColor has been superseded by the more general option ColorOutput, which specifies how colors generated by Mathematica should be transformed before output. See page 473. SOUND ===== . Sound generation capabilities have been added. Play and ListPlay are the analogs for sound of Plot and ListPlot for graphics. See page 176. TEXT AND STRING MANIPULATION ============================ * ToASCII and FromASCII have been replaced by ToCharacterCode and FromCharacterCode. See page 366. . Extended character sets are now fully supported. Any one- or two-byte character can be used. See page 367. . $StringConversion and the option StringConversion specify how special characters should be output. See page 371. . The special input form <> is now allowed for StringJoin. See page 376. . StringTake and StringDrop allow substrings to be extracted and removed from strings. See page 376. . StringReverse reverses the characters in a string. See page 376. . StringPosition allows the position of one or more substrings in a string to be found. See page 376. . StringReplace allows substrings within a string to be replaced. See page 376. . DigitQ, LetterQ, UpperCaseQ and LowerCaseQ test for particular types of characters. See page 378. . ToUpperCase and ToLowerCase convert strings. See page 378. . The option IgnoreCase allows string manipulation operations to be done in a case-insensitive way. See page 379. * The standard sorting order for strings and symbol names has been changed to agree with the order usually used for indices and dictionaries. The variable $StringOrder specifies the ordering of characters to be used. See page 379. . ToHeldExpression converts a string to an expression, wrapping the expression with Hold to prevent it from evaluating. See page 381. . SyntaxQ and SyntaxLength allow the syntactic correctness of strings considered as Mathematica input to be tested. See page 381. . StringToStream converts a string to an object that can be treated like an input file, and on which many standard file operations can be done. See page 382. . The option SpellingCorrection has been added for Names and related functions to allow names that differ only slightly to be found. See page 385. INPUT AND OUTPUT ================ . Shallow has been added as an alternative to Short in generating outline forms for expressions. See page 346. . Padding and various alignment and other options have been added for printing numbers. See page 351. . AccountingForm and PaddedForm have been added as new output formats for numbers. See page 352. . Many options have been added for TableForm and MatrixForm, including spacing and labeling. See page 354. * Functions such as Get now return $Failed if they cannot access the files specified, rather than returning unevaluated. See page 477. . Encode allows files to be encoded so that their text can be read only by Mathematica. See page 480. . Streams have been introduced, to allow multiple instances of a particular file or pipe to be used simultaneously for input or output. See page 483. . Options and SetOptions can now be used on streams. See page 488. . The option RecordLists has been added to ReadList, to allow separate records to appear as separate sublists. See page 494. . ReadList now takes a third argument which specifies the maximum number of objects to read. See page 494. . ReadList can now handle Word and Record objects. Delimiters for these objects are specified by options to ReadList. See page 496. FILE OPERATIONS =============== . Directory, SetDirectory and a variety of other functions have been added for manipulating directories. See page 489. . FileNames gives a list of the names of files matching a string pattern, in specified directories. See page 491. . Context names can now be used as system-independent specifications of files containing Mathematica packages. See page 492. . CopyFile, DeleteFile, FileDate, FileByteCount and related functions have been added. See page 493. . Skip allows objects in a file being read to be skipped over. See page 499. . FindList allows records containing particular pieces of text to be found in files. See page 500. . StreamPosition and SetStreamPosition allow the current point in a file to be manipulated. See page 503. LANGUAGE FEATURES ================= . The /; operator can now be used anywhere in a pattern, not just on the right-hand sides of rules. See page 225. . The special input forms === and =!= have been introduced for SameQ and UnsameQ. See page 228. . The operator | (Alternatives) can be used to specify a pattern which can have one of several forms. See page 229. . Dispatch has been added to allow lists of rules to be preprocessed into dispatch tables which use hashing, and are much more efficient. See page 246. * The procedure that Mathematica uses for ordering definitions has been changed so that a larger class of more specific rules are placed before more general ones. See page 254. . DownValues and UpValues now provide explicit access to lists of rules set up by assignments. See page 266. . Lists of attributes can now be specified for pure functions. See page 274. * Evaluate evaluates a function argument even if the attributes of the function specify that the argument should be held. Evaluate takes over one of the two uses of Release in Version 1. See page 280. * ReleaseHold removes Hold and HoldForm in an expression. It takes over the second of the two uses of Release in Version 1. See page 282. . HeldPart and ReplaceHeldPart allow parts of expressions to be accessed and replaced without evaluation. See page 282. . Unevaluated allows a particular function argument to be passed to the function without evaluation. See page 282. . Iteration functions such as Table, Sum and Do now effectively use Block to localize iteration variables. See page 286. * If, Switch and Which now all remain unevaluated if the truth values of conditions in them cannot be determined. See page 287. * Break, Continue and Return now work inside Do. See page 293. ! Trace and related functions provide a range of capabilities for tracing the evaluation of Mathematica functions. See page 295. * Debug has been superseded by Trace and TraceDialog. . Stack gives a list of the objects being evaluated at a particular point in a computation. See page 306. . $IterationLimit and $RecursionLimit now provide two ways to limit computations. See page 308. . Interrupt and Abort generate interrupts during the execution of a program. See page 311. ! Module and With have been added to allow the names as well as the values of variables to be treated as local. See page 318. * Pure functions, rules and assignments are now treated as scoping constructs, so that the names of variables appearing in them are considered to be local. See page 326. . Contexts gives a list of contexts with names of a particular form. See page 335. . DeclarePackage has been added to allow automatic loading of packages to be set up. See page 341. . $NewSymbol has been added to allow operations to be performed whenever a new symbol is created. See page 386. SYMBOLIC AND STRUCTURAL OPERATIONS ================================== . ReplacePart allows one or more parts with specified indices in an expression to be replaced. See page 195. . Insert now allows a list of positions to be specified, at each of which the same expression will be inserted. See page 128. . Delete allows parts at specified positions to be removed. See page 128. . DeleteCases allows parts matching a particular pattern to be removed. See page 222. . RotateLeft, RotateRight and Partition have been generalized to handle arrays of any rank. See page 132. . The functions Position, Cases and Count now take level specifications. See page 198. . The option Heads can be used in functions which take level specifications to determine whether heads of expressions are included in levels. See page 198. . The option SameTest has been added for FixedPoint, to allow an arbitrary function to be used to determine whether a fixed point has been reached. See page 201. . FixedPointList is the analog for FixedPoint of NestList for Nest. See page 201. * Fold and FoldList are analogs of Nest and NestList for two-argument functions. They supersede Accumulate. See page 202. . MapIndexed is a version of Map which gives the index of each part as a second argument. See page 206. . MapThread is a version of Map which can be applied to several expressions with the same structure. See page 206. . ComposeList successively applies a list of functions, and gives a list of the results. See page 210. . Select now takes a third argument which specifies the maximum number of elements to select. See page 211. * The functional operator Composition supersedes the function Compose. See page 213. . FlattenAt effectively allows Flatten to be applied to specific elements. See page 215. . VectorQ and MatrixQ now take a second argument which is applied to each element of the candidate vector or matrix. See page 227. SYSTEM FEATURES =============== . Many warning messages have been renamed and rewritten. Documentation for the messages is available as a Wolfram Research technical report. . Many common input errors are now detected, and warnings are generated. . MessageList gives the list of all messages generated during the evaluation of a particular input line in a Mathematica session. See page 389. . $Language specifies the default language to use for messages. See page 391. . InString now stores the textual input given on each line in a Mathematica session. See page 513. . $PreRead allows input for Mathematica to be modified in textual form, before it is converted to an expression. See page 514. . $SyntaxHandler specifies how syntax errors in Mathematica input should be handled. See page 514. * SetOptions is now used instead of ResetMedium to change the options for input and output streams. See page 517. . Streams is now used instead of to give a list of streams that are currently open. See page 519. . $MessagePrePrint is applied to expressions that are to be printed as part of messages. See page 519. . Dialog initiates a dialog, which serves as a subsession within a complete Mathematica session. See page 520. . Date, TimeZone, AbsoluteTime, SessionTime and TimeUsed give various measures of time. See page 524. . Pause tells Mathematica to pause for a certain time. See page 524. . ToDate and FromDate convert to and from explicit date representation. See page 524. . Several global parameters specifying properties of a particular Mathematica system have been added. Examples are $CreationDate and $OperatingSystem. . On many computer systems, a DataOnly option is supported for Dump, which allows smaller, incremental, dump files to be used. See page 783. SYNTACTIC CHANGES ================= . The operator <> has been added as a special input form for StringJoin. . The operator | has been added to represent alternatives in patterns. . The operators === and =!= have been added as special input forms for SameQ and UnsameQ. . The form s::m::m represents messages in specific languages. . New special input forms have been added for special characters, including 16-bit ones. See page 714.