1. ## Round Behavior

Hi All,

Why does the 'Round' function behave in the following way:

msgbox Round (3/2)'returns 2
msgbox Round (5/2)'returns 2

2. ## Re: Round Behavior

1.5 and 2.5 will alway be rounded to a higher value. What are you expecting Round to do here?

3. ## Re: Round Behavior

Rounds the specified value to the nearest whole number. If the specified value is in the middle between two numbers (for example, 1.5), the result is an even number.

4. ## Re: Round Behavior

2.5 wont round up since next whole number is a odd number. but if it is an even number then it will round up. so 3.5 will round up to 4
round (7/2) = 4
[ QUOTE ]
1.5 and 2.5 will alway be rounded to a higher value. What are you expecting Round to do here?

[/ QUOTE ]

5. ## Re: Round Behavior

Thanks for correcting. I didn't knew that

6. ## Re: Round Behavior

Antoney,

Thank you...This information was realy useful

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.