[AccessD] Round function strangeness

Doug Steele dbdoug at gmail.com
Tue Jan 23 14:11:18 CST 2018


A good thought, but I did try adding extra parentheses.

On Tue, Jan 23, 2018 at 12:01 PM, Bill Benson <bensonforums at gmail.com>
wrote:

> I have to admit, I am intrigued. I am waiting for someone to independently
> verify this is ubiquitous. I myself am not near a computer.
>
> I'd be interested too, to learn if this happens with other operations as
> well, where only fields are operated on and not constants, like Round
> (a+b,1) and Round  (a/b,1).
>
> Do me one favor and see what happens if you include additional parens, such
> as
> Round((a*b),1). I'll be testing this myself in a couple of hours.
>
> On Jan 23, 2018 2:06 PM, "Doug Steele" <dbdoug at gmail.com> wrote:
>
> > singles. The calculations worked fine, it was the rounding that failed.
> >
> > On Tue, Jan 23, 2018 at 10:32 AM, Bill Benson <bensonforums at gmail.com>
> > wrote:
> >
> > > What is the data type of a and b?
> > >
> > > On Jan 23, 2018 1:15 PM, "Doug Steele" <dbdoug at gmail.com> wrote:
> > >
> > > > I used the Round function in a query that had 2 calculated fields.
> The
> > > > first one was a calculation like a*b+1, the second a straight
> > > > multiplication: a*b. The output from Round(a*b+1,1) was correctly
> > rounded
> > > > to one decimal place. The output from Round(a*b,1) wasn't rounded off
> > at
> > > > all. But when (in desperation), I changed this to Round(a*b+1-1,1),
> > which
> > > > is ridiculous, the output was rounded off correctly!
> > > >
> > > > Any comments?
> > > >
> > > > Doug
> > > > --
> > > > AccessD mailing list
> > > > AccessD at databaseadvisors.com
> > > > http://databaseadvisors.com/mailman/listinfo/accessd
> > > > Website: http://www.databaseadvisors.com
> > > >
> > > --
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com
> > > http://databaseadvisors.com/mailman/listinfo/accessd
> > > Website: http://www.databaseadvisors.com
> > >
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list