473,405 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Rounding numbers

tom
Hello,

I have a problem with logic of rounding function.
For examp.: the result of expression =[TaxableSum]*[TaxRate]
is 6,825 and when I use round on 2 decimal places I get 6,82 instead of
6,83!?
If I dont use round function, I can display 6,83 with field formating, but
then in next calculations I'm getting error because it calculates the number
6,825.

Please, help!

I am using Access 2003.
Mar 11 '07 #1
4 5377
On Mar 11, 7:01 am, "tom" <t...@tomdizajn.hrwrote:
Hello,

I have a problem with logic of rounding function.
For examp.: the result of expression =[TaxableSum]*[TaxRate]
is 6,825 and when I use round on 2 decimal places I get 6,82 instead of
6,83!?
If I dont use round function, I can display 6,83 with field formating, but
then in next calculations I'm getting error because it calculates the number
6,825.

Please, help!

I am using Access 2003.

http://groups.google.ca/group/comp.d...ess&q=rounding

Mar 11 '07 #2
"Gord" <gd*@kingston.netwrote in
news:11*********************@q40g2000cwq.googlegro ups.com:
On Mar 11, 7:01 am, "tom" <t...@tomdizajn.hrwrote:
>Hello,

I have a problem with logic of rounding function.
For examp.: the result of expression =[TaxableSum]*[TaxRate]
is 6,825 and when I use round on 2 decimal places I get 6,82 instead
of 6,83!?
If I dont use round function, I can display 6,83 with field
formating, but then in next calculations I'm getting error because it
calculates the number 6,825.

Please, help!

I am using Access 2003.
Is 6.825 closer to 6.82 or 6.83?
Mar 11 '07 #3
On Mar 11, 11:01 am, "tom" <t...@tomdizajn.hrwrote:
I have a problem with logic of rounding function.
For examp.: the result of expression =[TaxableSum]*[TaxRate]
is 6,825 and when I use round on 2decimalplaces I get 6,82 instead of
6,83!?
The ROUND() function uses banker's rouding algorithm. See:

http://support.microsoft.com/kb/196652

Jamie.

--
Mar 12 '07 #4
tom
It's in the middle, but I want to round up that value.
I have solve the problem with the Format and CDbl function.

Thank you Gord!

"lyle fairfield" <ly******@yahoo.cawrote in message
news:QG**************@read1.cgocable.net...
"Gord" <gd*@kingston.netwrote in
news:11*********************@q40g2000cwq.googlegro ups.com:
>On Mar 11, 7:01 am, "tom" <t...@tomdizajn.hrwrote:
>>Hello,

I have a problem with logic of rounding function.
For examp.: the result of expression =[TaxableSum]*[TaxRate]
is 6,825 and when I use round on 2 decimal places I get 6,82 instead
of 6,83!?
If I dont use round function, I can display 6,83 with field
formating, but then in next calculations I'm getting error because it
calculates the number 6,825.

Please, help!

I am using Access 2003.

Is 6.825 closer to 6.82 or 6.83?

Mar 13 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ron Adam | last post by:
With all the discussion about numbers here and particularly in regards to prePEP concerning decimal data types got me wondering about how numbers are handled when it comes to rounding. And if that...
2
by: Christopher T King | last post by:
Speakign of rounding errors, why is round() defined to round away from zero? I've always been quite fond of the mathematical definition of rounding of floor(n+.5). As a contrived example of why the...
3
by: Caesar Augustus | last post by:
Hello Tom, Long time listener, first time caller... I have been working with vb code to automate a salary increase process that not only rounds to the nearest penny but also rounds to the...
13
by: dhildebrandt | last post by:
I have a query that uses the Round function to change decimals into whole numbers. For 4 years straight the thing has always rounded the numbers in exactly the same way so that whenever I update...
3
by: Norvin Laudon | last post by:
Hi, Can somebody explain the following, from the MSDN documentation for the "System.Convert.ToInt32(double)" function <quote> Return Value value rounded to the nearest 32-bit signed...
9
by: Joe Attardi | last post by:
Hi all, Math is not my strongest area so forgive me if I use some of the wrong terminology. It seems that scientific notation is immune to rounding errors. For example: (4.98 * 100) + 5.51 ...
11
by: cj | last post by:
Lets assume all calculations are done with decimal data types so things are as precise as possible. When it comes to the final rounding to cut a check to pay dividends for example in VB rounding...
29
by: Marco | last post by:
Hello, I have : float f = 36.09999999; When I do : char cf; sprintf(cf,"%0.03lf", f); I get : 36.100
206
by: md | last post by:
Hi Does any body know, how to round a double value with a specific number of digits after the decimal points? A function like this: RoundMyDouble (double &value, short numberOfPrecisions) ...
30
by: bdsatish | last post by:
The built-in function round( ) will always "round up", that is 1.5 is rounded to 2.0 and 2.5 is rounded to 3.0. If I want to round to the nearest even, that is my_round(1.5) = 2 # As...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.