Stupid people

The current pandemic has proven (once again) how many stupid people there are. Consider, for instance, the use of face masks, under this simplified model: The length of a face is \ell, with the bottom of the chin at position 0 and the top of the front at position \ell. The bottom of the mouth is at position mm, and the top of the nostrils is at position nn, with 0<m<n<0 < m < n < \ell.

Let us consider that a placement of a mask is defined by two real numbers: its bottom position b0b \ge 0 and its upper position uu \le \ell, where b<ub < u. We say that a placement is reasonable if it completely covers the mouth and the nostrils, that is, if bmb \le m and unu \ge n.

A stupid person just choses any possible placement such that 0b<u0 \le b < u \le \ell uniformly at random. Note that bb and uu are real numbers with an arbitrary (or infinite) number of decimals. What is the probability that a stupid person wears a mask in a reasonable way?

Input

Input consists of several cases, each with three real numbers mm, nn and \ell. You can assume 0<m<n<1060 < m < n < \ell \le 10^6.

Output

For every case, print the probability that a stupid person wears a mask in a reasonable way. Print four digits after the decimal point. The input cases do not have precision issues.

Problem information

Author: Salvador Roura

Generation: 2026-01-25T11:18:20.049Z

© Jutge.org, 2006–2026.
https://jutge.org