Given a function continuous in an interval , and such that , a basic theorem of Mathematics states that there must exist at least one zero of in , that is, a real number such that and .
Given a polynomial with exactly one zero in , can you find this zero?
Each input line describes a polynomial of degree at most 4 with exactly one zero in . Each polynomial is given in decreasing order of as follows: . Every is a real number. The pairs with are not present in the input.
For every polynomial, print its case number, followed by an approximation of its zero in , with the following convention: must be a real number with exactly 5 digits after the decimal point, such that and . Always print the 5 decimal digits of .
Every given polynomial is such that for every real number that has 5 (or less) decimal digits after the decimal point.
The test cases have no precisions issues. However, be aware that it is not wise to check the property just like this.
Input
-1 2 0.5 0 4 3 -6 1 1 0 4.65 4 -0.11 3 0.53 2 -6.51 1 0.13 0 6.31 4 7.64 3 -5.29 2 0.55 1 -9.2 0
Output
Case 1: zero at 0.70710. Case 2: zero at 0.16993. Case 3: zero at 0.02000. Case 4: zero at 0.99973.