I am doing a computer science course and one exercise is to show that two numbers are within 0.01% of each other.(adsbygoogle = window.adsbygoogle || []).push({});

The first step is to ask how one would define the percentage difference between two numbers?

I would define it as:

[(larger number – smaller number)/ (|the number midway between the two numbers|)] * 100

I think this way is better compared with other ways such as

1. [(larger number – smaller number)/(|smaller number|)] *100

or

2. [(larger number – smaller number)/(|larger number|)] * 100

Mainly because my way allows one to get the same percentage difference between for example, (4,6) and (-4,-6). While the other two ways does not.

Using 1.

(6 – 4)/4 = 50%

(-4 – -6)/|-6| = 33%

Using 2.

(6 – 4)/6 = 33%

(-4 – -6)/|-4| = 50%

Preferred Method.

(6 – 4)/5 = 40%

(-4 – -6)/|-5| = 40%

Do you have any other suggestions?

Thanks

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Percentage difference of two numbers?

**Physics Forums | Science Articles, Homework Help, Discussion**