Displaying real numbers
- To: mathgroup at yoda.physics.unc.edu
- Subject: Displaying real numbers
- From: franz at cs.washington.edu (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. -2.45658E-3 rather than -3 -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. thanks, Franz Amador franz at cs.washington.edu {rutgers,cornell,ucsd,ubc-cs,tektronix}!uw-beaver!june!franz