A belt drive consists of two pulleys of
different radius (r1 and r2)
connected by a belt of length l. The industry manufactures belts
of different standard lengths, so the engineers often face a task of
calculating the distance between the pulley centers given their radii and the
belt length. There are several simple approximate methods to do this, which are
precise enough for rough estimations. However, some engineering tasks
require more precise data.
Your task is to write a program that will
calculate the distance a between the centers of the pulleys given
their radii r1 and r2, and
the length l of the belt.
r1, r2 £ 1,000; 2p(r1
+ r2) £
l £ 10,000.
The first line contains 3 space-delimited
real numbers precise to four decimal places: r1, r2,
l. Trailing zeros following the decimal point may be omitted.
The output file should contain a single
real number, the center-to-center distance a. The answer must be
precise to four decimal places.
1.0 2.0 20.0
1.0 2.0 18.85