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 2007

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

Search the Archive

Re: problem with parsing InputForm scientific notation (eg. 3.`*^-7)

  • To: mathgroup at
  • Subject: [mg80759] Re: problem with parsing InputForm scientific notation (eg. 3.`*^-7)
  • From: j.f.b.payne at
  • Date: Sat, 1 Sep 2007 00:22:30 -0400 (EDT)
  • References: <fara85$4jd$>

I see the same thing as Chris (and I've noticed it happening before,
although I haven't pinned it down neatly, as Chris has).

I wonder whether to blame the editor, rather than the parser.  The
editor looks at the expression, to determine its layout (e.g. put
linebreaks at end of syntactical groups). But it actually also (or
consequently?) rephrases what was typed.

Thus, if you straightforwardly enter RealDigits[3.`*^7] then Show
expression yields

 RowBox[{"RealDigits", "[", "3.`*^7", "]"}]], "Input",
 CellChangeTimes->{{3.397549004920188*^9, 3.3975490074930663`*^9}, {
   3.3975492209091787`*^9, 3.397549228220056*^9},

On the other hand, if you produce it by editing, as per Chris's
recipe, Show expression yields

 RowBox[{"RealDigits", "[",
  RowBox[{"3.`", "*",
   RowBox[{"^", "7"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.397549004920188*^9, 3.3975490074930663`*^9},
   3.3975490970532618`*^9, {3.397549245916384*^9,

Notice that "3.`*^7" has got broken up into RowBox-es. Presumably the
parser doesn't like that, and I can't say I blame it.

On 26 Aug, 08:31, "Chris Chiasson" <ch... at> wrote:
> Can anyone confirm this report?
> Steps to reproduce:
> 1. Enter "3.`*^-7" (without quotation marks) into an Input cell and evaluate it.
> 2. Go back to the Input cell, put your cursor at the beginning and
> enter "RealDigits["
> 3. Hit the End key, type "]" and then re-evaluate the cell, which by
> now reads "RealDigits[3.`*^-7]", but don't enter that directly.
> I have encountered other errors where InputForm messes up the syntax
> checker, but I haven't been able to make a small reproducible example
> like this one.
> Version 6.0.1 on MS Windows XP SP2
> --

  • Prev by Date: is there a better way to do constraint logic programming in Mathematica?
  • Next by Date: Re: [Mathematica 6] Bug in Labeled, Center align option not accepted.
  • Previous by thread: Re: Re: problem with parsing InputForm scientific notation (eg. 3.`*^-7)
  • Next by thread: making a fast projection of a crytsallographic unit cell