Re: Bug in automatically generated InputForm when using AutoGeneratedPackage->True
- To: mathgroup at smc.vnet.net
- Subject: [mg79354] Re: Bug in automatically generated InputForm when using AutoGeneratedPackage->True
- From: John Fultz <jfultz at wolfram.com>
- Date: Wed, 25 Jul 2007 02:12:14 -0400 (EDT)
- Reply-to: jfultz at wolfram.com
This works correctly in 6.0.1 (which fixes a few problems like this, among other things). It's a free upgrade to every 6.0.0 user, so there's no reason not to get it. Sincerely, John Fultz jfultz at wolfram.com User Interface Group Wolfram Research, Inc. On Wed, 25 Jul 2007 01:05:25 +1000, Andrew Moylan wrote: > Paste the following code into a new notebook. (Choose "Yes" when asked > whether to paste it as a cell expression.) > > Cell[BoxData[ > RowBox[{"y", "=", > SuperscriptBox["x", > RowBox[{"-", > FractionBox["1", "2"]}]]}]], "Code"] > > Execute the code if you like. It evaluates to 1/Sqrt[x], as expected. > > Save the notebook somewhere, and choose to create an auto-save package > when > asked. Now examine the .m package file that has been automatically > created. > It contains the following line: > > y=x^-1/2 > > That's wrong! Evaluate it; it yields 1/(2*x), not 1/Sqrt[x]. > > Incidentally, this problem does not occur in the regular "Convert > To->InputForm (Ctrl+Shift+I)" functionality in the Mathematica window; > here's the result of using that functionality on the cell above: > > y = x^(-(1/2)) > > (That's correct.)