Skip to content

10.0.0

Choose a tag to compare

@rocky rocky released this 19 Apr 01:17
· 321 commits to master since this release

Some foundational work on overhauling plotting with NumPy vectors was started. Alas, work on it was not complete by release time, so this could not be finished. Expect a future release to have revamped graphics.

A major revision of Form handling and character encoding $CharacterEncoding was started with a focus on TeXForm, MathMLForm, and OutputForm.

Notes:

  1. There are numerous incompatible changes. Use with Mathics-scanner 10.0.0 or greater.
  2. We are in the process of renaming Mathics to Mathics3. You will notice a new Mathics3 logo in the documentation. Mathics was monolithic Python 2-ish code. Mathics3 has rewritten a number of major subcomponents and split off a number of subcomponents. There are still several that need to be revised or rewritten. The name change reflects this distinction between the two efforts, and emphasizes that Mathics3 uses modern Python 3 idioms. While right now the repository name and import refer to mathics, several repositories that use the Mathics3 core, or that Mathics3 uses, have been renamed. In particular, Mathics_Scanner is now Mathics3_Scanner.

New Builtins

  1. $Language variable
  2. ArcBox boxing function
  3. Csch function PR #1768
  4. JSON`Import`JSONImport
  5. RasterBox boxing function
  6. Format
  7. FormBox, and RoundBox boxing functions
  8. ShowSpecialCharacters option
  9. ShowStringCharacters option

Enhancements

  1. Many Builtin functions now report argument-mismatch errors
  2. Trig option added to Numerator and Denominator
  3. CharacterEncoding, and Path options added to Get
  4. PowerMod and Quotient handle the 3-argument form, roots of exponents (PowerMod), lists of exponents, and numbers other than Integers.
  5. N[integer, MachinePrecision] added
  6. PrintPrecision for N[integer] matches WMA; so does the largest mantissa before converting to MachinePrecision Integer (for display) matches WMA.
  7. BeginPackage with Needs parameter added. This should allow more packages to load properly
  8. Expand, and Apart work with relations
  9. #1596 Improve FullForm compatibility

Bugs Fixed

  1. PR #1755 Ensure date formats have a year in them. This is needed for future Python versions.
  2. PR #1762 Fix Rayleigh expansion rules to only match half-integer orders. (Chenxin Zhong)
  3. #1741 Implement MachinePrecision option for large numbers that fall outside of Python's built-in float mantissa
  4. #1740 N[3^200] in formats as PrecisionReal instead of MachinePrecision
  5. #1723 Plotting nested functions
  6. #1713 ? symbol and ?? symbol should be parsed as Information["symbol"] and Information["symbol"]
  7. #1699 Character sequences used for the string representation of boxes should be treated as single characters in string character-wise manipulation operations.
  8. #1692 Map does not automatically map a function over Association values (Li-Xiang-Ideal)
  9. #1639 Map does not automatically map a function over Association values
  10. #1622 Handling escape sequences inside string literals
  11. #1519 Order for Numerics, e.g. Order[1.0, 1] == -1, but is 0
  12. #1492 UpSet not giving a "Tag Integer is Protected." message
  13. #1487 FindMinimum, FindMaximum do not give approximate results when $IterationLimit has been exceeded and convergence fails
  14. #1481 $TraceBuiltins=False does not work after more than one $TraceBuiltins=True use.
  15. Reset evaluation.iteration_count on each new evaluation. This caused problems in long-running sessions, such as the Mathics3-django gallery examples.
  16. Binomial attributes corrected

Command-line Utilities

Command-line program mathics was renamed to mathics3; the old name will be available for a while. This apparently facilitates uv packaging.

Command-line program mathics3-codeparser-parse was added to show how expressions are parsed. This is roughly analogous to the CodeParse function of the CodeParser WMA package.

Internals

  • A major revision and reorganization was begun to improve Form
    handling, leading to the new modules mathics.forms.format and
    mathics.forms.render. Existing render functions from
    mathics.format has been moved under mathics.form.render. (mmatera) Corrections were made to variables $PrintForms and $OutputForms. (mmatera)
  • Primitive datatype NumericArray, which is essentially a NumPy array, was added to support vector operations, such as plotting. (Bruce Lucas) In support of this, the module mathics.core.atoms was split up.
  • Internals for handling Graphics have been revised to be able to accept a more complete list.
  • Parsing now uses more data from YAML tables instead of hard-coding values inside code.
  • Revise representation for Complex Numbers; both the real and imaginary parts can now be arbitrary non-complex Real numbers. The precision, a derived value, is also saved.
  • Numerous internal changes were made to improve performance.
  • mpmath is used to store large integer mantissas in N[x_Integer].
  • Token names were changed to align better with the names reported in
    CodeParser`Tokenize. Note, however, Mathics3 parsing is a bit different from CodeParser`Parse.

Package updates

  1. Python 3.14 supported. Support for Python 3.10 dropped; it may still work, but is not supported.
  2. Sympy 1.14 supported
  3. llvm 18+ now supported

API incompatibility

  • Front ends must now issue an explicit call to import_and_load_builtins(). Previously, this was handled simply by
    import of MathicsSession. Loading modules loaded via import was unpredictable in how and when things got loaded. The change was made to address this and to be able to give more flexibility in loading.
  • Token names have changed to align better with CodeParser ' CodeTokenize.

Documentation

Go over documentation for PowerMod[], Denominator[], Numerator[], Limit, and ColorData, among other things.