compare two intervals

1.3k Views Asked by At

I want to compare between two interval. What is the formula that I can use to compare two intervals and returns the biggest one?

for example:

interval1= [89.90, 92.25] interval2= [89.30, 93]

answer:

"interval ... is bigger"

example#2:

interval1= [89.90, 92.25] interval2= [90.1, 93]

example#3:

interval1= [89.90, 92.25] interval2= [90.1, 92.1]

example#4:

interval1= [89.90, 92.25] interval2= [88.1, 92.1]

1

There are 1 best solutions below

2
On

Hint. Assuming $b \geq a$, the size of an interval $[a, b]$ is $b - a$.