Hello friends, i m getting wrong output for the rounding of the number to 2 decimal Places, any one know why it is so

Actually for some number it works and for some number not
eg:123.429 gives o/p 123.43
but 123.425 gives output as 123.42, it should be 123.43

i have attached the output of excel below

Thanks in advance…
double round

image

@aslam_ali1

Assign activity:
Left: roundedValue
Right: Math.Round(Double_var,2,MidpointRounding.AwayFromZero)

1 Like

@aslam_ali1

1 Like

Thank you @rlgandu for the quick response :smiling_face:

Still im not getting the Output by using that expression.

image

@aslam_ali1

Assign activity:
Left: roundedValue
Right: Math.Round(Double_var,2,MidpointRounding.AwayFromZero)

1 Like

Thk you
Working!!! :smiling_face:

@aslam_ali1

You can try this also

Math.Ceiling(123.429 * 100) / 100

1 Like

Thank you @sasi_poosarla it is working :smiling_face:

Thanks for the quick response!!!

You are Welcome…

Cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.