Wolfram Library Archive


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

C, FORTRAN77, Maple and TeX Code Generation Package
Author

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

0205-254
Revision date

2004-12-13
Description

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
Subject

*Information Science and Technology > Mathematical Typesetting > TeX
Keywords

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

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