MathGroup Archive 2003

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

Search the Archive

Re: Scientifc notation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg41346] Re: [mg41312] Scientifc notation
  • From: Murray Eisenberg <murraye at attbi.com>
  • Date: Thu, 15 May 2003 04:05:34 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200305141213.IAA07756@smc.vnet.net>
  • Reply-to: murray at math.umass.edu
  • Sender: owner-wri-mathgroup at wolfram.com

I think you left out a comma in "data", since otherwise you're asking 
for a 4-element output from a 3-element input.

The built-in ScientificForm will do almost everything you want -- except 
that 1.0 will be rendered simply as provided you make the final number, 
3000, a floating-point number instead of an exact integer:

   data = {1.0, 30.43,  10.^-3, 3000};
   ScientificForm[N[data]]

The result will be a 2-dimensional rendering of:

{1., 3.043 x 10^1, 1. x 10^-3, 3. x 10^3}

where "x" stands here for Mathematica's multiplication sign.  You can 
change that to any character, including a blank, with the 
NumberSeparator option to ScientificForm:

   ScientificForm[N[data], NumberMultiplier -> " "]

Other options are available.

You may omit the inner N function if your data already consists entirely 
of numbers with decimal points -- in the case of your list, using 
"3000." instead of "3000".


J. Guillermo Sanchez wrote:
> Dear friend, 
> I would like obtein the output in scientific notation with a two
> decimals. Here is an example:
>  
>  
> data = {1.0, 30.43 10^-3, 3000}
>  
> How convert to scientific notation
>  
> {1.00 10^0, 3.043 10^1, 1.00 10^-3, 3.00 10^3}
> 
> 
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305



  • Prev by Date: Re: Interpoint distances
  • Next by Date: Re: Interpoint distances
  • Previous by thread: Scientifc notation
  • Next by thread: RE: Scientifc notation