<cfset myNumberRoundedUp = numberFormat(82-(82 * 0.0525),'.__')>
tw
On Thu, 14 Oct 2004 14:53:11 -0700, Jordan Michaels
<[EMAIL PROTECTED]> wrote:
> Chris Johnston wrote:
>
> > On Thu, 14 Oct 2004 13:36:56 -0700, Jordan Michaels
> > <[EMAIL PROTECTED]> wrote:
> > > How can I make NumberFormat() round UP instead of down? For example:
> > >
> > > So, say we plug some numbers in there:
> > >
> > >
> > > The actual result of 82-(82 * 0.0525) is 77.695, so I need that number
> > > to round up to 77.70. Instead, using the NumberFormat function results
> > > in a value of 77.69. How can I make this round up correctly!?
> > >
> >
> > The manual way of doing this would be to add 0.005 to the number and
> > then simply chop off the last digit. So 77.695 would become 77.700
> > which would truncate to 77.70. Similarly, 77.694 would become 77.699,
> > truncated to 77.69. Anything >= 0.005 would round up and anthing <
> > 0.005 would round down.
> >
> > --
> > chris johnston
> >
> > www.fuzzylizard.com
> >
> > "For millions of years, mankind lived just like the animals and
> > something happened which unleashed the power of our imagination, we
> > learned to talk."
> > Pink Floyd
>
>
> Simple, but effective. Thanks Chris.
>
> --
> Warm regards,
> Jordan Michaels
> Vivio Technologies
> http://www.viviotech.net/
> [EMAIL PROTECTED]
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

