MathGroup Archive 2001

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

Search the Archive

Re: Number formatting for financial applications

  • To: mathgroup at smc.vnet.net
  • Subject: [mg27511] Re: [mg27475] Number formatting for financial applications
  • From: Ken Kikuchi <kikuchi at neti.com>
  • Date: Thu, 1 Mar 2001 03:53:38 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

Based on the Mathematica definition,

>DigitBlock -> {nleft, nright} inserts a break every nleft digits
> to the left of the decimal point, and every nright digits to the
> right of the decimal point.

the following example might not be a problem but it does not work.

In[1]:=
Clear[myForm];
myForm=AccountingForm[#, 20,
      DigitBlock->{3,Infinity},
      NumberSigns->{"$ -","$ "}]&
Out[1]=
AccountingForm::"iopt0":
    "-- Message text not found -- (DigitBlock) ({3, Infinity})
Slot["$ 1"]&

In[3}:= 101522688.1906241 // myForm
Out[3]//AccountingForm=
AccountingForm::"iopt0":
    "-- Message text not found -- (DigitBlock) ({3, Infinity})
$ -101522688.1906241

I tested the above on both 3.0 and 4.0, and have had the same problem while
DigitBlock->3 worked fine but it's not the required format.

Am I misunderstanding the usage?

Thanks,
Ken

>Subject: [mg27511] [mg27475] Number formatting for financial applications
>From: "Felipe" <no at spam.com>
To: mathgroup at smc.vnet.net
>Date: Tue, 27 Feb 2001 00:37:27 -0500 (EST)

>e.g. I want to display this number
>
>101522688.1906242
>
>like this
>
>$ 101,522,688.1906242 (I can do without the $ if it's too hard)
>
>How can I achieve this without writing ten different tags each time. I just
>want to have a formula with this output instead of having to wrap the
>formula with AccountingForm[], NumberForm[], DigitBlock, etc. It looks
>really ugly when I print it.



  • Prev by Date: Re: Mathematica Audio Problem
  • Next by Date: Re: Number formatting for financial applications
  • Previous by thread: Financial Modeling with Mathematica - April 26 and 27
  • Next by thread: Re: Number formatting for financial applications