Re: tabulate an expression-DigitBlock bug with zero digits
- To: mathgroup at smc.vnet.net
- Subject: [mg93987] Re: [mg93967] tabulate an expression-DigitBlock bug with zero digits
- From: Syd Geraghty <sydgeraghty at me.com>
- Date: Mon, 1 Dec 2008 07:00:20 -0500 (EST)
- References: <200811301158.GAA07541@smc.vnet.net>
Bob & WRI staff,
This is a really small nit but there is an annoying bug using
DigitBlock with a set of zero digits.
They do not get separated as other digits do.
Evaluate
> n = 25;
> Grid[Prepend[Table[{
> NumberForm[N[x], {2, 1}],
> NumberForm[N[Erf[x], 2 n], {n + 1, n}, DigitBlock -> 5]},
> {x, 0, 1, 1/10}],
> TraditionalForm /@ {x, Erf[x]}],
> Frame -> All]
and you will see what I mean on the output of erf(0.0).
There is a workaround:-
To get rid of the annoying bug ("feature") that a set of zeros is not
split by DigitBlock copy the Table output as a Cell Expression and
paste without interpretation.
Edit the line of continuous zeros deleting the extra zeros and
replace with a "space" character.
Then copy the cell as InputText and paste the result with
interpretation.
That gives the desired table with the zeros seperated like the rest
of the results for each x value.
This procedure is, of course, a real pain (especially if you change
the table a few times before you publish it say).
I realise that I need a real life if I worry about such nits.
However in the interest of continuous improvement of the magical
Mathematica system (that I am addicted to) I offer this small
suggestion.
Cheers ... Syd
Syd Geraghty B.Sc, M.Sc.
sydgeraghty at mac.com
Mathematica 7.0.0 for Mac OS X x86 (64 - bit) (21st November, 2008)
MacOS X V 10.5.4
MacBook Pro 2.33 Ghz Intel Core 2 Duo 2GB RAM
On Nov 30, 2008, at 3:58 AM, Bob Hanlon wrote:
> n = 25;
> Grid[Prepend[Table[{
> NumberForm[N[x], {2, 1}],
> NumberForm[N[Erf[x], 2 n], {n + 1, n}, DigitBlock -> 5]},
> {x, 0, 1, 1/10}],
> TraditionalForm /@ {x, Erf[x]}],
> Frame -> All]