[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Rounding.. please help



Steven,

I could explain to you why I'm not using SQR round, but I think the
comment from the PS_SQR_Round procedure is simple and to the point:

    "This routine is needed because the SQR-provided round function is
not totally
reliable because it does floating point to decimal conversion, which is
inexact."

For example, my GL run has ended up a penny short when the SQR is coded
with the simple round function.

Thanks.

Jonathan Fry

Steven E. Davies wrote:

> Jonathan,
>
> Is there a reason why you aren't using the internal SQR round()
> function?
>
> Example:
>
> let #num = 12.123456
>
> let #rnd = round(#num, 0)   ! #rnd = 12
> let #rnd = round(#num, 1)   ! #rnd = 12.1
>
> HTH
>
> Steve
>
> ---Jonathan Fry <frydaddy@BELLSOUTH.NET> wrote:
> >
> > I posted a cry out for help last week, but haven't been able to get
> any
> > answers. I'm having a problem rounding numbers. When I call
> > ps_sqr_round, my program just loops within the sqc. Since my last
> post,
> > I narrowed down the problem to it only happening when I run off of
> unix.
> > Anyone had this problem before? I'm in contact with some PeopleSoft
> > people, but have yet to receive a resolution.
> >
> > I'm using SQR version 3.0. Any help is much appreciated.
> >
> > Thanks.
> >
> > Jonathan
> >
>
> ==
>
> Steven E. Davies
> ------------------------------
> "Quid quid latine dictum sit,
>  altum viditur."
> ------------------------------
> _________________________________________________________
> DO YOU YAHOO!?
> Get your free @yahoo.com address at http://mail.yahoo.com