Mathematica 9 is now available

Wolfram Library Archive

All Collections Articles Books Conference Proceedings
Courseware Demos MathSource Technical Notes
Title Downloads

C, FORTRAN77, Maple and TeX Code Generation Package

Mark Sofroniou
Organization: Wolfram Research, Inc.
Department: Kernel Technology
Old MathSource #

Revision date


Format.m is a package which extends Mathematica's built-in formatting rules. Examples of the shortcomings of the standard format functions are given, where code generated may not be syntactically correct and of appropriate precision. The package addresses these shortcomings and extends the formatting rules to include lists as data objects and assignments to expressions. Optimized computational sequences are now possible, utilizing the additional package Optimize.m (item 3947). Examples are given to show how the package may be used to considerably enhance and automate code generation. The result is a symbiosis of symbolic-numeric environments built upon the existing Splice communication process. Some examples from applied numerical mathematics are given, where the package can been used to establish a generalised formulation to a problem via the use of a template file.

Format.m updated by author, 14 February 2005

*Information Science and Technology > Mathematical Typesetting > TeX

Programming Examples, Text Formatting, Code Generation, C, CForm, Fortran 77, FortranForm, Maple, TeX, TeXForm, OutputForm, Text Manipulation, General Utilities, text conversion, interfacing, Splice
Related items

*A Package For Code Optimization Using Mathematica   [in MathSource: Packages and Programs]
Downloads Download Wolfram CDF Player

README.txt (1.5 KB) - Author's notes
Format.m (64 KB) - Mathematica Package
Download (320.8 KB) - Documentation in PostScript form
Format.sty (839 B) - LaTeX style file for Format.tex
Format.tex (107.5 KB) - Documentation in LaTeX form
driver.f (164 B) - Main driver routine
Download (133 B) - Simple FORTRAN77 main routine template file
Download (238 B) - FORTRAN77 function routine template file
linsolv.f (63.8 KB) - LAPACK linear solution and LU decomposition for use with the template file
Download (2.5 KB) - FORTRAN77 template file for Newton's method. Uses the LAPACK linear solution routine provided in the file linsolv.f
Download (693 B) - FORTRAN77 template file for the Runge-Kutta method
Download (341 B) - A FORTRAN77 subroutine template file