Back to forum list… Back to How Do I?...

Round function - Rounding 1.165 to 2 decimal places results in 1.16, not 1.17. Rounding 1.15 to 1 decimal place results in 1.2. (2 replies)

(unknown)
5 years ago
(unknown) 5 years ago

Hi all, 

 

I've just noticed an issue with rounding that's causing a lot of trouble for a customer I'm working with. If anyone can assist / get back to me, it would be greatly appreciated.

Before I describe the issue, I wanted to list the version details:

 

Assembly Versions:

Realisable.IManWebUI.DLL 3.2.0.0

Product Update: PU1

Config Version: 3.21

DB Version: 3.12

 

The issue is relatively simple to describe. I'm trying to use the Round function on a decimal datatype field. Specifically, I need to round the decimal value to 2 decimal places.

 

When I use Round like so, the output is 1.16:

 Round(1.165, 2)

Is there a reason why it's not 1.17? The 5 should round up.

 

I've tested another example to see if it will always round the 5 down, but I've ran into an interesting result.

If I run the following code, I get 1.12 as my output:

 

Round(1.15, 1)

 

Is there a reason why my second example rounds up the 5 as intended  and my first example does not? Is this a known bug? 

Is there any way I can force the function to always round up on 5? 

On the support page it shows there are only 2 parameters to this function, so I didn't see anything else I can pass to the function to help. 

 

Support
5 years ago
Support 5 years ago
(unknown)
5 years ago
(unknown) 5 years ago

Thank you.

Contact

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Request Demo

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Access Downloads

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close