codeforces/579C_polyline.py
def calculate(self):
        """ Main calcualtion function of the class """

        result = float(1)

        if self.a < self.b:
            return "-1"

        if self.a == self.b:
            return str("{0:.12f}".format(self.b))

        r1 = (self.a + self.b) / (2 * int((self.a + self.b) / (2 * self.b)))
        d = (2 * int((self.a - self.b) / (2 * self.b)))
        result = r1 if d == 0 else min(r1, (self.a - self.b) / d)
        return str("{0:.12f}".format(result))
 Main calcualtion function of the class 
Main calcualtion function of the class
Main calcualtion function of the class
def calculate(self):
        result = float(1)
        if self.a < self.b:
            return "-1"
        if self.a == self.b:
            return str("{0:.12f}".format(self.b))
        r1 = (self.a + self.b) / (2 * int((self.a + self.b) / (2 * self.b)))
        d = (2 * int((self.a - self.b) / (2 * self.b)))
        result = r1 if d == 0 else min(r1, (self.a - self.b) / d)
        return str("{0:.12f}".format(result))
def calculate ( self ) : result = float ( 1 ) if self . a < self . b : return "-1" if self . a == self . b : return str ( "{0:.12f}" . format ( self . b ) ) r1 = ( self . a + self . b ) / ( 2 * int ( ( self . a + self . b ) / ( 2 * self . b ) ) ) d = ( 2 * int ( ( self . a - self . b ) / ( 2 * self . b ) ) ) result = r1 if d == 0 else min ( r1 , ( self . a - self . b ) / d ) return str ( "{0:.12f}" . format ( result ) )
Main calcualtion function of the class
Main calcualtion function of the class
""" Main calcualtion function of the class """
self