def ftos(Float_Value):
    """
    string ftos(float)

    convert float to string
    Instead of using python's ftos(), use this one to control the precision
    my Float to String mini function

    Precision = %.4f
    Unnecessary 0 will be discarded
    """
    S = '%.4f' % Float_Value
    n = len(S)
    if S[n - 5] == '.':
        if S[n - 4:n] == '0000':
            S = S[0:n - 5]
        elif S[n - 3:n] == '000':
            S = S[0:n - 3]
        elif S[n - 2:n] == '00':
            S = S[0:n - 2]
        elif S[n - 1] == '0':
            S = S[0:n - 1]
    return S
