Bending Deck Boards ------------------- Robert is building a deck on the side of his house and has a problem. He is using `composite boards' for the floor of the deck, but these, being made of the plastic polyethylene and wood fiber, expand much more than wood when the temperature gets hot. Robert is afraid the boards will bend, or warp, because of this expansion. So he does a simple calculation to see how bad the pro- blem is. You are being asked to program this calcula- tion. A section of board is normally a straight line between two points, B and C, at which the board is fastened by screws to joists. Suppose we have such a section of length L, that is, the distance from B to C is L. Suppose the section length changes by expansion to L+y, where y > 0 is a small number, but the end points of the section remain anchored at B and C. The section must assume a non-straight-line shape. Assume it becomes an arc of a perfect circle, with end points B and C. Let the circle have radius R. Note that R is determined by L and y. The straight line from B to C is then the chord of the circle from B to C. Let x be the maximum distance between a point on the arc and a point on the chord. y measures the amount of expansion, and x measures the amount of bending. Note that if you change the scale of the situation by multiplying all distances by a constant C, the circle remains a circle but now of radius C*R, the chord remains a chord but now of length C*L, the arc remains an arc but now of length C*(L+y), and the maximum distance between a point on the chord and a point on the arc is now C*x. Therefore, x/L as a function of y/L does not depend on L. So you are asked to find this function. Note that given R you can compute x and y. Also, R decreases whenever y increases, and y/L as a function of R/L does not depend on L. The problem reduces to computing R/L from y/L by inverting a monotonic func- tion. Input ----- For each of several cases, a line containing a value for y/L. No lines contain any spaces. The input terminates with an end of file. Output ------ For each case a line containing in order: the value of y/L a single space the value of R/L a single space the value of x/L Print all values with exactly 8 decimal places. Do not include any extra spaces. Use double precision float- ing point arithmetic for all computations. Example Input ------- ----- 0.01 0.02 Example Output ------- ------ 0.01000000 2.06885226 0.06132899 0.02000000 1.48249945 0.08686174 File: bending.txt Author: Bob Walton Date: Wed Oct 10 07:12:26 EDT 2007 The authors have placed this file in the public domain; they make no warranty and accept no liability for this file. RCS Info (may not be true date or author): $Author: walton $ $Date: 2007/10/10 11:16:42 $ $RCSfile: bending.txt,v $ $Revision: 1.3 $