[Date Index]
[Thread Index]
[Author Index]
Re: Re: Formatting Numeric Outpuit
*To*: mathgroup at smc.vnet.net
*Subject*: [mg104928] Re: [mg104853] Re: [mg104782] Formatting Numeric Outpuit
*From*: DrMajorBob <btreat1 at austin.rr.com>
*Date*: Fri, 13 Nov 2009 05:56:45 -0500 (EST)
*References*: <200911101057.FAA19555@smc.vnet.net>
*Reply-to*: drmajorbob at yahoo.com
> ..which shows a NumberForm expression. Remember that NumberForm does not
> affect evaluation, only display.
That's simply NOT true in any meaningful sense, and that's the source of
the current problem.
For it to be true, most (all?) operations must automatically move
"through" NumberForm to the numbers. Not just + and -, but also Column and
others. Column[Numberform[...]]] needs to become NumberForm[Column[...]]
in the same way that Plus and Minus should (but don't) do the same thing.
Your statement above implies that at least the arithmetic operations go
through... and they don't.
Bobby
On Thu, 12 Nov 2009 05:00:24 -0600, Murray Eisenberg
<murray at math.umass.edu> wrote:
> You may obtain what you want by mapping the appropriate NumberForm
> expression onto the list n1 and feeding that into Column (for the sake
> of this post, I shortened the list to have length 2):
>
> n1 = RandomReal[100, 2];
> n2 = NumberForm[#, {3, 3}] & /@ n1;
> Column[n2, Right]
> 91.900
> 56.100
>
> I don't know how completely to explain why what you tried doesn't work,
> except to note the result of ...
>
> NumberForm[n1, {3, 3}] // FullForm
>
> ..which shows a NumberForm expression. Remember that NumberForm does not
> affect evaluation, only display.
>
> But I've long considered the same effect you observed as an a
> Mathematica annoyance. Like you, I've always expected the NumberForm to
> change the display of all the numbers no matter where they're
> subsequently embedded.
>
> I don't know why this annoying behavior cannot be changed, although from
> my perspective it's hard to tell what effects the change might make as
> they ricochet through the whole system.
>
> BenT wrote:
>> Please consider these Mathematica 7 code Input lines:
>>
>> n1 = RandomReal[100, 10]
>>
>> n2 = NumberForm[n1, {3, 3}]
>>
>> Column[n2, Right]
>>
>> What I expected to get was "ignored", namely right aligned "arbitrary"
>> numeric data with 3 digits to the right, and 3 digits to the left of
>> the decimal point) formatted in a single column. How can this be
>> achieved with any numeric list of data?
>>
>> --- Benjamin Tubb
>>
>
--
DrMajorBob at yahoo.com
Prev by Date:
**Re: Dialogue box generator**
Next by Date:
**Re: Re: Wrong limit?**
Previous by thread:
**Re: Formatting Numeric Outpuit**
Next by thread:
**Re: Formatting Numeric Outpuit**
| |