MathGroup Archive 1992

[Date Index] [Thread Index] [Author Index]

Search the Archive

Displaying real numbers

  • To: mathgroup at
  • Subject: Displaying real numbers
  • From: franz at (Franz G. Amador)
  • Date: Wed, 7 Oct 92 16:02:00 -0700

[Mathematica 2.0 for Sun SPARC]

Is there a way to make Mathematica print numbers in a FORTRAN-like
way, e.g.


rather than

  -2.45658 10

I am using Mathlink to call Mathematica from a Common Lisp program
(via an intermediate C function).  Since calling C from Lisp is
expensive, I have Mathlink return its results as a FullForm string
which I parse in Lisp into a Lisp S-expression.  Doing it this way
avoids the many calls to the Mathlink parsing functions I would
otherwise have to make (each via a C function) were I getting the
results back from Mathematica in the usual manner.

Since they are both prefix notations, parsing a FullForm string into a
Lisp S-expression is easy, *except* for Mathematica's insistence on
writing numbers in scientific notation with the exponent on the line
above.  A FORTRAN-like notation would be much easier to parse.


Franz Amador
franz at

  • Prev by Date: ReplaceAll feature
  • Next by Date: Re: Which computer to buy (NeXT, Mac, PC)...
  • Previous by thread: Re: ReplaceAll feature
  • Next by thread: "FORTRAN" format followup