Compare two number with tolerance in %

Hi,

FYI, if your tolerance means ±5%, Math.Abs method will help you as the following.

image

100*Math.Abs(dbl_1-dbl_2)/dbl_1<5

Regards,

1 Like