Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

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

Search the Archive

Re: How to get 2.334E+6 output form ?

  • To: mathgroup at
  • Subject: [mg5725] Re: How to get 2.334E+6 output form ?
  • From: dendzik at (Zbigniew Dendzik)
  • Date: Sat, 11 Jan 1997 14:29:15 -0500
  • Organization: Silesian University, Katowice, Poland
  • Sender: owner-wri-mathgroup at

Zbigniew Dendzik (dendzik at wrote:
: Sergio Rojas (sergio at wrote:

: (...)
: : How can one tell to Mathematica to write
: :                                                                   6
: : numbers in the form 2.3456E+6 instead of 2.3456*10^6 (or 2.3456 10 ).

: (...)
: :  How the data can be written to a file without the braces and comma in 
: : between?

: (...)

: Hi Sergio,

: Below is a simple piece of Mma code which I have written to solve this
: problem.

: RegularForm[x_]:= OutputForm[NumberForm[TableForm[x//N], ExponentFunction->
: (If[-10<#<10, Null, #]&), NumberFormat->(If[#3=="", SequenceForm[#1, #3],
: SequenceForm[#1, "E", #3]]&)]]

: If you put the above definition into the file named user.m (for example,
: or simply add it to your init.m file), you will get:

Not long after I have posted above message I noticed that some data
processing software (e.g. Origin (TM)) does not accept files with empty lines
between data. Below is the code that writes converted data in more condensed
form (without empty lines):

RegularForm[x_]:= OutputForm[NumberForm[TableForm[x//N, TableSpacing->{0, 6}], 
ExponentFunction->(If[-10<#<10, Null, #]&), NumberFormat->(If[#3=="", 
SequenceForm[#1, #3], SequenceForm[#1, "E", #3]]&)]]

--Zbigniew Dendzik
dendzik at

  • Prev by Date: Mathematica & MIDI/Macintosh
  • Next by Date: Re: How to make Mathematica to return "Log[Exp[x]]" as x?
  • Previous by thread: Re: How to get 2.334E+6 output form ?
  • Next by thread: Interaction with programs