Given the list of numbers: 4.99,5.011

Which of them is closest to 5

Calculate absolute difference for 5 and 4.99

Absolute Difference = |5 - 4.99|

Absolute Difference = |0.0099999999999998|

Absolute Difference = 0.0099999999999998

Calculate absolute difference for 5 and 5.011

Absolute Difference = |5 - 5.011|

Absolute Difference = |-0.011|

Absolute Difference = 0.011

Find the closest number to 5

We want the smallest absolute difference


4.99